hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1245727 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
Date Fri, 17 Feb 2012 19:45:45 GMT
Author: jdcryans
Date: Fri Feb 17 19:45:45 2012
New Revision: 1245727

URL: http://svn.apache.org/viewvc?rev=1245727&view=rev
Log:
HBASE-5393  Consider splitting after flushing

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java?rev=1245727&r1=1245726&r2=1245727&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java Fri
Feb 17 19:45:45 2012
@@ -397,9 +397,15 @@ class MemStoreFlusher extends HasThread 
      lock.lock();
     }
     try {
-      if (region.flushcache()) {
+      boolean shouldCompact = region.flushcache();
+      // We just want to check the size
+      boolean shouldSplit = region.checkSplit() != null;
+      if (shouldSplit) {
+        this.server.compactSplitThread.requestSplit(region);
+      } else if (shouldCompact) {
         server.compactSplitThread.requestCompaction(region, getName());
       }
+
       server.getMetrics().addFlush(region.getRecentFlushInfo());
     } catch (DroppedSnapshotException ex) {
       // Cache flush can fail in a few places. If it fails in a critical



Mime
View raw message