hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gen Liu <ge...@zynga.com>
Subject setAutoFlush(false) in Thrift
Date Thu, 09 Aug 2012 00:19:41 GMT

Hbase thrift doesn't expose setAutoFlush interface. I ran thrift out of the Hbase cluster.
I want to have a client side write buffering on the Thrift server.
So I change the ThriftServer.java, and add a setAutoFlush(false) as follows:

if (!tables.containsKey(table)) {
  boolean autoFlush = conf.getBoolean("hbase.client.autoflush", true);
  HTable htable = new HTable(conf, tableName);
  LOG.debug("Thrift setAutoFlush:"+autoFlush);
  tables.put(table, htable);

The write buffer actually works when I call mutateRow(in PHP) with small data (less than 500
bytes), write latency is only 1 ms. (php and thrift are in the same machine)
But when I use larger payload (2KB and more), the mutateRow takes constant 40 ms to finish
no matter how large is the write buffer size and no matter how large is the payload.

Any thoughts?  Or is there a another way for client size write buffering through Thrift.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message