[
https://issues.apache.org/jira/browse/BEAM-5865?focusedWorklogId=235719&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-235719
]
ASF GitHub Bot logged work on BEAM-5865:
----------------------------------------
Author: ASF GitHub Bot
Created on: 01/May/19 08:14
Start Date: 01/May/19 08:14
Worklog Time Spent: 10m
Work Description: JozoVilcek commented on pull request #8438: [BEAM-5865]
Allow custom sharding functions in WriteFiles
URL: https://github.com/apache/beam/pull/8438#discussion_r280023382
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
##########
@@ -624,17 +654,42 @@ private WriteShardedBundlesToTempFiles(
if (numShardsView != null) {
shardingSideInputs.add(numShardsView);
}
- return input
- .apply(
- "ApplyShardingKey",
- ParDo.of(new ApplyShardingKeyFn(numShardsView, destinationCoder))
- .withSideInputs(shardingSideInputs))
- .setCoder(KvCoder.of(ShardedKeyCoder.of(VarIntCoder.of()),
input.getCoder()))
- .apply("GroupIntoShards", GroupByKey.create())
- .apply(
- "WriteShardsIntoTempFiles",
- ParDo.of(new
WriteShardsIntoTempFilesFn()).withSideInputs(getSideInputs()))
- .setCoder(fileResultCoder);
+
+ if (getShardingFunction() == null) {
Review comment:
Here, topology of pipeline is changing depending on available sharding
function. In maling list @reuvenlax mentioned :
`
Initial thought on PR: we usually try to limit changing coders in these
types of transforms to better support runners that allow in-place updates of
pipelines. Can this be done without changing the coder?
`
Yes, switching sharding finctions (and having runner with restore / upgrade
functionality) can lead to GBK state having different values in there which
needs to be carefully decoded. @reuvenlax Is this what you were referring to?
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 235719)
Time Spent: 20m (was: 10m)
> Auto sharding of streaming sinks in FlinkRunner
> -----------------------------------------------
>
> Key: BEAM-5865
> URL: https://issues.apache.org/jira/browse/BEAM-5865
> Project: Beam
> Issue Type: Improvement
> Components: runner-flink
> Reporter: Maximilian Michels
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The Flink Runner should do auto-sharding of streaming sinks, similar to
> BEAM-1438. That way, the user doesn't have to set shards manually which
> introduces additional shuffling and might cause skew in the distribution of
> data.
> As per discussion:
> https://lists.apache.org/thread.html/7b92145dd9ae68da1866f1047445479f51d31f103d6407316bb4114c@%3Cuser.beam.apache.org%3E
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)