y1chi commented on a change in pull request #12709:
URL: https://github.com/apache/beam/pull/12709#discussion_r483292999
##########
File path:
sdks/python/apache_beam/testing/benchmarks/nexmark/nexmark_launcher.py
##########
@@ -156,34 +191,32 @@ def parse_args(self):
# Usage with Dataflow requires a project to be supplied.
self.project = self.pipeline_options.view_as(GoogleCloudOptions).project
- if self.project is None:
- parser.print_usage()
- print(sys.argv[0] + ': error: argument --project is required')
- sys.exit(1)
-
- # Pub/Sub is currently available for use only in streaming pipelines.
self.streaming = self.pipeline_options.view_as(StandardOptions).streaming
- if self.streaming is None:
- parser.print_usage()
- print(sys.argv[0] + ': error: argument --streaming is required')
- sys.exit(1)
# wait_until_finish ensures that the streaming job is canceled.
self.wait_until_finish_duration = (
self.pipeline_options.view_as(TestOptions).wait_until_finish_duration)
- if self.wait_until_finish_duration is None:
- parser.print_usage()
- print(sys.argv[0] + ': error: argument --wait_until_finish_duration is
required') # pylint: disable=line-too-long
- sys.exit(1)
+ self.runner = self.pipeline_options.view_as(StandardOptions).runner
+
+ if self.streaming:
+ if self.wait_until_finish_duration is None\
+ or self.project is None or self.runner != 'DataflowRunner':
Review comment:
we can also ignore id_label for now if that is the case, I believe
id_label was useful for deduplication, but in the case of a benchmark it is
arguably acceptable.
----------------------------------------------------------------
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:
[email protected]