|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.HTableMultiplexer
@InterfaceAudience.Public @InterfaceStability.Evolving public class HTableMultiplexer
HTableMultiplexer provides a thread-safe non blocking PUT API across all the tables. Each put will be sharded into different buffer queues based on its destination region server. So each region server buffer queue will only have the puts which share the same destination. And each queue will have a flush worker thread to flush the puts request to the region server. If any queue is full, the HTableMultiplexer starts to drop the Put requests for that particular queue. Also all the puts will be retried as a configuration number before dropping. And the HTableMultiplexer can report the number of buffered requests and the number of the failed (dropped) requests in total or on per region server basis. This class is thread safe.
Constructor Summary | |
---|---|
HTableMultiplexer(org.apache.hadoop.conf.Configuration conf,
int perRegionServerBufferQueueSize)
|
Method Summary | |
---|---|
org.apache.hadoop.hbase.client.HTableMultiplexer.HTableMultiplexerStatus |
getHTableMultiplexerStatus()
|
List<Put> |
put(byte[] tableName,
List<Put> puts)
|
boolean |
put(byte[] tableName,
Put put)
|
boolean |
put(byte[] tableName,
Put put,
int retry)
|
List<Put> |
put(TableName tableName,
List<Put> puts)
The puts request will be buffered by their corresponding buffer queue. |
boolean |
put(TableName tableName,
Put put)
The put request will be buffered by its corresponding buffer queue. |
boolean |
put(TableName tableName,
Put put,
int retry)
The put request will be buffered by its corresponding buffer queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTableMultiplexer(org.apache.hadoop.conf.Configuration conf, int perRegionServerBufferQueueSize) throws ZooKeeperConnectionException
conf
- The HBaseConfigurationperRegionServerBufferQueueSize
- determines the max number of the buffered Put ops
for each region server before dropping the request.
ZooKeeperConnectionException
Method Detail |
---|
public boolean put(TableName tableName, Put put) throws IOException
tableName
- put
-
IOException
public boolean put(byte[] tableName, Put put) throws IOException
IOException
public List<Put> put(TableName tableName, List<Put> puts) throws IOException
tableName
- puts
-
IOException
public List<Put> put(byte[] tableName, List<Put> puts) throws IOException
IOException
public boolean put(TableName tableName, Put put, int retry) throws IOException
tableName
- put
- retry
-
IOException
public boolean put(byte[] tableName, Put put, int retry) throws IOException
IOException
public org.apache.hadoop.hbase.client.HTableMultiplexer.HTableMultiplexerStatus getHTableMultiplexerStatus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |