HBASE-15373 DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS value is wrong in CompactionThroughputControllerFactory

This commit is contained in:
stack 2016-03-03 19:42:42 -08:00
parent b3c62680bc
commit d089ac1ec6
3 changed files with 11 additions and 9 deletions

View File

@ -549,8 +549,8 @@ public class HStore implements Store {
}
if (ioe != null) {
// close StoreFile readers
boolean evictOnClose =
cacheConf != null? cacheConf.shouldEvictOnClose(): true;
boolean evictOnClose =
cacheConf != null? cacheConf.shouldEvictOnClose(): true;
for (StoreFile file : results) {
try {
if (file != null) file.closeReader(evictOnClose);
@ -846,7 +846,7 @@ public class HStore implements Store {
completionService.submit(new Callable<Void>() {
@Override
public Void call() throws IOException {
boolean evictOnClose =
boolean evictOnClose =
cacheConf != null? cacheConf.shouldEvictOnClose(): true;
f.closeReader(evictOnClose);
return null;
@ -2032,6 +2032,9 @@ public class HStore implements Store {
assert !this.getRegionInfo().isMetaRegion();
// Not split-able if we find a reference store file present in the store.
if (hasReferences()) {
if (LOG.isTraceEnabled()) {
LOG.trace("Not splittable; has references: " + this);
}
return null;
}
return this.storeEngine.getStoreFileManager().getSplitPoint();

View File

@ -80,6 +80,7 @@ public abstract class RegionSplitPolicy extends Configured {
long largestStoreSize = 0;
for (Store s : stores) {
byte[] splitPoint = s.getSplitPoint();
// Store also returns null if it has references as way of indicating it is not splittable
long storeSize = s.getSize();
if (splitPoint != null && largestStoreSize < storeSize) {
splitPointFromLargestStore = splitPoint;

View File

@ -41,11 +41,9 @@ public final class CompactionThroughputControllerFactory {
// for backward compatibility and may not be supported in the future
private static final String DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS =
"org.apache.hadoop.hbase.regionserver.compactions."
+ "PressureAwareCompactionThroughputController";
"org.apache.hadoop.hbase.regionserver.compactions.PressureAwareCompactionThroughputController";
private static final String DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS =
"org.apache.hadoop.hbase.regionserver.compactions."
+ "NoLimitThroughputController.java";
"org.apache.hadoop.hbase.regionserver.compactions.NoLimitThroughputController";
public static ThroughputController create(RegionServerServices server,
Configuration conf) {
@ -77,7 +75,7 @@ public final class CompactionThroughputControllerFactory {
* @return the new name if there is any
*/
private static String resolveDeprecatedClassName(String oldName) {
String className = oldName;
String className = oldName.trim();
if (className.equals(DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS)) {
className = PressureAwareCompactionThroughputController.class.getName();
} else if (className.equals(DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS)) {
@ -88,4 +86,4 @@ public final class CompactionThroughputControllerFactory {
}
return className;
}
}
}