@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, keepRegionEvent
finishWriting, flush, getNumOpenWriters, getSkippedEdits, setReporter, startWriterThreads, updateRegionMaximumEditLogSeqNum
private 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 LogRecoveredEditsOutputSink
IOException
boolean executeCloseTask(CompletionService<Void> completionService, List<IOException> thrown, List<org.apache.hadoop.fs.Path> paths) throws InterruptedException, ExecutionException
executeCloseTask
in class 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 LogRecoveredEditsOutputSink
public int getNumberOfRecoveredRegions()
getNumberOfRecoveredRegions
in class LogRecoveredEditsOutputSink
public void append(WALSplitter.RegionEntryBuffer buffer) throws IOException
append
in class 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–2020 The Apache Software Foundation. All rights reserved.