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-9799] Automated validation for RTrackers. #11553

Merged
merged 1 commit into from May 4, 2020

Conversation

youngoli
Copy link
Contributor

Adds automated validation for RTrackers to the DoFn invokers. I ran the
ParDo benchmark with and without my change and got similar results, so
this doesn't seem to have an obvious performance impact.

Note that the currently documented benchmark number doesn't seem accurate before (or it's just my desktop that's different).

Benchmark before change:
BenchmarkParDo_EmitSumFn-6 948087 1918 ns/op 484 B/op 4 allocs/op

Benchmark after change:
BenchmarkParDo_EmitSumFn-6 681343 1919 ns/op 521 B/op 4 allocs/op

Note that exact numbers wavered a bunch. It seemed to average around 1900 ns/op, going as low as 1850 and up to 1950. I chose two examples that had similar runtimes.

The error message emitted looks like this to the end-user:

...
Caused by: java.lang.RuntimeException: Error received from SDK harness for instruction 2: process bundle failed for instruction 2 using plan 5-6 : <emitted error>
...

I was toying with making it a bit more descriptive, but it matches the structure you get when the user emits an error from ProcessElement, so I kept it as is for consistency.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

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 Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
Build Status
--- --- Build Status
XLang --- --- --- 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 Build Status
Portable --- Build Status --- ---

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

@youngoli
Copy link
Contributor Author

Completely forgot to actually send this for review.

R: @lostluck

@youngoli youngoli requested a review from lostluck April 30, 2020 02:08
Copy link
Contributor

@lostluck lostluck left a comment

Choose a reason for hiding this comment

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

Just the one question really.

} else {
return errors.New("RTracker IsDone failed for unspecified reason")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
} else {
return errors.New("RTracker IsDone failed for unspecified reason")
}
}
return errors.New("RTracker.IsDone() failed for unspecified reason")

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, in both places this is called, error or no, we don't know IsDone failed(), we know that the DoFn terminated without fully processing the restriction (If I understand IsDone's semantics correctly). Perhaps the message should indicate that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good point. I'll rephrase it.

Adds automated validation for RTrackers to the DoFn invokers. I ran the
ParDo benchmark with and without my change and got similar results, so
this doesn't seem to have an obvious performance impact.
@youngoli youngoli merged commit 0b96845 into apache:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants