@InterfaceAudience.Private class BoundedRecoveredEditsOutputSink extends AbstractRecoveredEditsOutputSink
AbstractRecoveredEditsOutputSink.RecoveredEditsWriter
OutputSink.WriterThread
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private AtomicInteger |
openingWritersNum |
private ConcurrentMap<String,Long> |
regionEditsWrittenMap |
closeCompletionService, closeThreadPool, entryBuffers, numThreads, reporter, splits, status, totalSkippedEdits
Constructor and Description |
---|
BoundedRecoveredEditsOutputSink(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() |
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 boolean |
writeRemainingEntryBuffers()
Write out the remaining RegionEntryBuffers and close the writers.
|
closeRecoveredEditsWriter, createRecoveredEditsWriter, keepRegionEvent, updateRegionMaximumEditLogSeqNum
finishWriterThreads, getTotalSkippedEdits, restartWriterThreadsIfNeeded, setReporter, setStatus, startWriterThreads, updateStatusWithMsg
private static final org.slf4j.Logger LOG
private ConcurrentMap<String,Long> regionEditsWrittenMap
private final AtomicInteger openingWritersNum
public BoundedRecoveredEditsOutputSink(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 errorspublic List<org.apache.hadoop.fs.Path> close() throws IOException
close
in class OutputSink
IOException
private boolean writeRemainingEntryBuffers() 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.