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

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

                Author: ASF GitHub Bot
            Created on: 30/Jan/19 21:29
            Start Date: 30/Jan/19 21:29
    Worklog Time Spent: 10m 
      Work Description: katsiapis commented on pull request #7661: [BEAM-4030] 
Add CombineFn.compact for Python.
URL: https://github.com/apache/beam/pull/7661#discussion_r252444171
 
 

 ##########
 File path: sdks/python/apache_beam/transforms/core.py
 ##########
 @@ -611,6 +610,23 @@ def merge_accumulators(self, accumulators, *args, 
**kwargs):
     """
     raise NotImplementedError(str(self))
 
+  def compact_accumulator(self, accumulator, *args, **kwargs):
 
 Review comment:
   Should this be just "compact" in analogy to Beam Java? Existing code assumes 
that [1]. 
   
   If we go with "compact_accumulator" we should devise a quick 
backward/forward compatibility path for migration of existing users of it. This 
might not be too hard actually.
   
   (Similarly elsewhere that this applies).
   
   [1] Search for "TODO(BEAM-4030)" within this file.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 192506)
    Time Spent: 1.5h  (was: 1h 20m)

> Add CombineFn.compact, similar to Java
> --------------------------------------
>
>                 Key: BEAM-4030
>                 URL: https://issues.apache.org/jira/browse/BEAM-4030
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Robert Bradshaw
>            Assignee: Robert Bradshaw
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Some CombineFns buffer elements in their add_inputs because a combining 
> operation cost can be effectively amortized across many elements. However, 
> this introduces the extra (possibly higher) cost of potentially serializing 
> more expensive buffers through shuffle. We should add a 
> CombineFn.compact(self, accumulator) method (defaulting to the identity) 
> similar to what the Java SDK provides which is called when flushing an 
> element from the PGBKCV table. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to