hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1152058 - /hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java
Date Fri, 29 Jul 2011 00:24:53 GMT
Author: tedyu
Date: Fri Jul 29 00:24:53 2011
New Revision: 1152058

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

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

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1152058&r1=1152057&r2=1152058&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HTable.java Fri Jul 29
00:24:53 2011
@@ -684,11 +684,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) {



Mime
View raw message