Google-cloud-dataflow: Why pipeline run twice with DirectRunner?

后端 未结 1 1127
一个人的身影
一个人的身影 2021-01-21 06:59

Given the data set as below

{\"slot\":\"reward\",\"result\":1,\"rank\":1,\"isLandscape\":false,\"p_type\":\"main\",\"level\":1276,\"type\":\"ba\",\"seqNum\":4254         


        
相关标签:
1条回答
  • 2021-01-21 07:51

    The with statement for Pipeline runs the pipeline. Specifically:

    with beam.Pipeline(...) as p:
      [...code...]
    

    is equivalent to:

    p = beam.Pipeline(...)
    [...code...]
    p.run().wait_until_finish()
    

    See the implementation.

    0 讨论(0)
提交回复
热议问题