private void getHTable(String table) throws IOException { synchronized (TABLE_LOCK) { hTable = hConn.getTable(table); //2 suggestions from http://ryantwopointoh.blogspot.com/2009/01/performance-of-hbase-importing.html hTable.setAutoFlush(!clientSideBuffering, true); hTable.setWriteBufferSize(writeBufferSize); //return hTable; } }
this.table.setAutoFlush(false, true); LOG.info("Enabled client-side write buffer");
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { table.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { delegate.setAutoFlush(autoFlush, clearBufferOnFail); }
/** * Delegates to {@link HTable#setAutoFlush(boolean autoFlush)} */ public void setAutoFlush(boolean autoFlush) { table.setAutoFlush(autoFlush, true); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush) { delegate.setAutoFlush(autoFlush); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush) { table.setAutoFlush(autoFlush); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { hTable.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void setAutoFlush(boolean autoFlush) { checkState(); table.setAutoFlush(autoFlush, autoFlush); }
@Override public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) { checkState(); table.setAutoFlush(autoFlush, clearBufferOnFail); }
@Override public void close() { if (state.equals(ReaderWriterState.OPEN)) { try { table.flushCommits(); table.setAutoFlush(true); table.close(); } catch (IOException e) { throw new DatasetIOException("Error closing table [" + table + "]", e); } state = ReaderWriterState.CLOSED; } }
@Override public void close() { if (state.equals(ReaderWriterState.OPEN)) { try { table.flushCommits(); table.setAutoFlush(true); table.close(); } catch (IOException e) { throw new DatasetIOException("Error closing table [" + table + "]", e); } state = ReaderWriterState.CLOSED; } }