@InterfaceAudience.Private public class BoundedRecoveredHFilesOutputSink extends OutputSink
HFiles.
Runs with a bounded number of HFile writers at any one time rather than let the count run up.OutputSink.WriterThread| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG |
private AtomicInteger |
openingWritersNum |
private ConcurrentMap<String,Long> |
regionEditsWrittenMap |
private WALSplitter |
walSplitter |
closeCompletionService, closeThreadPool, entryBuffers, numThreads, reporter, splits, status, totalSkippedEdits| Constructor and Description |
|---|
BoundedRecoveredHFilesOutputSink(WALSplitter walSplitter,
WALSplitter.PipelineController controller,
EntryBuffers entryBuffers,
int numWriters) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(EntryBuffers.RegionEntryBuffer buffer) |
List<org.apache.hadoop.fs.Path> |
close() |
private StoreFileWriter |
createRecoveredHFileWriter(TableName tableName,
String regionName,
long seqId,
String familyName,
boolean isMetaTable) |
int |
getNumberOfRecoveredRegions() |
int |
getNumOpenWriters() |
Map<String,Long> |
getOutputCounts() |
boolean |
keepRegionEvent(WAL.Entry entry)
Some WALEdit's contain only KV's for account on what happened to a region.
|
private boolean |
writeRemainingEntryBuffers()
Write out the remaining RegionEntryBuffers and close the writers.
|
finishWriterThreads, getTotalSkippedEdits, restartWriterThreadsIfNeeded, setReporter, setStatus, startWriterThreads, updateStatusWithMsgprivate static final org.slf4j.Logger LOG
private final WALSplitter walSplitter
private ConcurrentMap<String,Long> regionEditsWrittenMap
private final AtomicInteger openingWritersNum
public BoundedRecoveredHFilesOutputSink(WALSplitter walSplitter, WALSplitter.PipelineController controller, EntryBuffers entryBuffers, int numWriters)
public void append(EntryBuffers.RegionEntryBuffer buffer) throws IOException
append in class OutputSinkbuffer - A buffer of some number of edits for a given region.IOException - For any IO errorspublic List<org.apache.hadoop.fs.Path> close() throws IOException
close in class OutputSinkIOExceptionprivate boolean writeRemainingEntryBuffers() throws IOException
IOExceptionpublic Map<String,Long> getOutputCounts()
getOutputCounts in class OutputSinkpublic int getNumberOfRecoveredRegions()
getNumberOfRecoveredRegions in class OutputSinkpublic int getNumOpenWriters()
getNumOpenWriters in class OutputSinkpublic boolean keepRegionEvent(WAL.Entry entry)
OutputSinkkeepRegionEvent in class OutputSinkprivate StoreFileWriter createRecoveredHFileWriter(TableName tableName, String regionName, long seqId, String familyName, boolean isMetaTable) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.