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, keepRegionEvent
finishWriting, flush, getNumOpenWriters, getSkippedEdits, setReporter, startWriterThreads, updateRegionMaximumEditLogSeqNum
private 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.LogRecoveredEditsOutputSink
IOException
boolean executeCloseTask(CompletionService<Void> completionService, List<IOException> thrown, List<org.apache.hadoop.fs.Path> paths) throws InterruptedException, ExecutionException
executeCloseTask
in class WALSplitter.LogRecoveredEditsOutputSink
completionService
- threadPool to execute the closing tasksthrown
- store the exceptionspaths
- arrayList to store the paths writtenInterruptedException
ExecutionException
public Map<byte[],Long> getOutputCounts()
getOutputCounts
in class WALSplitter.LogRecoveredEditsOutputSink
public int getNumberOfRecoveredRegions()
getNumberOfRecoveredRegions
in class WALSplitter.LogRecoveredEditsOutputSink
public void append(WALSplitter.RegionEntryBuffer buffer) throws IOException
append
in class WALSplitter.LogRecoveredEditsOutputSink
buffer
- contain all entries of a certain regionIOException
- when closeWriter failedprivate org.apache.hadoop.fs.Path writeThenClose(WALSplitter.RegionEntryBuffer buffer) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.