Class RegionReplicaReplicationEndpoint.RegionReplicaOutputSink
java.lang.Object
org.apache.hadoop.hbase.wal.OutputSink
org.apache.hadoop.hbase.replication.regionserver.RegionReplicaReplicationEndpoint.RegionReplicaOutputSink
- Enclosing class:
- RegionReplicaReplicationEndpoint
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.wal.OutputSink
OutputSink.WriterThread -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegionReplicaReplicationEndpoint.RegionReplicaSinkWriterprivate final TableDescriptorsFields inherited from class org.apache.hadoop.hbase.wal.OutputSink
closeCompletionService, closeThreadPool, entryBuffers, numThreads, reporter, splits, status, totalSkippedEdits -
Constructor Summary
ConstructorsConstructorDescriptionRegionReplicaOutputSink(WALSplitter.PipelineController controller, TableDescriptors tableDescriptors, EntryBuffers entryBuffers, ClusterConnection connection, ExecutorService pool, int numWriters, int operationTimeout) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(EntryBuffers.RegionEntryBuffer buffer) List<org.apache.hadoop.fs.Path>close()(package private) voidflush()intReturns number of regions we've recoveredprotected intReturns the number of currently opened writersReturns a map from encoded region ID to the number of edits written out for that region.(package private) AtomicLongbooleankeepRegionEvent(WAL.Entry entry) Some WALEdit's contain only KV's for account on what happened to a region.private booleanrequiresReplication(TableName tableName, List<WAL.Entry> entries) returns true if the specified entry must be replicated.Methods inherited from class org.apache.hadoop.hbase.wal.OutputSink
finishWriterThreads, restartWriterThreadsIfNeeded, startWriterThreads, updateStatusWithMsg
-
Field Details
-
sinkWriter
-
tableDescriptors
-
memstoreReplicationEnabled
private final org.apache.hbase.thirdparty.com.google.common.cache.Cache<TableName,Boolean> memstoreReplicationEnabled
-
-
Constructor Details
-
RegionReplicaOutputSink
public RegionReplicaOutputSink(WALSplitter.PipelineController controller, TableDescriptors tableDescriptors, EntryBuffers entryBuffers, ClusterConnection connection, ExecutorService pool, int numWriters, int operationTimeout)
-
-
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
-
flush
- Throws:
IOException
-
keepRegionEvent
Description copied from class:OutputSinkSome WALEdit's contain only KV's for account on what happened to a region. Not all sinks will want to get all of those edits.- Specified by:
keepRegionEventin classOutputSink- Returns:
- Return true if this sink wants to accept this region-level WALEdit.
-
close
- Specified by:
closein classOutputSink- 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
-
getSkippedEditsCounter
-
requiresReplication
private boolean requiresReplication(TableName tableName, List<WAL.Entry> entries) throws IOException returns true if the specified entry must be replicated. We should always replicate meta operations (e.g. flush) and use the user HTD flag to decide whether or not replicate the memstore.- Throws:
IOException
-
getNumOpenWriters
Description copied from class:OutputSinkReturns the number of currently opened writers- Specified by:
getNumOpenWritersin classOutputSink
-