HBASE-1023 Check global flusher
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@720325 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e98d664ed
commit
2c56399b01
|
@ -82,6 +82,7 @@ Release 0.19.0 - Unreleased
|
|||
HBASE-1009 Master stuck in loop wanting to assign but regions are closing
|
||||
HBASE-1016 Fix example in javadoc overvie
|
||||
HBASE-1021 hbase metrics FileContext not working
|
||||
HBASE-1023 Check global flusher
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-901 Add a limit to key length, check key and value length on client side
|
||||
|
|
|
@ -220,17 +220,23 @@ class MemcacheFlusher extends Thread implements FlushRequester {
|
|||
*/
|
||||
private synchronized void flushSomeRegions() {
|
||||
// keep flushing until we hit the low water mark
|
||||
long globalMemcacheSize = -1;
|
||||
for (SortedMap<Long, HRegion> m =
|
||||
this.server.getCopyOfOnlineRegionsSortedBySize();
|
||||
server.getGlobalMemcacheSize() >= globalMemcacheLimitLowMark;) {
|
||||
(globalMemcacheSize = server.getGlobalMemcacheSize()) >=
|
||||
this.globalMemcacheLimitLowMark;) {
|
||||
// flush the region with the biggest memcache
|
||||
if (m.size() <= 0) {
|
||||
LOG.info("No online regions to flush though we've been asked flush " +
|
||||
"some; globalMemcacheSize=" + this.server.getGlobalMemcacheSize() +
|
||||
"some; globalMemcacheSize=" + globalMemcacheSize +
|
||||
", globalMemcacheLimitLowMark=" + this.globalMemcacheLimitLowMark);
|
||||
break;
|
||||
}
|
||||
HRegion biggestMemcacheRegion = m.remove(m.firstKey());
|
||||
LOG.info("Forced flushing of " + biggestMemcacheRegion.toString() +
|
||||
" because global memcache limit of " + this.globalMemcacheLimit +
|
||||
" exceeded; currenly " + globalMemcacheSize + " and flushing till " +
|
||||
this.globalMemcacheLimitLowMark);
|
||||
if (!flushRegion(biggestMemcacheRegion, true)) {
|
||||
// Something bad happened - give up.
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue