You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/04/09 20:26:59 UTC

[GitHub] [beam] lukecwik commented on a change in pull request #11355: [BEAM-9727] Automatically set required experiment flags for dataflow runner v2.

lukecwik commented on a change in pull request #11355: [BEAM-9727] Automatically set required experiment flags for dataflow runner v2.
URL: https://github.com/apache/beam/pull/11355#discussion_r406455862
 
 

 ##########
 File path: sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
 ##########
 @@ -1014,16 +1014,13 @@ def _use_fnapi(pipeline_options):
 
 
 def _use_unified_worker(pipeline_options):
-  if not _use_fnapi(pipeline_options):
-    return False
   debug_options = pipeline_options.view_as(DebugOptions)
   use_unified_worker_flag = 'use_unified_worker'
+  use_runner_v2_flag = 'use_runner_v2'
 
-  if debug_options.lookup_experiment(use_unified_worker_flag):
-    return debug_options.lookup_experiment(use_unified_worker_flag)
-
-  if debug_options.lookup_experiment('use_runner_v2'):
-    debug_options.add_experiment(use_unified_worker_flag)
+  if (debug_options.lookup_experiment(use_runner_v2_flag) and not
+  debug_options.lookup_experiment(use_unified_worker_flag)):
 
 Review comment:
   formatting issue

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services