From a8a35da73e16101945505b38464616424fb6c674 Mon Sep 17 00:00:00 2001 From: Viraj Jasani Date: Mon, 30 Nov 2020 19:48:58 +0530 Subject: [PATCH] Revert "HBASE-25339 Method parameter and member variable are duplicated in checkSplittable() of SplitTableRegionProcedure" This reverts commit c76145c505384575d1efcebd85d5ae648a4a4268. --- .../master/assignment/SplitTableRegionProcedure.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java index e5b5fe9055e..59cc33f2d2a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java @@ -110,7 +110,7 @@ public class SplitTableRegionProcedure // we fail-fast on construction. There it skips the split with just a warning. checkOnline(env, regionToSplit); this.bestSplitRow = splitRow; - checkSplittable(env, regionToSplit); + checkSplittable(env, regionToSplit, bestSplitRow); final TableName table = regionToSplit.getTable(); final long rid = getDaughterRegionIdTimestamp(regionToSplit); this.daughterOneRI = RegionInfoBuilder.newBuilder(table) @@ -173,9 +173,10 @@ public class SplitTableRegionProcedure * Check whether the region is splittable * @param env MasterProcedureEnv * @param regionToSplit parent Region to be split + * @param splitRow if splitRow is not specified, will first try to get bestSplitRow from RS */ private void checkSplittable(final MasterProcedureEnv env, - final RegionInfo regionToSplit) throws IOException { + final RegionInfo regionToSplit, final byte[] splitRow) throws IOException { // Ask the remote RS if this region is splittable. // If we get an IOE, report it along w/ the failure so can see why we are not splittable at // this time. @@ -226,12 +227,12 @@ public class SplitTableRegionProcedure if (Bytes.equals(regionToSplit.getStartKey(), bestSplitRow)) { throw new DoNotRetryIOException( - "Split row is equal to startkey: " + Bytes.toStringBinary(bestSplitRow)); + "Split row is equal to startkey: " + Bytes.toStringBinary(splitRow)); } if (!regionToSplit.containsRow(bestSplitRow)) { throw new DoNotRetryIOException("Split row is not inside region key range splitKey:" + - Bytes.toStringBinary(bestSplitRow) + " region: " + regionToSplit); + Bytes.toStringBinary(splitRow) + " region: " + regionToSplit); } }