@InterfaceAudience.Private public class LogRecoveredEditsOutputSink extends OutputSink
OutputSink.WriterThread
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.fs.FileSystem |
walFS |
private WALSplitter |
walSplitter |
blacklistedRegions, closeAndCleanCompleted, controller, entryBuffers, numThreads, regionMaximumEditLogSeqNum, reporter, skippedEdits, splits, writers, writersClosed, writerThreads
Constructor and Description |
---|
LogRecoveredEditsOutputSink(WALSplitter walSplitter,
WALSplitter.PipelineController controller,
EntryBuffers entryBuffers,
int numWriters) |
Modifier and Type | Method and Description |
---|---|
void |
append(WALSplitter.RegionEntryBuffer buffer) |
(package private) WALSplitter.WriterAndPath |
appendBuffer(WALSplitter.RegionEntryBuffer buffer,
boolean reusable) |
(package private) List<org.apache.hadoop.fs.Path> |
close()
Close all of the output streams.
|
private List<IOException> |
closeLogWriters(List<IOException> thrown) |
(package private) org.apache.hadoop.fs.Path |
closeWriter(String encodedRegionName,
WALSplitter.WriterAndPath wap,
List<IOException> thrown) |
(package private) WALSplitter.WriterAndPath |
createWAP(byte[] region,
WAL.Entry entry) |
private void |
deleteOneWithFewerEntries(WALSplitter.WriterAndPath wap,
org.apache.hadoop.fs.Path dst) |
(package private) boolean |
executeCloseTask(CompletionService<Void> completionService,
List<IOException> thrown,
List<org.apache.hadoop.fs.Path> paths) |
(package private) void |
filterCellByStore(WAL.Entry logEntry) |
List<org.apache.hadoop.fs.Path> |
finishWritingAndClose() |
int |
getNumberOfRecoveredRegions() |
Map<byte[],Long> |
getOutputCounts() |
(package private) WALSplitter.WriterAndPath |
getWriterAndPath(WAL.Entry entry,
boolean reusable)
Get a writer and path for a log starting at the given entry.
|
boolean |
keepRegionEvent(WAL.Entry entry)
Some WALEdit's contain only KV's for account on what happened to a region.
|
finishWriting, flush, getNumOpenWriters, getSkippedEdits, setReporter, startWriterThreads, updateRegionMaximumEditLogSeqNum
private static final org.slf4j.Logger LOG
private WALSplitter walSplitter
private org.apache.hadoop.fs.FileSystem walFS
private org.apache.hadoop.conf.Configuration conf
public LogRecoveredEditsOutputSink(WALSplitter walSplitter, WALSplitter.PipelineController controller, EntryBuffers entryBuffers, int numWriters)
public List<org.apache.hadoop.fs.Path> finishWritingAndClose() throws IOException
finishWritingAndClose
in class OutputSink
IOException
private void deleteOneWithFewerEntries(WALSplitter.WriterAndPath wap, org.apache.hadoop.fs.Path dst) throws IOException
IOException
List<org.apache.hadoop.fs.Path> close() throws IOException
IOException
boolean executeCloseTask(CompletionService<Void> completionService, List<IOException> thrown, List<org.apache.hadoop.fs.Path> paths) throws InterruptedException, ExecutionException
completionService
- threadPool to execute the closing tasksthrown
- store the exceptionspaths
- arrayList to store the paths writtenInterruptedException
ExecutionException
org.apache.hadoop.fs.Path closeWriter(String encodedRegionName, WALSplitter.WriterAndPath wap, List<IOException> thrown) throws IOException
IOException
private List<IOException> closeLogWriters(List<IOException> thrown) throws IOException
IOException
WALSplitter.WriterAndPath getWriterAndPath(WAL.Entry entry, boolean reusable) throws IOException
IOException
WALSplitter.WriterAndPath createWAP(byte[] region, WAL.Entry entry) throws IOException
IOException
void filterCellByStore(WAL.Entry logEntry)
public void append(WALSplitter.RegionEntryBuffer buffer) throws IOException
append
in class OutputSink
buffer
- A WAL Edit EntryIOException
WALSplitter.WriterAndPath appendBuffer(WALSplitter.RegionEntryBuffer buffer, boolean reusable) throws IOException
IOException
public boolean keepRegionEvent(WAL.Entry entry)
OutputSink
keepRegionEvent
in class OutputSink
public Map<byte[],Long> getOutputCounts()
getOutputCounts
in class OutputSink
public int getNumberOfRecoveredRegions()
getNumberOfRecoveredRegions
in class OutputSink
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.