[
https://issues.apache.org/jira/browse/BEAM-10042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17160743#comment-17160743
]
Beam JIRA Bot commented on BEAM-10042:
--------------------------------------
This issue is P2 but has been unassigned without any comment for 60 days so it
has been labeled "stale-P2". If this issue is still affecting you, we care!
Please comment and remove the label. Otherwise, in 14 days the issue will be
moved to P3.
Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed
explanation of what these priorities mean.
> Add alternate constructor to improve byte encoding performance in SortValues
> ----------------------------------------------------------------------------
>
> Key: BEAM-10042
> URL: https://issues.apache.org/jira/browse/BEAM-10042
> Project: Beam
> Issue Type: Improvement
> Components: extensions-java-sorter
> Reporter: Claire McGinty
> Priority: P2
> Labels: stale-P2
>
> The `SortValues` transform operates on key-groups of `KV<PrimaryKeyT,
> Iterable<KV<SecondaryKeyT, ValueT>>>`. From those key groups it iterates
> through each element and uses `CoderUtils.encodeToByteArray` on each
> SecondaryKeyT-ValueT pair. This operation can be expensive and its
> parallelism is limited by the # of key groups.
> I'd like to propose adding an alternative to `SortValuesDoFn` that operates
> on `KV<PrimaryKeyT, Iterable<KV<byte[], byte[]>>>` and can skip the encoding
> step within the key-group. The user's pipeline may be able to encode the data
> to bytes in a prior step in a much more parallelized and efficient way (i.e.
> in a `MapElements` transform). I've seen performance gains in every Dataflow
> metric from from patching this in my team's pipeline.
> (I would visualize the alternative vs pre-existing constructors to look
> similar to generic vs specific Avro constructors, where the generic
> constructor has a static type and specific Avro has a parameterized T.)
>
> What do you think?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)