HBASE-7791 Compaction USER_PRIORITY is slightly broken
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1466267 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d09a134ad8
commit
a0b7fb5373
|
@ -131,7 +131,8 @@ class DefaultStoreFileManager implements StoreFileManager {
|
|||
public int getStoreCompactionPriority() {
|
||||
int blockingFileCount = conf.getInt(
|
||||
HStore.BLOCKING_STOREFILES_KEY, HStore.DEFAULT_BLOCKING_STOREFILE_COUNT);
|
||||
return blockingFileCount - storefiles.size();
|
||||
int priority = blockingFileCount - storefiles.size();
|
||||
return (priority == HStore.PRIORITY_USER) ? priority + 1 : priority;
|
||||
}
|
||||
|
||||
private void sortAndSetStoreFiles(List<StoreFile> storeFiles) {
|
||||
|
|
|
@ -1659,7 +1659,11 @@ public class HStore implements Store {
|
|||
|
||||
@Override
|
||||
public int getCompactPriority() {
|
||||
return this.storeEngine.getStoreFileManager().getStoreCompactionPriority();
|
||||
int priority = this.storeEngine.getStoreFileManager().getStoreCompactionPriority();
|
||||
if (priority == PRIORITY_USER) {
|
||||
LOG.warn("Compaction priority is USER despite there being no user compaction");
|
||||
}
|
||||
return priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue