Skip to content

HBASE-30365 Skip the MOB pseudo-region when building snapshot input splits - #8626

Merged
junegunn merged 1 commit into
apache:masterfrom
junegunn:HBASE-30365
Sep 8, 2026
Merged

junegunn merged 1 commit into
apache:masterfrom
junegunn:HBASE-30365

Conversation

@junegunn

@junegunn junegunn commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Jira: HBASE-30365

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.

mvn -pl hbase-mapreduce test -Dtest='TestCopyTable#testLoadingSnapshotAndBulkLoadToMobTable+tsetLoadingSnapshotToMobTable'

…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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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.getRegionInfosFromManifest using MobUtils.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.

@liuxiaocs7 liuxiaocs7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fix!

@junegunn
junegunn merged commit 125ae77 into apache:master Sep 8, 2026
8 checks passed
@junegunn

junegunn commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Thanks @liuxiaocs7 for the review!

junegunn added a commit that referenced this pull request Sep 8, 2026
…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>
junegunn added a commit that referenced this pull request Sep 8, 2026
…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>
junegunn added a commit that referenced this pull request Sep 8, 2026
…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>
junegunn added a commit that referenced this pull request Sep 8, 2026
…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>
@liuxiaocs7

Copy link
Copy Markdown
Member

Hi, @junegunn, do we need to backport HBASE-30365 for branch-2.5?

@junegunn

Copy link
Copy Markdown
Member Author

I skipped branch 2.5 because HBASE-30336 was not in it. Let me know if I'm mistaken.

@liuxiaocs7

liuxiaocs7 commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Hi, @junegunn, when I backport HBASE-30368 for branch-2.x, I find that TestCopyTable.testLoadingSnapshotAndBulkLoadToMobTable and TestCopyTable.tsetLoadingSnapshotToMobTable seems fails on branch-2.5 now, it is not introduced by HBASE-30336, let me file a new jira issue to track this.

Thanks!

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.

3 participants