对固定时间 window 产生的 Google DataFlow 中的数据进行排序?
Sorting data in Google DataFlow produced by a fixed time window?
我正在调查一个用例的 Google 数据流,我想知道是否可以在后续步骤中对固定时间 window 产生的数据进行排序?如果是这样,我应该从现有的 core transform 扩展还是自己推出?
在 Google Cloud Dataflow 中,PCollection
的 window 中的元素没有定义的顺序,但许多排序用例可以通过其他方式解决。例如,您可以通过基于 Combine
的库转换 Top
. If your data has small per-window cardinality, then it may be feasible for you to read the elements in a window as a side input 检索 "top n elements" 并对它们进行排序或以其他方式实现您的目标。
我很想知道更多关于您的用例的信息,以便我可以给出更具体的答案。
我正在调查一个用例的 Google 数据流,我想知道是否可以在后续步骤中对固定时间 window 产生的数据进行排序?如果是这样,我应该从现有的 core transform 扩展还是自己推出?
在 Google Cloud Dataflow 中,PCollection
的 window 中的元素没有定义的顺序,但许多排序用例可以通过其他方式解决。例如,您可以通过基于 Combine
的库转换 Top
. If your data has small per-window cardinality, then it may be feasible for you to read the elements in a window as a side input 检索 "top n elements" 并对它们进行排序或以其他方式实现您的目标。
我很想知道更多关于您的用例的信息,以便我可以给出更具体的答案。