HBASE-9189 IncreasingToUpperBoundRegionSplitPolicy.shouldSplit() should check all the stores before returning
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1513262 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
99efcdaa6c
commit
3ac06a5ce1
|
@ -80,7 +80,6 @@ extends ConstantSizeRegionSplitPolicy {
|
|||
" size=" + size + ", sizeToCheck=" + sizeToCheck +
|
||||
", regionsWithCommonTable=" + tableRegionsCount);
|
||||
foundABigStore = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||
* The region configured for this split policy.
|
||||
*/
|
||||
protected HRegion region;
|
||||
|
||||
|
||||
/**
|
||||
* Upon construction, this method will be called with the region
|
||||
* to be governed. It will be called once and only once.
|
||||
|
@ -54,7 +54,7 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||
this.region == null,
|
||||
"Policy already configured for region {}",
|
||||
this.region);
|
||||
|
||||
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||
largestStoreSize = storeSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return splitPointFromLargestStore;
|
||||
}
|
||||
|
||||
|
@ -98,14 +98,13 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||
*/
|
||||
public static RegionSplitPolicy create(HRegion region,
|
||||
Configuration conf) throws IOException {
|
||||
|
||||
Class<? extends RegionSplitPolicy> clazz = getSplitPolicyClass(
|
||||
region.getTableDesc(), conf);
|
||||
RegionSplitPolicy policy = ReflectionUtils.newInstance(clazz, conf);
|
||||
policy.configureForRegion(region);
|
||||
return policy;
|
||||
}
|
||||
|
||||
|
||||
static Class<? extends RegionSplitPolicy> getSplitPolicyClass(
|
||||
HTableDescriptor htd, Configuration conf) throws IOException {
|
||||
String className = htd.getRegionSplitPolicyClassName();
|
||||
|
@ -125,5 +124,4 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||
e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue