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-1780] BigtableIO: better handling of bad split requests #2298

Closed
wants to merge 2 commits into from

Conversation

dhalperi
Copy link
Contributor

The contract for splitIntoFraction is that it should only throw if the
reader is in an unknown, bad state. The proper way to reject invalid or
unsatisfiable split requests is to return null.

However, BigtableIO.Read will currently throw for simply invalid input
it should reject. This can lead to less effective dynamic work
rebalancing and even stuck jobs.

Related to, but probably not a complete solution for, BEAM-1751.

The contract for `splitIntoFraction` is that it should only throw if the
reader is in an unknown, bad state. The proper way to reject invalid or
unsatisfiable split requests is to return null.

However, `BigtableIO.Read` will currently throw for simply invalid input
it should reject. This can lead to less effective dynamic work
rebalancing and even stuck jobs.

Related to, but probably not a complete solution for, BEAM-1751.
@dhalperi
Copy link
Contributor Author

R: @tgroh

public final synchronized BigtableSource splitAtFraction(double fraction) {
ByteKey splitKey;
try {
splitKey = rangeTracker.getRange().interpolateKey(fraction);
} catch (IllegalArgumentException e) {
} catch (Exception e) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

explicit broadening to catch unanticipated exceptions, as they can still not put the reader in a bad state.

@dhalperi
Copy link
Contributor Author

@asfbot
Copy link

asfbot commented Mar 23, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/8695/
--none--

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 70.15% when pulling 3172c0a on dhalperi:bigtable-fixes into 75b6567 on apache:master.

Copy link
Member

@tgroh tgroh left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 70.146% when pulling eee3d48 on dhalperi:bigtable-fixes into 75b6567 on apache:master.

@asfbot
Copy link

asfbot commented Mar 23, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/8723/
--none--

@asfgit asfgit closed this in c48fa27 Mar 23, 2017
@dhalperi
Copy link
Contributor Author

Thanks!

@dhalperi dhalperi deleted the bigtable-fixes branch March 23, 2017 17:34
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

4 participants