Class ReplicationSourceLogQueue
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceLogQueue
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.conf.Configurationprivate static final org.slf4j.Loggerprivate intprivate MetricsSourceprivate Map<String,PriorityBlockingQueue<org.apache.hadoop.fs.Path>> private intprivate ReplicationSource -
Constructor Summary
ConstructorsConstructorDescriptionReplicationSourceLogQueue(org.apache.hadoop.conf.Configuration conf, MetricsSource metrics, ReplicationSource source) -
Method Summary
Modifier and TypeMethodDescriptionvoidRemove all the elements from the queue corresponding to walGroupIdbooleanenqueueLog(org.apache.hadoop.fs.Path wal, String walGroupId) Enqueue the walintReturns number of queues.(package private) longprivate longPriorityBlockingQueue<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>> intgetQueueSize(String walGroupId) Get the queue size for the given walGroupId.voidRemove 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. UseenqueueLog(Path, String)andremove(String)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
-