org.apache.hadoop.hbase.thrift
Class IncrementCoalescer
java.lang.Object
org.apache.hadoop.hbase.thrift.IncrementCoalescer
- All Implemented Interfaces:
- IncrementCoalescerMBean
public class IncrementCoalescer
- extends Object
- implements IncrementCoalescerMBean
This class will coalesce increments from a thift server if
hbase.regionserver.thrift.coalesceIncrement is set to true. Turning this
config to true will cause the thrift server to queue increments into an
instance of this class. The thread pool associated with this class will drain
the coalesced increments as the thread is able. This can cause data loss if the
thrift server dies or is shut down before everything in the queue is drained.
|
Field Summary |
protected org.apache.commons.logging.Log |
LOG
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected final org.apache.commons.logging.Log LOG
IncrementCoalescer
public IncrementCoalescer(ThriftServerRunner.HBaseHandler hand)
queueIncrement
public boolean queueIncrement(org.apache.hadoop.hbase.thrift.generated.TIncrement inc)
throws org.apache.thrift.TException
- Throws:
org.apache.thrift.TException
queueIncrements
public boolean queueIncrements(List<org.apache.hadoop.hbase.thrift.generated.TIncrement> incs)
throws org.apache.thrift.TException
- Throws:
org.apache.thrift.TException
canQueue
public boolean canQueue()
getQueueSize
public int getQueueSize()
- Specified by:
getQueueSize in interface IncrementCoalescerMBean
getMaxQueueSize
public int getMaxQueueSize()
- Specified by:
getMaxQueueSize in interface IncrementCoalescerMBean
setMaxQueueSize
public void setMaxQueueSize(int newSize)
- Specified by:
setMaxQueueSize in interface IncrementCoalescerMBean
getPoolCompletedTaskCount
public long getPoolCompletedTaskCount()
- Specified by:
getPoolCompletedTaskCount in interface IncrementCoalescerMBean
getPoolTaskCount
public long getPoolTaskCount()
- Specified by:
getPoolTaskCount in interface IncrementCoalescerMBean
getPoolLargestPoolSize
public int getPoolLargestPoolSize()
- Specified by:
getPoolLargestPoolSize in interface IncrementCoalescerMBean
getCorePoolSize
public int getCorePoolSize()
- Specified by:
getCorePoolSize in interface IncrementCoalescerMBean
setCorePoolSize
public void setCorePoolSize(int newCoreSize)
- Specified by:
setCorePoolSize in interface IncrementCoalescerMBean
getMaxPoolSize
public int getMaxPoolSize()
- Specified by:
getMaxPoolSize in interface IncrementCoalescerMBean
setMaxPoolSize
public void setMaxPoolSize(int newMaxSize)
- Specified by:
setMaxPoolSize in interface IncrementCoalescerMBean
getFailedIncrements
public long getFailedIncrements()
- Specified by:
getFailedIncrements in interface IncrementCoalescerMBean
getSuccessfulCoalescings
public long getSuccessfulCoalescings()
- Specified by:
getSuccessfulCoalescings in interface IncrementCoalescerMBean
getTotalIncrements
public long getTotalIncrements()
- Specified by:
getTotalIncrements in interface IncrementCoalescerMBean
getCountersMapSize
public long getCountersMapSize()
- Specified by:
getCountersMapSize in interface IncrementCoalescerMBean
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.