@InterfaceAudience.Private class RecoveredEditsOutputSink extends AbstractRecoveredEditsOutputSink
AbstractRecoveredEditsOutputSink.RecoveredEditsWriter
OutputSink.WriterThread
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private ConcurrentMap<String,AbstractRecoveredEditsOutputSink.RecoveredEditsWriter> |
writers |
closeCompletionService, closeThreadPool, entryBuffers, numThreads, reporter, splits, status, totalSkippedEdits
Constructor and Description |
---|
RecoveredEditsOutputSink(WALSplitter walSplitter,
WALSplitter.PipelineController controller,
EntryBuffers entryBuffers,
int numWriters) |
Modifier and Type | Method and Description |
---|---|
void |
append(EntryBuffers.RegionEntryBuffer buffer) |
List<org.apache.hadoop.fs.Path> |
close() |
private boolean |
closeWriters()
Close all of the output streams.
|
int |
getNumberOfRecoveredRegions()
Returns number of regions we've recovered
|
int |
getNumOpenWriters()
Returns the number of currently opened writers
|
Map<String,Long> |
getOutputCounts()
Returns a map from encoded region ID to the number of edits written out for that region.
|
private AbstractRecoveredEditsOutputSink.RecoveredEditsWriter |
getRecoveredEditsWriter(TableName tableName,
byte[] region,
long seqId)
Get a writer and path for a log starting at the given entry.
|
closeRecoveredEditsWriter, createRecoveredEditsWriter, keepRegionEvent, updateRegionMaximumEditLogSeqNum
finishWriterThreads, getTotalSkippedEdits, restartWriterThreadsIfNeeded, setReporter, setStatus, startWriterThreads, updateStatusWithMsg
private static final org.slf4j.Logger LOG
private ConcurrentMap<String,AbstractRecoveredEditsOutputSink.RecoveredEditsWriter> writers
public RecoveredEditsOutputSink(WALSplitter walSplitter, WALSplitter.PipelineController controller, EntryBuffers entryBuffers, int numWriters)
public void append(EntryBuffers.RegionEntryBuffer buffer) throws IOException
append
in class OutputSink
buffer
- A buffer of some number of edits for a given region.IOException
- For any IO errorsprivate AbstractRecoveredEditsOutputSink.RecoveredEditsWriter getRecoveredEditsWriter(TableName tableName, byte[] region, long seqId) throws IOException
IOException
public List<org.apache.hadoop.fs.Path> close() throws IOException
close
in class OutputSink
IOException
private boolean closeWriters() throws IOException
IOException
public Map<String,Long> getOutputCounts()
OutputSink
getOutputCounts
in class OutputSink
public int getNumberOfRecoveredRegions()
OutputSink
getNumberOfRecoveredRegions
in class OutputSink
public int getNumOpenWriters()
OutputSink
getNumOpenWriters
in class OutputSink
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.