HBASE-30288 Fix WALPlayer bulk output table mappings - #8557
Open
Sigma-Ma wants to merge 1 commit into
Open
Conversation
Signed-off-by: mazhengxuan <mazhengxuan@didiglobal.com>
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.
JIRA: https://issues.apache.org/jira/browse/HBASE-30288
What changes were proposed in this pull request?
This PR makes WALPlayer honor source-to-target table mappings when generating bulk-output HFiles.
The bulk mapper now builds the mapping from
TABLES_KEYandTABLE_MAP_KEY, keeps source table names for WAL filtering, and emits mapped target table names in multi-table composite keys. The bulk job is also configured with target table descriptors and region locators.The existing bulk-load test now uses distinct source and target tables, with the target table pre-split using a different region layout, and verifies that the generated HFiles can be loaded into the mapped target table.
Why are the changes needed?
Before this change, the bulk-output path ignored the target table mappings.
WALKeyValueMapperemitted source table names, andcreateSubmittableJobconfiguredHFileOutputFormatwith source table metadata.As a result, HFiles could be generated under the wrong table path and with region boundaries or table descriptors belonging to the source table, preventing them from being correctly bulk-loaded into the intended target table.
How was this patch tested?