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:
sershe 2013-04-09 22:20:44 +00:00
parent d09a134ad8
commit a0b7fb5373
2 changed files with 7 additions and 2 deletions

View File

@ -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) {

View File

@ -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