[
https://issues.apache.org/jira/browse/BEAM-10475?focusedWorklogId=519909&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-519909
]
ASF GitHub Bot logged work on BEAM-10475:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Dec/20 22:54
Start Date: 03/Dec/20 22:54
Worklog Time Spent: 10m
Work Description: nehsyc commented on a change in pull request #13474:
URL: https://github.com/apache/beam/pull/13474#discussion_r535706100
##########
File path: sdks/python/apache_beam/coders/coders.py
##########
@@ -1485,6 +1486,21 @@ def as_cloud_object(self, coders_context=None):
],
}
+ def to_type_hint(self):
+ from apache_beam.typehints import sharded_key_type
+ return sharded_key_type.ShardedKeyTypeConstraint(
+ self._key_coder.to_type_hint())
+
+ @staticmethod
+ def from_type_hint(typehint, registry):
+ from apache_beam.typehints import sharded_key_type
+ if isinstance(typehint, sharded_key_type.ShardedKeyTypeConstraint):
+ return ShardedKeyCoder(registry.get_coder(typehint.key_type))
+ else:
+ raise ValueError((
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 519909)
Time Spent: 20h 50m (was: 20h 40m)
> GroupIntoBatches with Runner-determined Sharding
> ------------------------------------------------
>
> Key: BEAM-10475
> URL: https://issues.apache.org/jira/browse/BEAM-10475
> Project: Beam
> Issue Type: Improvement
> Components: runner-dataflow
> Reporter: Siyuan Chen
> Assignee: Siyuan Chen
> Priority: P2
> Labels: GCP, performance
> Time Spent: 20h 50m
> Remaining Estimate: 0h
>
> [https://s.apache.org/sharded-group-into-batches|https://s.apache.org/sharded-group-into-batches__]
> Improve the existing Beam transform, GroupIntoBatches, to allow runners to
> choose different sharding strategies depending on how the data needs to be
> grouped. The goal is to help with the situation where the elements to process
> need to be co-located to reduce the overhead that would otherwise be incurred
> per element, while not losing the ability to scale the parallelism. The
> essential idea is to build a stateful DoFn with shardable states.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)