@InterfaceAudience.Private public class BoundedLogWriterCreationOutputSink extends LogRecoveredEditsOutputSink
OutputSink.WriterThread| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG |
private ConcurrentHashMap<String,Long> |
regionRecoverStatMap |
blacklistedRegions, closeAndCleanCompleted, controller, entryBuffers, numThreads, regionMaximumEditLogSeqNum, reporter, skippedEdits, splits, writers, writersClosed, writerThreads| Constructor and Description |
|---|
BoundedLogWriterCreationOutputSink(WALSplitter walSplitter,
WALSplitter.PipelineController controller,
EntryBuffers entryBuffers,
int numWriters) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(WALSplitter.RegionEntryBuffer buffer)
Append the buffer to a new recovered edits file, then close it after all done
|
(package private) boolean |
executeCloseTask(CompletionService<Void> completionService,
List<IOException> thrown,
List<org.apache.hadoop.fs.Path> paths) |
List<org.apache.hadoop.fs.Path> |
finishWritingAndClose() |
int |
getNumberOfRecoveredRegions() |
Map<byte[],Long> |
getOutputCounts()
since the splitting process may create multiple output files, we need a map
regionRecoverStatMap to track the output count of each region.
|
private org.apache.hadoop.fs.Path |
writeThenClose(WALSplitter.RegionEntryBuffer buffer) |
appendBuffer, close, closeWriter, createWAP, filterCellByStore, getWriterAndPath, keepRegionEventfinishWriting, flush, getNumOpenWriters, getSkippedEdits, setReporter, startWriterThreads, updateRegionMaximumEditLogSeqNumprivate static final org.slf4j.Logger LOG
private ConcurrentHashMap<String,Long> regionRecoverStatMap
public BoundedLogWriterCreationOutputSink(WALSplitter walSplitter, WALSplitter.PipelineController controller, EntryBuffers entryBuffers, int numWriters)
public List<org.apache.hadoop.fs.Path> finishWritingAndClose() throws IOException
finishWritingAndClose in class LogRecoveredEditsOutputSinkIOExceptionboolean executeCloseTask(CompletionService<Void> completionService, List<IOException> thrown, List<org.apache.hadoop.fs.Path> paths) throws InterruptedException, ExecutionException
executeCloseTask in class LogRecoveredEditsOutputSinkcompletionService - threadPool to execute the closing tasksthrown - store the exceptionspaths - arrayList to store the paths writtenInterruptedExceptionExecutionExceptionpublic Map<byte[],Long> getOutputCounts()
getOutputCounts in class LogRecoveredEditsOutputSinkpublic int getNumberOfRecoveredRegions()
getNumberOfRecoveredRegions in class LogRecoveredEditsOutputSinkpublic void append(WALSplitter.RegionEntryBuffer buffer) throws IOException
append in class LogRecoveredEditsOutputSinkbuffer - contain all entries of a certain regionIOException - when closeWriter failedprivate org.apache.hadoop.fs.Path writeThenClose(WALSplitter.RegionEntryBuffer buffer) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.