This is an automated email from the ASF dual-hosted git repository.

junegunn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 125ae77427f HBASE-30365 Skip the MOB pseudo-region when building 
snapshot input splits (#8626)
125ae77427f is described below

commit 125ae77427fb7758235beaa09de91ca6108729a7
Author: Junegunn Choi <[email protected]>
AuthorDate: Tue Sep 8 12:39:02 2026 +0900

    HBASE-30365 Skip the MOB pseudo-region when building snapshot input splits 
(#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 <[email protected]>
---
 .../apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
 
b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
index 633a9b25cdd..e44d003cf5b 100644
--- 
a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
+++ 
b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
@@ -43,6 +43,7 @@ import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Scan.ReadType;
 import org.apache.hadoop.hbase.client.TableDescriptor;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.mob.MobUtils;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.snapshot.RestoreSnapshotHelper;
 import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;
@@ -361,6 +362,11 @@ public class TableSnapshotInputFormatImpl {
       if (hri.isOffline() && (hri.isSplit() || hri.isSplitParent())) {
         continue;
       }
+      // The mob region is a dummy region used only to organise mob files 
under mobdir. It has no
+      // region directory under the table dir to open, and holds no rows. See 
HBASE-30365.
+      if (MobUtils.isMobRegionInfo(hri)) {
+        continue;
+      }
       regionInfos.add(hri);
     }
     return regionInfos;

Reply via email to