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/09/10 22:11:36 UTC

[GitHub] [beam] y1chi commented on a change in pull request #12813: write to file ability for java suite

y1chi commented on a change in pull request #12813:
URL: https://github.com/apache/beam/pull/12813#discussion_r486661742



##########
File path: sdks/java/testing/nexmark/src/main/java/org/apache/beam/sdk/nexmark/NexmarkLauncher.java
##########
@@ -922,6 +922,11 @@ private void setupPubSubResources(long now) throws IOException {
     switch (configuration.sourceType) {
       case DIRECT:
         source = sourceEventsFromSynthetic(p);
+        if (configuration.generateInputFileOnly) {
+          PCollection<Event> events = source;
+          source = null;

Review comment:
       is this needed?

##########
File path: sdks/java/testing/nexmark/src/main/java/org/apache/beam/sdk/nexmark/NexmarkConfiguration.java
##########
@@ -42,6 +42,9 @@
   /** Where events come from. */
   @JsonProperty public NexmarkUtils.SourceType sourceType = NexmarkUtils.SourceType.DIRECT;
 
+  /** If {@literal true}, only generate events and write them to local file. */
+  @JsonProperty public boolean generateInputFileOnly = false;

Review comment:
       It may help to allow user to specify a file path




----------------------------------------------------------------
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