class WALSplitter.BoundedLogWriterCreationOutputSink extends WALSplitter.LogRecoveredEditsOutputSink
| Modifier and Type | Field and Description |
|---|---|
private ConcurrentHashMap<String,Long> |
regionRecoverStatMap |
blacklistedRegions, closeAndCleanCompleted, controller, entryBuffers, numThreads, regionMaximumEditLogSeqNum, reporter, skippedEdits, splits, writers, writersClosed, writerThreads| Constructor and Description |
|---|
BoundedLogWriterCreationOutputSink(WALSplitter.PipelineController controller,
WALSplitter.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 ConcurrentHashMap<String,Long> regionRecoverStatMap
public BoundedLogWriterCreationOutputSink(WALSplitter.PipelineController controller, WALSplitter.EntryBuffers entryBuffers, int numWriters)
public List<org.apache.hadoop.fs.Path> finishWritingAndClose() throws IOException
finishWritingAndClose in class WALSplitter.LogRecoveredEditsOutputSinkIOExceptionboolean executeCloseTask(CompletionService<Void> completionService, List<IOException> thrown, List<org.apache.hadoop.fs.Path> paths) throws InterruptedException, ExecutionException
executeCloseTask in class WALSplitter.LogRecoveredEditsOutputSinkcompletionService - threadPool to execute the closing tasksthrown - store the exceptionspaths - arrayList to store the paths writtenInterruptedExceptionExecutionExceptionpublic Map<byte[],Long> getOutputCounts()
getOutputCounts in class WALSplitter.LogRecoveredEditsOutputSinkpublic int getNumberOfRecoveredRegions()
getNumberOfRecoveredRegions in class WALSplitter.LogRecoveredEditsOutputSinkpublic void append(WALSplitter.RegionEntryBuffer buffer) throws IOException
append in class WALSplitter.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.