y1chi commented on a change in pull request #13114:
URL: https://github.com/apache/beam/pull/13114#discussion_r505730965
##########
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:
looks like the StreamingShardedWriteFactory overwrites the WriteFiles
transform(which incorporates Create.Values() that should be overwritten by
StreamingFnApiCreateOverrideFactory, I've tested reordering of the overrides
and it seems to solve the problem.
it seems hard in general to keep the ordering always correct if we only
replace all transforms in one run but I guess the Factories that overwrites
into a composite transform should be added first.
----------------------------------------------------------------
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]