[ 
https://issues.apache.org/jira/browse/BEAM-10475?focusedWorklogId=522010&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-522010
 ]

ASF GitHub Bot logged work on BEAM-10475:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Dec/20 02:36
            Start Date: 09/Dec/20 02:36
    Worklog Time Spent: 10m 
      Work Description: udim commented on a change in pull request #13493:
URL: https://github.com/apache/beam/pull/13493#discussion_r538958762



##########
File path: sdks/python/apache_beam/transforms/util.py
##########
@@ -785,7 +788,6 @@ def expand(self, pcoll):
 
   @experimental()
   @typehints.with_input_types(Tuple[K, V])
-  @typehints.with_output_types(Tuple[K, Iterable[V]])

Review comment:
       I don't believe you need infer_output_type if you have the 
with_output_types decorator.
   
   Also, I tested this a bit myself and it ended up looking like this:
   ```py
     @typehints.with_input_types(typehints.Tuple[K_i, V_i])
     @typehints.with_output_types(typehints.Tuple[ShardedKeyType[K_i], 
typehints.Iterable[V_i]])
     class WithShardedKey(PTransform):
   ```
   
   where:
   ```py
   K_i = typehints.TypeVariable('K_i')
   V_i = typehints.TypeVariable('V_i')
   ```
   
   edit: not sure if `with_input_types` needs to change but it looks consistent




----------------------------------------------------------------
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: 522010)
    Time Spent: 24h 50m  (was: 24h 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: 24h 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)

Reply via email to