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)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@805218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2ca35347f3
commit
caac328457
|
@ -10,6 +10,9 @@ Release 0.21.0 - Unreleased
|
|||
(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
|
||||
|
||||
|
|
|
@ -670,11 +670,17 @@ public class HTable {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue