public abstract static class WALSplitter.OutputSink extends Object
Modifier and Type | Field and Description |
---|---|
protected Set<byte[]> |
blacklistedRegions |
protected boolean |
closeAndCleanCompleted |
protected WALSplitter.PipelineController |
controller |
protected WALSplitter.EntryBuffers |
entryBuffers |
protected int |
numThreads |
protected ConcurrentHashMap<String,Long> |
regionMaximumEditLogSeqNum |
protected CancelableProgressable |
reporter |
protected AtomicLong |
skippedEdits |
protected List<org.apache.hadoop.fs.Path> |
splits |
protected ConcurrentHashMap<String,WALSplitter.SinkWriter> |
writers |
protected boolean |
writersClosed |
protected List<WALSplitter.WriterThread> |
writerThreads |
Constructor and Description |
---|
OutputSink(WALSplitter.PipelineController controller,
WALSplitter.EntryBuffers entryBuffers,
int numWriters) |
Modifier and Type | Method and Description |
---|---|
abstract void |
append(WALSplitter.RegionEntryBuffer buffer) |
protected boolean |
finishWriting(boolean interrupt)
Wait for writer threads to dump all info to the sink
|
abstract List<org.apache.hadoop.fs.Path> |
finishWritingAndClose() |
boolean |
flush()
WriterThread call this function to help flush internal remaining edits in buffer before close
|
abstract int |
getNumberOfRecoveredRegions() |
(package private) int |
getNumOpenWriters() |
abstract Map<byte[],Long> |
getOutputCounts() |
(package private) long |
getSkippedEdits() |
abstract boolean |
keepRegionEvent(WAL.Entry entry)
Some WALEdit's contain only KV's for account on what happened to a region.
|
(package private) void |
setReporter(CancelableProgressable reporter) |
void |
startWriterThreads()
Start the threads that will pump data from the entryBuffers to the output files.
|
(package private) void |
updateRegionMaximumEditLogSeqNum(WAL.Entry entry)
Update region's maximum edit log SeqNum.
|
protected WALSplitter.PipelineController controller
protected WALSplitter.EntryBuffers entryBuffers
protected ConcurrentHashMap<String,WALSplitter.SinkWriter> writers
protected final ConcurrentHashMap<String,Long> regionMaximumEditLogSeqNum
protected final List<WALSplitter.WriterThread> writerThreads
protected final Set<byte[]> blacklistedRegions
protected boolean closeAndCleanCompleted
protected boolean writersClosed
protected final int numThreads
protected CancelableProgressable reporter
protected AtomicLong skippedEdits
public OutputSink(WALSplitter.PipelineController controller, WALSplitter.EntryBuffers entryBuffers, int numWriters)
void setReporter(CancelableProgressable reporter)
public void startWriterThreads()
void updateRegionMaximumEditLogSeqNum(WAL.Entry entry)
int getNumOpenWriters()
long getSkippedEdits()
protected boolean finishWriting(boolean interrupt) throws IOException
IOException
public abstract List<org.apache.hadoop.fs.Path> finishWritingAndClose() throws IOException
IOException
public abstract Map<byte[],Long> getOutputCounts()
public abstract int getNumberOfRecoveredRegions()
public abstract void append(WALSplitter.RegionEntryBuffer buffer) throws IOException
buffer
- A WAL Edit EntryIOException
public boolean flush() throws IOException
IOException
public abstract boolean keepRegionEvent(WAL.Entry entry)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.