[ https://issues.apache.org/jira/browse/BEAM-5857?focusedWorklogId=163036&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-163036 ]
ASF GitHub Bot logged work on BEAM-5857: ---------------------------------------- Author: ASF GitHub Bot Created on: 06/Nov/18 12:47 Start Date: 06/Nov/18 12:47 Worklog Time Spent: 10m Work Description: iemejia 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_r231108475 ########## 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: can you inline this one at the rebase moment please too `return Iterables.isEmpty(result) ? Optional.absent() : Optional.of(result);`. ---------------------------------------------------------------- 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: 163036) Time Spent: 50m (was: 40m) > 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: 50m > 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)