Skip to content

Commit 0867714

Browse files
committed
HBASE-22771 [HBCK2] fixMeta method and server-side support
This is a first cut at this patch. Implements hold fixing only currently. Add a fixMeta method to Hbck Interface. M hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java Bug fix. If hole is on end of last table, I wasn't seeing it. A hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetaFixer.java Add a general meta fixer class. Explains up top why this stuff doesn't belong inside MetaTableAccessor. M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Break out the filesystem messing so don't have to copy it nor do more than is needed doing fixup for Region holes. M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java Change behavious slightly. If directory exists, don't fail as we did but try and keep going and create .regioninfo file if missing (or overwrite if in place). This should make it idempotent. Can rerun command. Lets see if any repercussions in test suite. A hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaFixer.java Add test. Signed-off-by: Zheng Hu <[email protected]> Signed-off-by: Guanghao Zhang <[email protected]>
1 parent 30805be commit 0867714

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@
182182
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.EnableTableResponse;
183183
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ExecProcedureRequest;
184184
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.ExecProcedureResponse;
185-
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FixMetaResponse;
186185
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FixMetaRequest;
186+
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.FixMetaResponse;
187187
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetClusterStatusRequest;
188188
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetClusterStatusResponse;
189189
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsRequest;

hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaFixer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
import org.apache.hadoop.hbase.HConstants;
2626
import org.apache.hadoop.hbase.MetaTableAccessor;
2727
import org.apache.hadoop.hbase.TableName;
28-
import org.apache.hadoop.hbase.client.Delete;
2928
import org.apache.hadoop.hbase.client.RegionInfo;
30-
import org.apache.hadoop.hbase.client.Table;
3129
import org.apache.hadoop.hbase.testclassification.LargeTests;
3230
import org.apache.hadoop.hbase.testclassification.MasterTests;
3331
import org.junit.AfterClass;

0 commit comments

Comments
 (0)