HBASE-15373 DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS value is wrong in CompactionThroughputControllerFactory
This commit is contained in:
parent
b3c62680bc
commit
d089ac1ec6
|
@ -549,8 +549,8 @@ public class HStore implements Store {
|
||||||
}
|
}
|
||||||
if (ioe != null) {
|
if (ioe != null) {
|
||||||
// close StoreFile readers
|
// close StoreFile readers
|
||||||
boolean evictOnClose =
|
boolean evictOnClose =
|
||||||
cacheConf != null? cacheConf.shouldEvictOnClose(): true;
|
cacheConf != null? cacheConf.shouldEvictOnClose(): true;
|
||||||
for (StoreFile file : results) {
|
for (StoreFile file : results) {
|
||||||
try {
|
try {
|
||||||
if (file != null) file.closeReader(evictOnClose);
|
if (file != null) file.closeReader(evictOnClose);
|
||||||
|
@ -846,7 +846,7 @@ public class HStore implements Store {
|
||||||
completionService.submit(new Callable<Void>() {
|
completionService.submit(new Callable<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public Void call() throws IOException {
|
public Void call() throws IOException {
|
||||||
boolean evictOnClose =
|
boolean evictOnClose =
|
||||||
cacheConf != null? cacheConf.shouldEvictOnClose(): true;
|
cacheConf != null? cacheConf.shouldEvictOnClose(): true;
|
||||||
f.closeReader(evictOnClose);
|
f.closeReader(evictOnClose);
|
||||||
return null;
|
return null;
|
||||||
|
@ -2032,6 +2032,9 @@ public class HStore implements Store {
|
||||||
assert !this.getRegionInfo().isMetaRegion();
|
assert !this.getRegionInfo().isMetaRegion();
|
||||||
// Not split-able if we find a reference store file present in the store.
|
// Not split-able if we find a reference store file present in the store.
|
||||||
if (hasReferences()) {
|
if (hasReferences()) {
|
||||||
|
if (LOG.isTraceEnabled()) {
|
||||||
|
LOG.trace("Not splittable; has references: " + this);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.storeEngine.getStoreFileManager().getSplitPoint();
|
return this.storeEngine.getStoreFileManager().getSplitPoint();
|
||||||
|
|
|
@ -80,6 +80,7 @@ public abstract class RegionSplitPolicy extends Configured {
|
||||||
long largestStoreSize = 0;
|
long largestStoreSize = 0;
|
||||||
for (Store s : stores) {
|
for (Store s : stores) {
|
||||||
byte[] splitPoint = s.getSplitPoint();
|
byte[] splitPoint = s.getSplitPoint();
|
||||||
|
// Store also returns null if it has references as way of indicating it is not splittable
|
||||||
long storeSize = s.getSize();
|
long storeSize = s.getSize();
|
||||||
if (splitPoint != null && largestStoreSize < storeSize) {
|
if (splitPoint != null && largestStoreSize < storeSize) {
|
||||||
splitPointFromLargestStore = splitPoint;
|
splitPointFromLargestStore = splitPoint;
|
||||||
|
|
|
@ -41,11 +41,9 @@ public final class CompactionThroughputControllerFactory {
|
||||||
|
|
||||||
// for backward compatibility and may not be supported in the future
|
// for backward compatibility and may not be supported in the future
|
||||||
private static final String DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS =
|
private static final String DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS =
|
||||||
"org.apache.hadoop.hbase.regionserver.compactions."
|
"org.apache.hadoop.hbase.regionserver.compactions.PressureAwareCompactionThroughputController";
|
||||||
+ "PressureAwareCompactionThroughputController";
|
|
||||||
private static final String DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS =
|
private static final String DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS =
|
||||||
"org.apache.hadoop.hbase.regionserver.compactions."
|
"org.apache.hadoop.hbase.regionserver.compactions.NoLimitThroughputController";
|
||||||
+ "NoLimitThroughputController.java";
|
|
||||||
|
|
||||||
public static ThroughputController create(RegionServerServices server,
|
public static ThroughputController create(RegionServerServices server,
|
||||||
Configuration conf) {
|
Configuration conf) {
|
||||||
|
@ -77,7 +75,7 @@ public final class CompactionThroughputControllerFactory {
|
||||||
* @return the new name if there is any
|
* @return the new name if there is any
|
||||||
*/
|
*/
|
||||||
private static String resolveDeprecatedClassName(String oldName) {
|
private static String resolveDeprecatedClassName(String oldName) {
|
||||||
String className = oldName;
|
String className = oldName.trim();
|
||||||
if (className.equals(DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS)) {
|
if (className.equals(DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS)) {
|
||||||
className = PressureAwareCompactionThroughputController.class.getName();
|
className = PressureAwareCompactionThroughputController.class.getName();
|
||||||
} else if (className.equals(DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS)) {
|
} else if (className.equals(DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS)) {
|
||||||
|
@ -88,4 +86,4 @@ public final class CompactionThroughputControllerFactory {
|
||||||
}
|
}
|
||||||
return className;
|
return className;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue