Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-7044] portable Spark: support stateful dofns #8812

Merged
merged 1 commit into from Jun 11, 2019
Merged

Conversation

ibzib
Copy link
Contributor

@ibzib ibzib commented Jun 10, 2019

Depends on #8802.

We need a new custom group by key function so that we can run the executable stage function separately for each key, while keeping the original key/value pairs.

Something I'm not too proud of here is re-using helper functions within typing constraints set by guava Iterables.transform. These are all pretty trivial functions I could've just as easily copied into lambdas or something, so let me know what you think.

R: @iemejia @angoenka @mxm

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Python Build Status
Build Status
--- Build Status
Build Status
Build Status --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@ibzib
Copy link
Contributor Author

ibzib commented Jun 10, 2019

Run Java Spark PortableValidatesRunner Batch

@ibzib
Copy link
Contributor Author

ibzib commented Jun 10, 2019

Run Java Spark PortableValidatesRunner Batch

@ibzib
Copy link
Contributor Author

ibzib commented Jun 10, 2019

Run Python Spark ValidatesRunner

@ibzib
Copy link
Contributor Author

ibzib commented Jun 10, 2019

Run Java PreCommit

@iemejia
Copy link
Member

iemejia commented Jun 11, 2019

#8802 is merged now, please rebase it. Java precommit is breaking because checkstyle is not happy about some javadoc issue.

@@ -109,8 +109,7 @@ def portableValidatesRunnerTask(String name) {
excludeCategories 'org.apache.beam.sdk.testing.UsesMapState'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, there is only bagstate for now.

Copy link
Contributor

@mxm mxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see this come along. Some comments inline.


// Need to discard the old key's state
if (bagUserStateHandlerFactory != null) {
bagUserStateHandlerFactory.resetForNewKey();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are resetting, but further down you create a new instance of bagUserStateHandlerFactory.

@ibzib ibzib force-pushed the state branch 2 times, most recently from 60afe63 to b3d4746 Compare June 11, 2019 18:45
@ibzib
Copy link
Contributor Author

ibzib commented Jun 11, 2019

Run Java Spark PortableValidatesRunner Batch

@ibzib
Copy link
Contributor Author

ibzib commented Jun 11, 2019

Run Python Spark ValidatesRunner

Copy link
Contributor

@mxm mxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mxm mxm merged commit 4f22c54 into apache:master Jun 11, 2019
@ibzib
Copy link
Contributor Author

ibzib commented Jun 11, 2019

@iemejia Rebased and fixed Javadoc. Please take a look at the Spark stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants