You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2022/06/05 23:40:01 UTC
[hbase] branch branch-2.5 updated: HBASE-27017: MOB snapshot is broken when FileBased SFT is used (#4466)
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new 8139cf64779 HBASE-27017: MOB snapshot is broken when FileBased SFT is used (#4466)
8139cf64779 is described below
commit 8139cf64779ffd99e3b73fe612e0b2d8d38f9bca
Author: BukrosSzabolcs <sz...@cloudera.com>
AuthorDate: Sun Jun 5 20:51:28 2022 +0200
HBASE-27017: MOB snapshot is broken when FileBased SFT is used (#4466)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../org/apache/hadoop/hbase/snapshot/SnapshotManifest.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
index 8f5a4e32c6b..7dbf5b0655e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotManifest.java
@@ -36,6 +36,7 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
import org.apache.hadoop.hbase.client.RegionInfo;
import org.apache.hadoop.hbase.client.TableDescriptor;
import org.apache.hadoop.hbase.errorhandling.ForeignExceptionSnare;
@@ -310,7 +311,17 @@ public final class SnapshotManifest {
for (ColumnFamilyDescriptor cfd : htd.getColumnFamilies()) {
Object familyData = visitor.familyOpen(regionData, cfd.getName());
monitor.rethrowException();
- StoreFileTracker tracker = StoreFileTrackerFactory.create(conf, htd, cfd, regionFs);
+ StoreFileTracker tracker = null;
+ if (isMobRegion) {
+ // MOB regions are always using the default SFT implementation
+ ColumnFamilyDescriptor defaultSFTCfd = ColumnFamilyDescriptorBuilder.newBuilder(cfd)
+ .setValue(StoreFileTrackerFactory.TRACKER_IMPL,
+ StoreFileTrackerFactory.Trackers.DEFAULT.name())
+ .build();
+ tracker = StoreFileTrackerFactory.create(conf, htd, defaultSFTCfd, regionFs);
+ } else {
+ tracker = StoreFileTrackerFactory.create(conf, htd, cfd, regionFs);
+ }
List<StoreFileInfo> storeFiles = tracker.load();
if (storeFiles.isEmpty()) {
LOG.debug("No files under family: {}", cfd.getNameAsString());