HBASE-4143 HTable.doPut(List) should check the writebuffer length every so often

addendum by Gary H


git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1152057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-07-29 00:23:56 +00:00
parent 54e4164ce7
commit e5bbebc507
1 changed files with 2 additions and 5 deletions

View File

@ -715,11 +715,8 @@ public class HTable implements HTableInterface, Closeable {
// 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) {