Repository navigation
HBASE-30365 Skip the MOB pseudo-region when building snapshot input splits - #8626
Conversation
…plits TableSnapshotInputFormatImpl.getRegionInfosFromManifest creates a split for every region in the snapshot manifest, and a MOB snapshot manifest includes the MOB pseudo-region from MobUtils.getMobRegionInfo. Each split is then opened as a real region under the restore dir. HBASE-30336 correctly stopped writing a .regioninfo for that pseudo-region under the table dir, so opening it now fails with "Region directory does not exist". Skip it, next to the existing offline-split filter. Behaviour preserving: the pseudo-region's family files live under mobdir, so the split opened a region with no store files and returned zero rows. MOB values are read through references in the data regions, not by scanning the pseudo-region. Covered by the existing TestCopyTable MOB snapshot tests, which fail without this change.
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, targeted, and removes a known-invalid region from split generation without impacting real data-region scanning behavior.
Pull request overview
This PR fixes MapReduce snapshot scanning for MOB-enabled tables by preventing TableSnapshotInputFormatImpl from generating an input split for the MOB pseudo-region present in MOB snapshot manifests, avoiding failures when attempting to open it under the restored table directory.
Changes:
- Skip the MOB pseudo-region in
TableSnapshotInputFormatImpl.getRegionInfosFromManifestusingMobUtils.isMobRegionInfo. - Add an explanatory comment describing why the MOB pseudo-region must not be treated as a real region input split.
File summaries
| File | Description |
|---|---|
| hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java | Filters MOB pseudo-region out of snapshot manifest region list to prevent invalid split creation/open failures. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks @liuxiaocs7 for the review! |
…plits (#8626) TableSnapshotInputFormatImpl.getRegionInfosFromManifest creates a split for every region in the snapshot manifest, and a MOB snapshot manifest includes the MOB pseudo-region from MobUtils.getMobRegionInfo. Each split is then opened as a real region under the restore dir. HBASE-30336 correctly stopped writing a .regioninfo for that pseudo-region under the table dir, so opening it now fails with "Region directory does not exist". Skip it, next to the existing offline-split filter. Behaviour preserving: the pseudo-region's family files live under mobdir, so the split opened a region with no store files and returned zero rows. MOB values are read through references in the data regions, not by scanning the pseudo-region. Covered by the existing TestCopyTable MOB snapshot tests, which fail without this change. Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
…plits (#8626) TableSnapshotInputFormatImpl.getRegionInfosFromManifest creates a split for every region in the snapshot manifest, and a MOB snapshot manifest includes the MOB pseudo-region from MobUtils.getMobRegionInfo. Each split is then opened as a real region under the restore dir. HBASE-30336 correctly stopped writing a .regioninfo for that pseudo-region under the table dir, so opening it now fails with "Region directory does not exist". Skip it, next to the existing offline-split filter. Behaviour preserving: the pseudo-region's family files live under mobdir, so the split opened a region with no store files and returned zero rows. MOB values are read through references in the data regions, not by scanning the pseudo-region. Covered by the existing TestCopyTable MOB snapshot tests, which fail without this change. Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
…plits (#8626) TableSnapshotInputFormatImpl.getRegionInfosFromManifest creates a split for every region in the snapshot manifest, and a MOB snapshot manifest includes the MOB pseudo-region from MobUtils.getMobRegionInfo. Each split is then opened as a real region under the restore dir. HBASE-30336 correctly stopped writing a .regioninfo for that pseudo-region under the table dir, so opening it now fails with "Region directory does not exist". Skip it, next to the existing offline-split filter. Behaviour preserving: the pseudo-region's family files live under mobdir, so the split opened a region with no store files and returned zero rows. MOB values are read through references in the data regions, not by scanning the pseudo-region. Covered by the existing TestCopyTable MOB snapshot tests, which fail without this change. Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
…plits (#8626) TableSnapshotInputFormatImpl.getRegionInfosFromManifest creates a split for every region in the snapshot manifest, and a MOB snapshot manifest includes the MOB pseudo-region from MobUtils.getMobRegionInfo. Each split is then opened as a real region under the restore dir. HBASE-30336 correctly stopped writing a .regioninfo for that pseudo-region under the table dir, so opening it now fails with "Region directory does not exist". Skip it, next to the existing offline-split filter. Behaviour preserving: the pseudo-region's family files live under mobdir, so the split opened a region with no store files and returned zero rows. MOB values are read through references in the data regions, not by scanning the pseudo-region. Covered by the existing TestCopyTable MOB snapshot tests, which fail without this change. Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
|
Hi, @junegunn, do we need to backport HBASE-30365 for branch-2.5? |
|
I skipped branch 2.5 because HBASE-30336 was not in it. Let me know if I'm mistaken. |
|
Hi, @junegunn, when I backport HBASE-30368 for branch-2.x, I find that Thanks! |
Jira: HBASE-30365
TableSnapshotInputFormatImpl.getRegionInfosFromManifestcreates a split for every region in the snapshot manifest, and a MOB snapshot manifest includes the MOB pseudo-region fromMobUtils.getMobRegionInfo. Each split is then opened as a real region under the restore dir.HBASE-30336 correctly stopped writing a
.regioninfofor that pseudo-region under the table dir, so opening it now fails with "Region directory does not exist".Skip it, next to the existing offline-split filter. Behaviour preserving: the pseudo-region's family files live under mobdir, so the split opened a region with no store files and returned zero rows. MOB values are read through references in the data regions, not by scanning the pseudo-region.
Covered by the existing
TestCopyTableMOB snapshot tests, which fail without this change.