[
https://issues.apache.org/jira/browse/BEAM-5974?focusedWorklogId=163344&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-163344
]
ASF GitHub Bot logged work on BEAM-5974:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Nov/18 03:32
Start Date: 07/Nov/18 03:32
Worklog Time Spent: 10m
Work Description: swegner closed pull request #6971: [BEAM-5974] Minor
fixes for comments on PR/6949.
URL: https://github.com/apache/beam/pull/6971
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.java
index 52ee359135f..457c19e876c 100644
---
a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.java
+++
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.java
@@ -63,7 +63,7 @@ public synchronized ByteKeyRange checkpoint() {
// If we haven't done any work, we should return the original range we
were processing
// as the checkpoint.
if (lastAttemptedKey == null) {
- ByteKeyRange rval = ByteKeyRange.of(range.getStartKey(),
range.getEndKey());
+ ByteKeyRange rval = range;
// We update our current range to an interval that contains no elements.
range = NO_KEYS;
return rval;
@@ -87,11 +87,14 @@ public synchronized ByteKeyRange checkpoint() {
/**
* Attempts to claim the given key.
*
- * <p>Must be larger than the last attempted key. Note that passing in
{@link ByteKey#EMPTY}
- * claims all keys to the end of range and can only be claimed once.
+ * <p>Must be larger than the last attempted key. Since this restriction
tracker represents a
+ * range over a semi-open bounded interval {@code [start, end)}, the last
key that was attempted
+ * may have failed but still have consumed the interval {@code
[lastAttemptedKey, end)} since this
+ * range tracker processes keys in a monotonically increasing order. Note
that passing in {@link
+ * ByteKey#EMPTY} claims all keys to the end of range and can only be
claimed once.
*
* @return {@code true} if the key was successfully claimed, {@code false}
if it is outside the
- * current {@link ByteKeyRange} of this tracker (in that case this
operation is a no-op).
+ * current {@link ByteKeyRange} of this tracker.
*/
@Override
protected synchronized boolean tryClaimImpl(ByteKey key) {
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 163344)
Time Spent: 2h 20m (was: 2h 10m)
> Migrate ByteKeyRangeTracker to use tryClaim(ByteKey.EMPTY) as end of range
> claim instead of markDone
> ----------------------------------------------------------------------------------------------------
>
> Key: BEAM-5974
> URL: https://issues.apache.org/jira/browse/BEAM-5974
> Project: Beam
> Issue Type: Bug
> Components: io-java-hbase, sdk-java-core
> Affects Versions: 2.8.0
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Priority: Major
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> org.apache.beam.sdk.transforms.splittabledofn.ByteKeyRangeTracker doesn't
> handle tryClaim(ByteKey.EMPTY) and the related doneness check or
> checkpointing since doneness checking can't handle the empty interval,
> checkpointing returns invalid checkpoints or errors out since it is using the
> lastClaimedKey vs the lastAttemptedKey for doneness checking
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)