@InterfaceAudience.Private public class IncrementCoalescer extends Object implements IncrementCoalescerMBean
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
IncrementCoalescer.FullyQualifiedRow
Used to identify a cell that will be incremented.
|
| Modifier and Type | Field and Description |
|---|---|
private static int |
CORE_POOL_SIZE |
private ConcurrentMap<IncrementCoalescer.FullyQualifiedRow,Long> |
countersMap |
private LongAdder |
failedIncrements |
private ThriftServerRunner.HBaseHandler |
handler |
private static org.slf4j.Logger |
LOG |
private int |
maxQueueSize |
private ThreadPoolExecutor |
pool |
private LongAdder |
successfulCoalescings |
private LongAdder |
totalIncrements |
| Constructor and Description |
|---|
IncrementCoalescer(ThriftServerRunner.HBaseHandler hand) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canQueue() |
private Callable<Integer> |
createIncCallable() |
private void |
dynamicallySetCoreSize(int countersMapSize)
This method samples the incoming requests and, if selected, will check if
the corePoolSize should be changed.
|
int |
getCorePoolSize() |
long |
getCountersMapSize() |
long |
getFailedIncrements() |
int |
getMaxPoolSize() |
int |
getMaxQueueSize() |
long |
getPoolCompletedTaskCount() |
int |
getPoolLargestPoolSize() |
long |
getPoolTaskCount() |
int |
getQueueSize() |
long |
getSuccessfulCoalescings() |
long |
getTotalIncrements() |
private boolean |
internalQueueIncrement(byte[] tableName,
byte[] rowKey,
byte[] fam,
byte[] qual,
long ammount) |
private boolean |
internalQueueTincrement(org.apache.hadoop.hbase.thrift.generated.TIncrement inc) |
boolean |
queueIncrement(org.apache.hadoop.hbase.thrift.generated.TIncrement inc) |
boolean |
queueIncrements(List<org.apache.hadoop.hbase.thrift.generated.TIncrement> incs) |
void |
setCorePoolSize(int newCoreSize) |
void |
setMaxPoolSize(int newMaxSize) |
void |
setMaxQueueSize(int newSize) |
private final LongAdder failedIncrements
private final LongAdder successfulCoalescings
private final LongAdder totalIncrements
private final ConcurrentMap<IncrementCoalescer.FullyQualifiedRow,Long> countersMap
private final ThreadPoolExecutor pool
private final ThriftServerRunner.HBaseHandler handler
private int maxQueueSize
private static final int CORE_POOL_SIZE
private static final org.slf4j.Logger LOG
public IncrementCoalescer(ThriftServerRunner.HBaseHandler hand)
public boolean queueIncrement(org.apache.hadoop.hbase.thrift.generated.TIncrement inc) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic boolean queueIncrements(List<org.apache.hadoop.hbase.thrift.generated.TIncrement> incs) throws org.apache.thrift.TException
org.apache.thrift.TExceptionprivate boolean internalQueueTincrement(org.apache.hadoop.hbase.thrift.generated.TIncrement inc) throws org.apache.thrift.TException
org.apache.thrift.TExceptionprivate boolean internalQueueIncrement(byte[] tableName, byte[] rowKey, byte[] fam, byte[] qual, long ammount) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic boolean canQueue()
private Callable<Integer> createIncCallable()
private void dynamicallySetCoreSize(int countersMapSize)
countersMapSize - public int getQueueSize()
getQueueSize in interface IncrementCoalescerMBeanpublic int getMaxQueueSize()
getMaxQueueSize in interface IncrementCoalescerMBeanpublic void setMaxQueueSize(int newSize)
setMaxQueueSize in interface IncrementCoalescerMBeanpublic long getPoolCompletedTaskCount()
getPoolCompletedTaskCount in interface IncrementCoalescerMBeanpublic long getPoolTaskCount()
getPoolTaskCount in interface IncrementCoalescerMBeanpublic int getPoolLargestPoolSize()
getPoolLargestPoolSize in interface IncrementCoalescerMBeanpublic int getCorePoolSize()
getCorePoolSize in interface IncrementCoalescerMBeanpublic void setCorePoolSize(int newCoreSize)
setCorePoolSize in interface IncrementCoalescerMBeanpublic int getMaxPoolSize()
getMaxPoolSize in interface IncrementCoalescerMBeanpublic void setMaxPoolSize(int newMaxSize)
setMaxPoolSize in interface IncrementCoalescerMBeanpublic long getFailedIncrements()
getFailedIncrements in interface IncrementCoalescerMBeanpublic long getSuccessfulCoalescings()
getSuccessfulCoalescings in interface IncrementCoalescerMBeanpublic long getTotalIncrements()
getTotalIncrements in interface IncrementCoalescerMBeanpublic long getCountersMapSize()
getCountersMapSize in interface IncrementCoalescerMBeanCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.