You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2011/07/29 02:23:57 UTC

svn commit: r1152057 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java

Author: tedyu
Date: Fri Jul 29 00:23:56 2011
New Revision: 1152057

URL: http://svn.apache.org/viewvc?rev=1152057&view=rev
Log:
HBASE-4143 HTable.doPut(List) should check the writebuffer length every so often
           addendum by Gary H

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1152057&r1=1152056&r2=1152057&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HTable.java Fri Jul 29 00:23:56 2011
@@ -715,11 +715,8 @@ public class HTable implements HTableInt
      
       // we need to periodically see if the writebuffer is full instead of waiting until the end of the List
       n++;
-      if (n == DOPUT_WB_CHECK) {
-        if (autoFlush || currentWriteBufferSize > writeBufferSize) {
-          flushCommits();
-          n = 0;
-        }
+      if (n % DOPUT_WB_CHECK == 0 && currentWriteBufferSize > writeBufferSize) {
+        flushCommits();
       }
     }
     if (autoFlush || currentWriteBufferSize > writeBufferSize) {