HBASE-1618 Investigate further into the MemStoreFlusher StoreFile limit
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@791977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
83e462ffde
commit
d8607b4e16
|
@ -245,6 +245,8 @@ Release 0.20.0 - Unreleased
|
|||
HBASE-1615 HBASE-1597 introduced a bug when compacting after a split
|
||||
(Jon Gray via Stack)
|
||||
HBASE-1616 Unit test of compacting referenced StoreFiles (Jon Gray via Stack)
|
||||
HBASE-1618 Investigate further into the MemStoreFlusher StoreFile limit
|
||||
(Jon Gray via Stack)
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
|
||||
|
|
|
@ -222,10 +222,11 @@ class MemStoreFlusher extends Thread implements FlushRequester {
|
|||
* not flushed.
|
||||
*/
|
||||
private boolean flushRegion(HRegion region, boolean removeFromQueue) {
|
||||
// Wait until it is safe to flush
|
||||
int count = 0;
|
||||
boolean triggered = false;
|
||||
boolean finished = false;
|
||||
while (count++ < (blockingWaitTime / 500)) {
|
||||
finished = true;
|
||||
for (Store hstore: region.stores.values()) {
|
||||
if (hstore.getStorefilesCount() > this.blockingStoreFilesNumber) {
|
||||
// always request a compaction
|
||||
|
@ -233,22 +234,28 @@ class MemStoreFlusher extends Thread implements FlushRequester {
|
|||
// only log once
|
||||
if (!triggered) {
|
||||
LOG.info("Too many store files for region " + region + ": " +
|
||||
hstore.getStorefilesCount() + ", waiting");
|
||||
hstore.getStorefilesCount() + ", requesting compaction and " +
|
||||
"waiting");
|
||||
triggered = true;
|
||||
}
|
||||
// pending compaction, not finished
|
||||
finished = false;
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (InterruptedException e) {
|
||||
// ignore
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (triggered) {
|
||||
LOG.info("Compaction completed on region " + region +
|
||||
", proceeding");
|
||||
if(triggered && finished) {
|
||||
LOG.info("Compaction has completed, we waited " + (count * 500) + "ms, "
|
||||
+ "finishing flush of region " + region);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(triggered && !finished) {
|
||||
LOG.warn("Tried to hold up flushing for compactions of region " + region +
|
||||
" but have waited longer than " + blockingWaitTime + "ms, continuing");
|
||||
}
|
||||
synchronized (regionsInQueue) {
|
||||
// See comment above for removeFromQueue on why we do not
|
||||
|
|
Loading…
Reference in New Issue