Class ReplicationSourceLogQueue
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceLogQueue
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
private int
private MetricsSource
private Map<String,
PriorityBlockingQueue<org.apache.hadoop.fs.Path>> private int
private ReplicationSource
-
Constructor Summary
ConstructorDescriptionReplicationSourceLogQueue
(org.apache.hadoop.conf.Configuration conf, MetricsSource metrics, ReplicationSource source) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Remove all the elements from the queue corresponding to walGroupIdboolean
enqueueLog
(org.apache.hadoop.fs.Path wal, String walGroupId) Enqueue the walint
Returns number of queues.(package private) long
private long
PriorityBlockingQueue<org.apache.hadoop.fs.Path>
Return queue for the given walGroupId Please don't add or remove elements from the returned queue.Map<String,
PriorityBlockingQueue<org.apache.hadoop.fs.Path>> int
getQueueSize
(String walGroupId) Get the queue size for the given walGroupId.void
Remove head from the queue corresponding to given walGroupId.
-
Field Details
-
LOG
-
queues
-
metrics
-
conf
-
queueSizePerGroup
-
logQueueWarnThreshold
-
source
-
-
Constructor Details
-
ReplicationSourceLogQueue
public ReplicationSourceLogQueue(org.apache.hadoop.conf.Configuration conf, MetricsSource metrics, ReplicationSource source)
-
-
Method Details
-
enqueueLog
Enqueue the wal- Parameters:
wal
- wal to be enqueuedwalGroupId
- Key for the wal in @queues map- Returns:
- boolean whether this is the first time we are seeing this walGroupId.
-
getQueueSize
Get the queue size for the given walGroupId.- Parameters:
walGroupId
- walGroupId
-
getNumQueues
Returns number of queues. -
getQueues
-
getQueue
Return queue for the given walGroupId Please don't add or remove elements from the returned queue. Use @enqueueLog and @remove methods respectively.- Parameters:
walGroupId
- walGroupId
-
remove
Remove head from the queue corresponding to given walGroupId.- Parameters:
walGroupId
- walGroupId
-
clear
Remove all the elements from the queue corresponding to walGroupId- Parameters:
walGroupId
- walGroupId
-
getOldestWalAge
long getOldestWalAge() -
getOldestWalTimestamp
-
getMetrics
-