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() |
abstract Map<byte[],Long> |
getOutputCounts() |
abstract boolean |
keepRegionEvent(WAL.Entry entry)
Some WALEdit's contain only KV's for account on what happened to a region.
|
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 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
protected List<org.apache.hadoop.fs.Path> splits
public 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
public abstract boolean keepRegionEvent(WAL.Entry entry)
Copyright © 2007–2019 Cloudera. All rights reserved.