Skip to content
Snippets Groups Projects
Commit 23e5afcf authored by Shun Takebayashi's avatar Shun Takebayashi
Browse files

Rename autoflush property to clientbuffering

parent 7797108a
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@ package com.yahoo.ycsb.db;
import com.yahoo.ycsb.DBException;
import com.yahoo.ycsb.ByteIterator;
import com.yahoo.ycsb.ByteArrayByteIterator;
import com.yahoo.ycsb.StringByteIterator;
import java.io.IOException;
import java.util.*;
......@@ -61,7 +60,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB
public HTable _hTable=null;
public String _columnFamily="";
public byte _columnFamilyBytes[];
public boolean _autoflush = false;
public boolean _clientSideBuffering = true;
public static final int Ok=0;
public static final int ServerError=-1;
......@@ -82,9 +81,9 @@ public class HBaseClient extends com.yahoo.ycsb.DB
_debug=true;
}
if (getProperties().containsKey("autoflush"))
if (getProperties().containsKey("clientbuffering"))
{
_autoflush = Boolean.parseBoolean(getProperties().getProperty("autoflush"));
_clientSideBuffering = Boolean.parseBoolean(getProperties().getProperty("clientbuffering"));
}
_columnFamily = getProperties().getProperty("columnfamily");
......@@ -123,7 +122,7 @@ public class HBaseClient extends com.yahoo.ycsb.DB
synchronized (tableLock) {
_hTable = new HTable(config, table);
//2 suggestions from http://ryantwopointoh.blogspot.com/2009/01/performance-of-hbase-importing.html
_hTable.setAutoFlush(_autoflush, true);
_hTable.setAutoFlush(!_clientSideBuffering, true);
_hTable.setWriteBufferSize(1024*1024*12);
//return hTable;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment