@InterfaceAudience.Private public class BalancerDecisionQueueService extends Object implements NamedQueueService
Modifier and Type | Field and Description |
---|---|
private static String |
BALANCER_DECISION_QUEUE_SIZE |
private Queue<org.apache.hadoop.hbase.shaded.protobuf.generated.RecentLogs.BalancerDecision> |
balancerDecisionQueue |
private static int |
DEFAULT_BALANCER_DECISION_QUEUE_SIZE |
private boolean |
isBalancerDecisionRecording |
private static org.slf4j.Logger |
LOG |
private static int |
REGION_PLANS_THRESHOLD_PER_BALANCER |
Constructor and Description |
---|
BalancerDecisionQueueService(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
boolean |
clearNamedQueue()
Cleans up queues maintained by services.
|
void |
consumeEventFromDisruptor(NamedQueuePayload namedQueuePayload)
This implementation is generic for consuming records from LMAX disruptor and inserts records to
EvictingQueue which is maintained by each ringbuffer provider.
|
NamedQueuePayload.NamedQueueEvent |
getEvent()
Retrieve event type for NamedQueueService implementation.
|
NamedQueueGetResponse |
getNamedQueueRecords(NamedQueueGetRequest request)
Retrieve in memory queue records from ringbuffer
|
void |
persistAll()
Add all in memory queue records to system table.
|
private static final org.slf4j.Logger LOG
private final boolean isBalancerDecisionRecording
private static final String BALANCER_DECISION_QUEUE_SIZE
private static final int DEFAULT_BALANCER_DECISION_QUEUE_SIZE
private static final int REGION_PLANS_THRESHOLD_PER_BALANCER
private final Queue<org.apache.hadoop.hbase.shaded.protobuf.generated.RecentLogs.BalancerDecision> balancerDecisionQueue
public BalancerDecisionQueueService(org.apache.hadoop.conf.Configuration conf)
public NamedQueuePayload.NamedQueueEvent getEvent()
NamedQueueService
getEvent
in interface NamedQueueService
NamedQueuePayload.NamedQueueEvent
public void consumeEventFromDisruptor(NamedQueuePayload namedQueuePayload)
NamedQueueService
consumeEventFromDisruptor
in interface NamedQueueService
namedQueuePayload
- namedQueue payload from disruptor ring bufferpublic boolean clearNamedQueue()
NamedQueueService
clearNamedQueue
in interface NamedQueueService
public NamedQueueGetResponse getNamedQueueRecords(NamedQueueGetRequest request)
NamedQueueService
getNamedQueueRecords
in interface NamedQueueService
request
- namedQueue request with event typepublic void persistAll()
NamedQueueService
persistAll
in interface NamedQueueService
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.