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 Map<byte[],Long> |
regionMaximumEditLogSeqNum |
protected CancelableProgressable |
reporter |
protected AtomicLong |
skippedEdits |
protected List<org.apache.hadoop.fs.Path> |
splits |
protected Map<byte[],WALSplitter.SinkWriter> |
writers |
protected boolean |
writersClosed |
protected List<WALSplitter.WriterThread> |
writerThreads |
Constructor and Description |
---|
WALSplitter.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() |
abstract Map<byte[],Long> |
getOutputCounts() |
void |
startWriterThreads()
Start the threads that will pump data from the entryBuffers to the output files.
|
protected WALSplitter.PipelineController controller
protected WALSplitter.EntryBuffers entryBuffers
protected Map<byte[],WALSplitter.SinkWriter> writers
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
protected List<org.apache.hadoop.fs.Path> splits
public WALSplitter.OutputSink(WALSplitter.PipelineController controller, WALSplitter.EntryBuffers entryBuffers, int numWriters)
public void startWriterThreads()
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
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.