class WALSplitter.LogRecoveredEditsOutputSink extends WALSplitter.OutputSink
blacklistedRegions, closeAndCleanCompleted, controller, entryBuffers, numThreads, regionMaximumEditLogSeqNum, reporter, skippedEdits, splits, writers, writersClosed, writerThreads
Constructor and Description |
---|
LogRecoveredEditsOutputSink(WALSplitter.PipelineController controller,
WALSplitter.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
public LogRecoveredEditsOutputSink(WALSplitter.PipelineController controller, WALSplitter.EntryBuffers entryBuffers, int numWriters)
public List<org.apache.hadoop.fs.Path> finishWritingAndClose() throws IOException
finishWritingAndClose
in class WALSplitter.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 WALSplitter.OutputSink
buffer
- A WAL Edit EntryIOException
WALSplitter.WriterAndPath appendBuffer(WALSplitter.RegionEntryBuffer buffer, boolean reusable) throws IOException
IOException
public boolean keepRegionEvent(WAL.Entry entry)
WALSplitter.OutputSink
keepRegionEvent
in class WALSplitter.OutputSink
public Map<byte[],Long> getOutputCounts()
getOutputCounts
in class WALSplitter.OutputSink
public int getNumberOfRecoveredRegions()
getNumberOfRecoveredRegions
in class WALSplitter.OutputSink
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.