public class ReplicationSourceWALReader
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.BlockingQueue<org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader.WALEntryBatch> |
entryBatchQueue |
protected int |
replicationBatchCountCapacity |
| Constructor and Description |
|---|
ReplicationSourceWALReader(FileSystem fs,
Configuration conf,
java.util.concurrent.PriorityBlockingQueue<Path> logQueue,
long startPosition,
WALEntryFilter filter,
ReplicationSource source)
Creates a reader worker for a given WAL queue.
|
| Modifier and Type | Method and Description |
|---|---|
Path |
getCurrentPath() |
protected void |
handleEmptyWALEntryBatch(org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader.WALEntryBatch batch,
Path currentPath) |
boolean |
isReaderRunning() |
void |
run() |
void |
setReaderRunning(boolean readerRunning) |
org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader.WALEntryBatch |
take()
Retrieves the next batch of WAL entries from the queue, waiting up to the specified time for a
batch to become available
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected final java.util.concurrent.BlockingQueue<org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader.WALEntryBatch> entryBatchQueue
protected final int replicationBatchCountCapacity
public ReplicationSourceWALReader(FileSystem fs,
Configuration conf,
java.util.concurrent.PriorityBlockingQueue<Path> logQueue,
long startPosition,
WALEntryFilter filter,
ReplicationSource source)
fs - the files system to useconf - configuration to uselogQueue - The WAL queue to read off ofstartPosition - position in the first WAL to start reading fromfilter - The filter to use while readingsource - replication sourcepublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadprotected void handleEmptyWALEntryBatch(org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader.WALEntryBatch batch,
Path currentPath)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic Path getCurrentPath()
public org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALReader.WALEntryBatch take()
throws java.lang.InterruptedException
java.lang.InterruptedException - if interrupted while waitingpublic boolean isReaderRunning()
public void setReaderRunning(boolean readerRunning)
readerRunning - the readerRunning to set