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

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

                Author: ASF GitHub Bot
            Created on: 06/Nov/18 14:41
            Start Date: 06/Nov/18 14:41
    Worklog Time Spent: 10m 
      Work Description: mareksimunek commented on a change in pull request 
#6829: [BEAM-5857] Fix: unnecessary submission of a new job when calling inp…
URL: https://github.com/apache/beam/pull/6829#discussion_r231147390
 
 

 ##########
 File path: 
runners/spark/src/main/java/org/apache/beam/runners/spark/translation/GroupCombineFunctions.java
 ##########
 @@ -131,7 +128,13 @@
               return CoderHelpers.toByteArray(merged, iterAccumCoder);
             });
 
-    return Optional.of(CoderHelpers.fromByteArray(accumulatedBytes, 
iterAccumCoder));
+    final Iterable<WindowedValue<AccumT>> result =
+        CoderHelpers.fromByteArray(accumulatedBytes, iterAccumCoder);
+    if (Iterables.isEmpty(result)) {
 
 Review comment:
   done

----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 163078)
    Time Spent: 1h  (was: 50m)

> Unnecessary submission of a new job in Combine.globally
> -------------------------------------------------------
>
>                 Key: BEAM-5857
>                 URL: https://issues.apache.org/jira/browse/BEAM-5857
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-spark
>    Affects Versions: 2.7.0
>            Reporter: Marek Simunek
>            Assignee: Marek Simunek
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> When calling `rdd.isEmpty()`, it submits new job, which is not optimal. This 
> happens in Combine.globally translation where its 
> [called|https://github.com/apache/beam/blob/master/runners/spark/src/main/java/org/apache/beam/runners/spark/translation/GroupCombineFunctions.java#L102].



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

Reply via email to