Optimizing repeated transformations in Apache Beam/DataFlow

强颜欢笑 提交于 2019-12-08 02:14:33

问题


I wonder if Apache Beam.Google DataFlow is smart enough to recognize repeated transformations in the dataflow graph and run them only once. For example, if I have 2 branches:

  • p | GroupByKey() | FlatMap(...)
  • p | combiners.Top.PerKey(...) | FlatMap(...)

both will involve grouping elements by key under the hood. Will the execution engine recognize that GroupByKey() has the same input in both cases and run it only once? Or do I need to manually ensure that GroupByKey() in this case proceeds all branches where it gets used?


回答1:


As you may have inferred, this behavior is runner-dependent. Each runner implements its own optimization logic.

  • The Dataflow Runner does not currently support this optimization.


来源:https://stackoverflow.com/questions/51203221/optimizing-repeated-transformations-in-apache-beam-dataflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!