@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 ThriftHBaseServiceHandler |
handler |
private static org.slf4j.Logger |
LOG |
private int |
maxQueueSize |
private ThreadPoolExecutor |
pool |
private LongAdder |
successfulCoalescings |
private LongAdder |
totalIncrements |
Constructor and Description |
---|
IncrementCoalescer(ThriftHBaseServiceHandler 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 ThriftHBaseServiceHandler handler
private int maxQueueSize
private static final int CORE_POOL_SIZE
private static final org.slf4j.Logger LOG
public IncrementCoalescer(ThriftHBaseServiceHandler hand)
public boolean queueIncrement(org.apache.hadoop.hbase.thrift.generated.TIncrement inc)
public boolean queueIncrements(List<org.apache.hadoop.hbase.thrift.generated.TIncrement> incs)
private boolean internalQueueTincrement(org.apache.hadoop.hbase.thrift.generated.TIncrement inc)
private boolean internalQueueIncrement(byte[] tableName, byte[] rowKey, byte[] fam, byte[] qual, long ammount)
public boolean canQueue()
private Callable<Integer> createIncCallable()
private void dynamicallySetCoreSize(int countersMapSize)
countersMapSize
- public int getQueueSize()
getQueueSize
in interface IncrementCoalescerMBean
public int getMaxQueueSize()
getMaxQueueSize
in interface IncrementCoalescerMBean
public void setMaxQueueSize(int newSize)
setMaxQueueSize
in interface IncrementCoalescerMBean
public long getPoolCompletedTaskCount()
getPoolCompletedTaskCount
in interface IncrementCoalescerMBean
public long getPoolTaskCount()
getPoolTaskCount
in interface IncrementCoalescerMBean
public int getPoolLargestPoolSize()
getPoolLargestPoolSize
in interface IncrementCoalescerMBean
public int getCorePoolSize()
getCorePoolSize
in interface IncrementCoalescerMBean
public void setCorePoolSize(int newCoreSize)
setCorePoolSize
in interface IncrementCoalescerMBean
public int getMaxPoolSize()
getMaxPoolSize
in interface IncrementCoalescerMBean
public void setMaxPoolSize(int newMaxSize)
setMaxPoolSize
in interface IncrementCoalescerMBean
public long getFailedIncrements()
getFailedIncrements
in interface IncrementCoalescerMBean
public long getSuccessfulCoalescings()
getSuccessfulCoalescings
in interface IncrementCoalescerMBean
public long getTotalIncrements()
getTotalIncrements
in interface IncrementCoalescerMBean
public long getCountersMapSize()
getCountersMapSize
in interface IncrementCoalescerMBean
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.