HBASE-1663 Request compaction only once instead of every time 500ms each time we cycle the hstore.getStorefilesCount() > this.blockingStoreFilesNumber loop

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@794788 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-07-16 19:15:22 +00:00
parent 64311a2922
commit 54d3670219
2 changed files with 7 additions and 4 deletions

View File

@ -267,6 +267,9 @@ Release 0.20.0 - Unreleased
anymore anymore
HBASE-1658 Remove UI refresh -- its annoying HBASE-1658 Remove UI refresh -- its annoying
HBASE-1659 merge tool doesnt take binary regions with \x escape format HBASE-1659 merge tool doesnt take binary regions with \x escape format
HBASE-1663 Request compaction only once instead of every time 500ms each
time we cycle the hstore.getStorefilesCount() >
this.blockingStoreFilesNumber loop
IMPROVEMENTS IMPROVEMENTS
HBASE-1089 Add count of regions on filesystem to master UI; add percentage HBASE-1089 Add count of regions on filesystem to master UI; add percentage

View File

@ -229,13 +229,12 @@ class MemStoreFlusher extends Thread implements FlushRequester {
finished = true; finished = true;
for (Store hstore: region.stores.values()) { for (Store hstore: region.stores.values()) {
if (hstore.getStorefilesCount() > this.blockingStoreFilesNumber) { if (hstore.getStorefilesCount() > this.blockingStoreFilesNumber) {
// always request a compaction
server.compactSplitThread.compactionRequested(region, getName());
// only log once // only log once
if (!triggered) { if (!triggered) {
LOG.info("Too many store files for region " + region + ": " + LOG.info("Too many store files for region " + region + ": " +
hstore.getStorefilesCount() + ", requesting compaction and " + hstore.getStorefilesCount() + ", requesting compaction and " +
"waiting"); "waiting");
this.server.compactSplitThread.compactionRequested(region, getName());
triggered = true; triggered = true;
} }
// pending compaction, not finished // pending compaction, not finished
@ -247,16 +246,17 @@ class MemStoreFlusher extends Thread implements FlushRequester {
} }
} }
} }
if(triggered && finished) { if (triggered && finished) {
LOG.info("Compaction has completed, we waited " + (count * 500) + "ms, " LOG.info("Compaction has completed, we waited " + (count * 500) + "ms, "
+ "finishing flush of region " + region); + "finishing flush of region " + region);
break; break;
} }
} }
if(triggered && !finished) { if (triggered && !finished) {
LOG.warn("Tried to hold up flushing for compactions of region " + region + LOG.warn("Tried to hold up flushing for compactions of region " + region +
" but have waited longer than " + blockingWaitTime + "ms, continuing"); " but have waited longer than " + blockingWaitTime + "ms, continuing");
} }
synchronized (regionsInQueue) { synchronized (regionsInQueue) {
// See comment above for removeFromQueue on why we do not // See comment above for removeFromQueue on why we do not
// take the region out of the set. If removeFromQueue is true, remove it // take the region out of the set. If removeFromQueue is true, remove it