HBASE-25339 Method parameter and member variable are duplicated in checkSplittable() of SplitTableRegionProcedure
Closes #2717 Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
a8a35da73e
commit
264412d30c
|
@ -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, bestSplitRow);
|
||||
checkSplittable(env, regionToSplit);
|
||||
final TableName table = regionToSplit.getTable();
|
||||
final long rid = getDaughterRegionIdTimestamp(regionToSplit);
|
||||
this.daughterOneRI = RegionInfoBuilder.newBuilder(table)
|
||||
|
@ -173,10 +173,9 @@ 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, final byte[] splitRow) throws IOException {
|
||||
final RegionInfo regionToSplit) 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.
|
||||
|
@ -227,12 +226,12 @@ public class SplitTableRegionProcedure
|
|||
|
||||
if (Bytes.equals(regionToSplit.getStartKey(), bestSplitRow)) {
|
||||
throw new DoNotRetryIOException(
|
||||
"Split row is equal to startkey: " + Bytes.toStringBinary(splitRow));
|
||||
"Split row is equal to startkey: " + Bytes.toStringBinary(bestSplitRow));
|
||||
}
|
||||
|
||||
if (!regionToSplit.containsRow(bestSplitRow)) {
|
||||
throw new DoNotRetryIOException("Split row is not inside region key range splitKey:" +
|
||||
Bytes.toStringBinary(splitRow) + " region: " + regionToSplit);
|
||||
Bytes.toStringBinary(bestSplitRow) + " region: " + regionToSplit);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue