You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2019/08/09 00:01:15 UTC
[hbase] branch branch-2.2 updated: HBASE-22808: HBCK Report showed
the offline regions which belong to disabled table (addendum)
This is an automated email from the ASF dual-hosted git repository.
zghao pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new 044e768 HBASE-22808: HBCK Report showed the offline regions which belong to disabled table (addendum)
044e768 is described below
commit 044e768eafc7bd9177efc6df4a95ca6c492bba5b
Author: Guanghao Zhang <zg...@apache.org>
AuthorDate: Thu Aug 8 18:06:02 2019 +0800
HBASE-22808: HBCK Report showed the offline regions which belong to disabled table (addendum)
---
.../java/org/apache/hadoop/hbase/regionserver/HRegion.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 0123cd7..2ddd5ac 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -7086,6 +7086,18 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
return region;
}
+ /**
+ * Create the region directory in the filesystem.
+ */
+ public static HRegionFileSystem createRegionDir(Configuration configuration, RegionInfo ri,
+ Path rootDir) throws IOException {
+ FileSystem fs = rootDir.getFileSystem(configuration);
+ Path tableDir = FSUtils.getTableDir(rootDir, ri.getTable());
+ // If directory already exists, will log warning and keep going. Will try to create
+ // .regioninfo. If one exists, will overwrite.
+ return HRegionFileSystem.createRegionOnFileSystem(configuration, fs, tableDir, ri);
+ }
+
public static HRegion createHRegion(final RegionInfo info, final Path rootDir,
final Configuration conf,
final TableDescriptor hTableDescriptor,