nehsyc commented on a change in pull request #14164:
URL: https://github.com/apache/beam/pull/14164#discussion_r593525924
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
##########
@@ -672,13 +740,102 @@ private WriteShardedBundlesToTempFiles(
.withSideInputs(shardingSideInputs))
.setCoder(KvCoder.of(ShardedKeyCoder.of(VarIntCoder.of()),
input.getCoder()))
.apply("GroupIntoShards", GroupByKey.create())
+ .apply(
Review comment:
As explained above.
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
##########
@@ -354,9 +393,13 @@ public void validate(PipelineOptions options) {
PCollection<FileResult<DestinationT>> tempFileResults =
(getComputeNumShards() == null && getNumShardsProvider() == null)
- ? input.apply(
- "WriteUnshardedBundlesToTempFiles",
- new WriteUnshardedBundlesToTempFiles(destinationCoder,
fileResultCoder))
+ ? input.isBounded() == IsBounded.BOUNDED
+ ? input.apply(
+ "WriteUnshardedBundlesToTempFiles",
+ new WriteUnshardedBundlesToTempFiles(destinationCoder,
fileResultCoder))
+ : input.apply(
+ "WriteAutoShardedBundlesToTempFiles",
Review comment:
Done.
----------------------------------------------------------------
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]