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 +
|
" size=" + size + ", sizeToCheck=" + sizeToCheck +
|
||||||
", regionsWithCommonTable=" + tableRegionsCount);
|
", regionsWithCommonTable=" + tableRegionsCount);
|
||||||
foundABigStore = true;
|
foundABigStore = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||||||
* The region configured for this split policy.
|
* The region configured for this split policy.
|
||||||
*/
|
*/
|
||||||
protected HRegion region;
|
protected HRegion region;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upon construction, this method will be called with the region
|
* Upon construction, this method will be called with the region
|
||||||
* to be governed. It will be called once and only once.
|
* to be governed. It will be called once and only once.
|
||||||
@ -54,7 +54,7 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||||||
this.region == null,
|
this.region == null,
|
||||||
"Policy already configured for region {}",
|
"Policy already configured for region {}",
|
||||||
this.region);
|
this.region);
|
||||||
|
|
||||||
this.region = region;
|
this.region = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||||||
largestStoreSize = storeSize;
|
largestStoreSize = storeSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return splitPointFromLargestStore;
|
return splitPointFromLargestStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,14 +98,13 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||||||
*/
|
*/
|
||||||
public static RegionSplitPolicy create(HRegion region,
|
public static RegionSplitPolicy create(HRegion region,
|
||||||
Configuration conf) throws IOException {
|
Configuration conf) throws IOException {
|
||||||
|
|
||||||
Class<? extends RegionSplitPolicy> clazz = getSplitPolicyClass(
|
Class<? extends RegionSplitPolicy> clazz = getSplitPolicyClass(
|
||||||
region.getTableDesc(), conf);
|
region.getTableDesc(), conf);
|
||||||
RegionSplitPolicy policy = ReflectionUtils.newInstance(clazz, conf);
|
RegionSplitPolicy policy = ReflectionUtils.newInstance(clazz, conf);
|
||||||
policy.configureForRegion(region);
|
policy.configureForRegion(region);
|
||||||
return policy;
|
return policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Class<? extends RegionSplitPolicy> getSplitPolicyClass(
|
static Class<? extends RegionSplitPolicy> getSplitPolicyClass(
|
||||||
HTableDescriptor htd, Configuration conf) throws IOException {
|
HTableDescriptor htd, Configuration conf) throws IOException {
|
||||||
String className = htd.getRegionSplitPolicyClassName();
|
String className = htd.getRegionSplitPolicyClassName();
|
||||||
@ -125,5 +124,4 @@ public abstract class RegionSplitPolicy extends Configured {
|
|||||||
e);
|
e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user