[
https://issues.apache.org/jira/browse/BEAM-7574?focusedWorklogId=280268&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-280268
]
ASF GitHub Bot logged work on BEAM-7574:
----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Jul/19 08:28
Start Date: 22/Jul/19 08:28
Worklog Time Spent: 10m
Work Description: RyanSkraba commented on pull request #8946: [BEAM-7574]
fix Combine performance for SparkRunner
URL: https://github.com/apache/beam/pull/8946#discussion_r305434051
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/util/WindowedValue.java
##########
@@ -177,11 +182,19 @@ public int hashCode() {
private static final Collection<? extends BoundedWindow> GLOBAL_WINDOWS =
Collections.singletonList(GlobalWindow.INSTANCE);
+ /** A {@link WindowedValue} which holds exactly single window per value. */
+ public interface SingleWindowedValue {
Review comment:
Hmmmm -- I'm a bit confused here -- WindowedValue isn't "closed" for
inheritance right? I'm not sure that anyone _would_ create a new WindowedValue
subtype, but if they do they'll have to ensure that they obey this contract.
In practice, I don't see any other subclasses of WindowedValue except for a
couple of zero-window placeholders in GDF runner.
As is, a "bad" subclass that returns true for isSingleWindowedValue() but
doesn't implement SingleWindowedValue would break SparkRunner. Is there a
cleaner solution for the core classes?
(This might just might be a requirement to add to the Javadoc, or a
misunderstanding on my part...)
----------------------------------------------------------------
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: 280268)
Time Spent: 3h 40m (was: 3.5h)
> Spark runner: Combine.perKey performance issues
> -----------------------------------------------
>
> Key: BEAM-7574
> URL: https://issues.apache.org/jira/browse/BEAM-7574
> Project: Beam
> Issue Type: Improvement
> Components: runner-spark
> Affects Versions: 2.13.0
> Reporter: Jan Lukavský
> Assignee: Jan Lukavský
> Priority: Major
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> Combine.perKey on current implementation uses technique of creating an
> accumulator for each input key and then merge all these accumulators
> together. Optimize this by:
> * changing accumulator from Iterable to Map, and using addInput as much as
> possible
> * try to move the window explode to pre-shuffle (add window label to key for
> non-merging windows), measure the impact, and if the impact is substantial,
> implement that for at leasit window functions assigning to single (global)
> window or single window per element (tumbling windows)
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)