HBASE-29696 Fix incorrect TableInputFormat split boundaries#8491
Open
Sigma-Ma wants to merge 1 commit into
Open
HBASE-29696 Fix incorrect TableInputFormat split boundaries#8491Sigma-Ma wants to merge 1 commit into
Sigma-Ma wants to merge 1 commit into
Conversation
noslowerdna
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Restore the original start and end rows after
Bytes.splitcalculates the intermediate split keys inTableInputFormatBase#createNInputSplitsUniform.Synthetic finite boundaries are still used internally for calculating the split keys, but they are no longer exposed as the boundaries of the first and last generated
TableSplit.A regression test was added to cover both empty and non-empty start rows with an open-ended range. The test also verifies continuity between adjacent splits.
Why are the changes needed?
An empty end row represents an unbounded scan in HBase.
createNInputSplitsUniformtemporarily replaces it with a finite all-0xFFkey so thatBytes.splitcan calculate intermediate keys.Previously, this temporary key was also used as the end row of the final
TableSplit. Since scan stop rows are exclusive, rows equal to or lexicographically greater than the synthetic key, such as0xFFFF, could be skipped.Restoring the original empty end row keeps the final split open-ended and preserves the complete input range.
How was this patch tested?
Added
TestTableInputFormatBase#testCreateNInputSplitsUniformPreservesOriginalBoundaries, covering:The regression test was run with:
mvn -pl hbase-mapreduce -am
-Dtest=TestTableInputFormatBase#testCreateNInputSplitsUniformPreservesOriginalBoundaries
-Dsurefire.failIfNoSpecifiedTests=false test