@InterfaceAudience.Private public class WALEventTrackerQueueService extends Object implements NamedQueueService
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private org.apache.hbase.thirdparty.com.google.common.collect.EvictingQueue<WALEventTrackerPayload> |
queue |
private int |
queueSize |
private MetricsWALEventTrackerSource |
source |
private static String |
WAL_EVENT_TRACKER_RING_BUFFER_SIZE |
private boolean |
walEventTrackerEnabled |
Constructor and Description |
---|
WALEventTrackerQueueService(org.apache.hadoop.conf.Configuration conf) |
WALEventTrackerQueueService(org.apache.hadoop.conf.Configuration conf,
MetricsWALEventTrackerSource source) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addToQueue(WALEventTrackerPayload payload) |
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
|
private Queue<WALEventTrackerPayload> |
getWALEventTrackerList() |
void |
persistAll(Connection connection)
Add all in memory queue records to system table.
|
private org.apache.hbase.thirdparty.com.google.common.collect.EvictingQueue<WALEventTrackerPayload> queue
private static final String WAL_EVENT_TRACKER_RING_BUFFER_SIZE
private final boolean walEventTrackerEnabled
private int queueSize
private MetricsWALEventTrackerSource source
private static final org.slf4j.Logger LOG
public WALEventTrackerQueueService(org.apache.hadoop.conf.Configuration conf)
public WALEventTrackerQueueService(org.apache.hadoop.conf.Configuration conf, MetricsWALEventTrackerSource source)
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 buffervoid addToQueue(WALEventTrackerPayload payload)
public 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(Connection connection)
NamedQueueService
persistAll
in interface NamedQueueService
private Queue<WALEventTrackerPayload> getWALEventTrackerList()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.