Package org.apache.hadoop.hbase.wal
Class BoundedRecoveredEditsOutputSink
java.lang.Object
org.apache.hadoop.hbase.wal.OutputSink
org.apache.hadoop.hbase.wal.AbstractRecoveredEditsOutputSink
org.apache.hadoop.hbase.wal.BoundedRecoveredEditsOutputSink
Class that manages the output streams from the log splitting process. Every region may have many
recovered edits file. But the opening writers is bounded. Bounded means the output streams will
be no more than the size of threadpool.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.wal.AbstractRecoveredEditsOutputSink
AbstractRecoveredEditsOutputSink.RecoveredEditsWriterNested classes/interfaces inherited from class org.apache.hadoop.hbase.wal.OutputSink
OutputSink.WriterThread -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate final AtomicIntegerprivate ConcurrentMap<String,Long> Fields inherited from class org.apache.hadoop.hbase.wal.OutputSink
closeCompletionService, closeThreadPool, entryBuffers, numThreads, reporter, splits, status, totalSkippedEdits -
Constructor Summary
ConstructorsConstructorDescriptionBoundedRecoveredEditsOutputSink(WALSplitter walSplitter, WALSplitter.PipelineController controller, EntryBuffers entryBuffers, int numWriters) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(EntryBuffers.RegionEntryBuffer buffer) List<org.apache.hadoop.fs.Path>close()intReturns number of regions we've recovered(package private) intReturns the number of currently opened writersReturns a map from encoded region ID to the number of edits written out for that region.private booleanWrite out the remaining RegionEntryBuffers and close the writers.Methods inherited from class org.apache.hadoop.hbase.wal.AbstractRecoveredEditsOutputSink
abortRecoveredEditsWriter, closeRecoveredEditsWriterAndFinalizeEdits, createRecoveredEditsWriter, keepRegionEvent, updateRegionMaximumEditLogSeqNumMethods inherited from class org.apache.hadoop.hbase.wal.OutputSink
finishWriterThreads, getTotalSkippedEdits, restartWriterThreadsIfNeeded, setReporter, setStatus, startWriterThreads, updateStatusWithMsg
-
Field Details
-
LOG
-
regionEditsWrittenMap
-
openingWritersNum
-
-
Constructor Details
-
BoundedRecoveredEditsOutputSink
public BoundedRecoveredEditsOutputSink(WALSplitter walSplitter, WALSplitter.PipelineController controller, EntryBuffers entryBuffers, int numWriters)
-
-
Method Details
-
append
- Specified by:
appendin classOutputSink- Parameters:
buffer- A buffer of some number of edits for a given region.- Throws:
IOException- For any IO errors
-
close
- Specified by:
closein classOutputSink- Throws:
IOException
-
writeRemainingEntryBuffers
Write out the remaining RegionEntryBuffers and close the writers.- Returns:
- true when there is no error.
- Throws:
IOException
-
getOutputCounts
Description copied from class:OutputSinkReturns a map from encoded region ID to the number of edits written out for that region.- Specified by:
getOutputCountsin classOutputSink
-
getNumberOfRecoveredRegions
Description copied from class:OutputSinkReturns number of regions we've recovered- Specified by:
getNumberOfRecoveredRegionsin classOutputSink
-
getNumOpenWriters
int getNumOpenWriters()Description copied from class:OutputSinkReturns the number of currently opened writers- Specified by:
getNumOpenWritersin classOutputSink
-