[
https://issues.apache.org/jira/browse/BEAM-8292?focusedWorklogId=408536&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-408536
]
ASF GitHub Bot logged work on BEAM-8292:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Mar/20 04:20
Start Date: 24/Mar/20 04:20
Worklog Time Spent: 10m
Work Description: youngoli commented on pull request #11197: [BEAM-8292]
Portable Reshuffle for Go SDK
URL: https://github.com/apache/beam/pull/11197#discussion_r396887810
##########
File path: sdks/go/pkg/beam/gbk.go
##########
@@ -95,3 +95,52 @@ func TryCoGroupByKey(s Scope, cols ...PCollection)
(PCollection, error) {
ret.SetCoder(NewCoder(ret.Type()))
return ret, nil
}
+
+// Reshuffle copies a PCollection of the same kind and using the same element
+// coder, and maintains the same windowing information. Importantly, it allows
+// the result PCollection to be processed with a different sharding, in a
+// different stage than the input PCollection.
+//
+// For example, if a computation needs a lot of parallelism but
+// produces only a small amount of output data, then the computation
+// producing the data can run with as much parallelism as needed,
+// while the output file is written with a smaller amount of
+// parallelism, using the following pattern:
+//
+// pc := bigHairyComputationNeedingParallelism(scope) // PCollection<string>
+// resharded := beam.Reshard(scope, pc) // PCollection<string>
Review comment:
Here and elsewhere in this comment, Reshuffle is referred to as "Reshard". I
think it's fine to refer to it as a reshard informally, since that's what it
functionally is, but the places where it's used as a proper noun should be
switched to Reshuffle.
----------------------------------------------------------------
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: 408536)
Time Spent: 2h 10m (was: 2h)
> Add a Reshuffle PTransform preventing fusion of the surrounding transforms
> --------------------------------------------------------------------------
>
> Key: BEAM-8292
> URL: https://issues.apache.org/jira/browse/BEAM-8292
> Project: Beam
> Issue Type: New Feature
> Components: sdk-go
> Reporter: John Patoch
> Assignee: Robert Burke
> Priority: Minor
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> Reshuffle is a PTransform that takes a PCollection<A> and shuffles the data
> to help increase parallelism.
> Reshuffle adds a temporary random key to each element, performs a
> GroupByKey, and finally removes the temporary key.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)