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

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

                Author: ASF GitHub Bot
            Created on: 20/Mar/19 16:05
            Start Date: 20/Mar/19 16:05
    Worklog Time Spent: 10m 
      Work Description: dmvk commented on pull request #8042: [BEAM-6812]: 
Create a custom hash partitioner that deals with arrays during spark combines
URL: https://github.com/apache/beam/pull/8042#discussion_r267419708
 
 

 ##########
 File path: 
runners/spark/src/main/java/org/apache/beam/runners/spark/translation/GroupCombineFunctions.java
 ##########
 @@ -146,20 +147,40 @@
     JavaPairRDD<K, WindowedValue<KV<K, InputT>>> inRddDuplicatedKeyPair =
         rdd.mapToPair(TranslationUtils.toPairByKeyInWindowedValue());
 
-    JavaPairRDD<K, SerializableAccumulator<KV<K, AccumT>>> accumulatedResult =
-        inRddDuplicatedKeyPair.combineByKey(
-            input ->
-                
SerializableAccumulator.of(sparkCombineFn.createCombiner(input), 
iterAccumCoder),
-            (acc, input) ->
-                SerializableAccumulator.of(
-                    sparkCombineFn.mergeValue(input, 
acc.getOrDecode(iterAccumCoder)),
-                    iterAccumCoder),
-            (acc1, acc2) ->
-                SerializableAccumulator.of(
-                    sparkCombineFn.mergeCombiners(
-                        acc1.getOrDecode(iterAccumCoder), 
acc2.getOrDecode(iterAccumCoder)),
-                    iterAccumCoder));
+    JavaPairRDD<K, SerializableAccumulator<KV<K, AccumT>>> accumulatedResult;
+    if (partitioner == null) {
 
 Review comment:
   We should get rid of `nullable` case and have one translation only, see note 
above
 
----------------------------------------------------------------
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: 216288)
    Time Spent: 1h 50m  (was: 1h 40m)

> HashPartitioning on Spark with arrays as keys produces unpredictable results
> ----------------------------------------------------------------------------
>
>                 Key: BEAM-6812
>                 URL: https://issues.apache.org/jira/browse/BEAM-6812
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-spark
>            Reporter: Ankit Jhalaria
>            Assignee: Ankit Jhalaria
>            Priority: Critical
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>




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

Reply via email to