hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jg...@apache.org
Subject svn commit: r805215 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/client/HTable.java
Date Mon, 17 Aug 2009 23:42:44 GMT
Author: jgray
Date: Mon Aug 17 23:42:43 2009
New Revision: 805215

URL: http://svn.apache.org/viewvc?rev=805215&view=rev
Log:
HBASE-1770 HTable.setWriteBufferSize does not flush the writeBuffer when its size is set to
a value lower than its current size (Mathias via jgray)

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/client/HTable.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=805215&r1=805214&r2=805215&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Mon Aug 17 23:42:43 2009
@@ -563,6 +563,9 @@
                (Ken Weiner via jgray)
    HBASE-1763  Put writeToWAL methods do not have proper getter/setter names
                (second commit to fix compile error in hregion)
+   HBASE-1770  HTable.setWriteBufferSize does not flush the writeBuffer when
+               its size is set to a value lower than its current size.
+               (Mathias via jgray)
 
   OPTIMIZATIONS
    HBASE-1412  Change values for delete column and column family in KeyValue

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/client/HTable.java?rev=805215&r1=805214&r2=805215&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/client/HTable.java Mon Aug
17 23:42:43 2009
@@ -670,11 +670,17 @@
   }
 
   /**
-   * Set the size of the buffer in bytes
+   * Set the size of the buffer in bytes.
+   * If the new size is lower than the current size of data in the 
+   * write buffer, the buffer is flushed.
    * @param writeBufferSize
+   * @throws IOException
    */
-  public void setWriteBufferSize(long writeBufferSize) {
+  public void setWriteBufferSize(long writeBufferSize) throws IOException {
     this.writeBufferSize = writeBufferSize;
+    if(currentWriteBufferSize > writeBufferSize) {
+      flushCommits();
+    }
   }
 
   /**



Mime
View raw message