kennknowles commented on a change in pull request #13114:
URL: https://github.com/apache/beam/pull/13114#discussion_r505726398



##########
File path: examples/java/src/main/java/org/apache/beam/examples/WordCount.java
##########
@@ -180,8 +181,11 @@ static void runWordCount(WordCountOptions options) {
     p.apply("ReadLines", TextIO.read().from(options.getInputFile()))
         .apply(new CountWords())
         .apply(MapElements.via(new FormatAsTextFn()))
-        .apply("WriteCounts", TextIO.write().to(options.getOutput()));
-
+        .apply(
+            "WriteCounts",
+            options.as(StreamingOptions.class).isStreaming()

Review comment:
       The `--streaming` flag really just controls whether a runner is in 
"streaming mode". Not all runners even have a streaming mode, and it should 
never affect the semantics of the pipeline. So I don't think that should affect 
the code or logic of the example. The problem seems to be a bug in the 
`DataflowRunner`, not anything to do with the example.




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


Reply via email to