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
Modifier and TypeFieldDescriptionprivate final RegionReplicaReplicationEndpoint.RegionReplicaSinkWriter
private final TableDescriptors
Fields inherited from class org.apache.hadoop.hbase.wal.OutputSink
closeCompletionService, closeThreadPool, entryBuffers, numThreads, reporter, splits, status, totalSkippedEdits
-
Constructor Summary
ConstructorDescriptionRegionReplicaOutputSink
(WALSplitter.PipelineController controller, TableDescriptors tableDescriptors, EntryBuffers entryBuffers, ClusterConnection connection, ExecutorService pool, int numWriters, int operationTimeout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(EntryBuffers.RegionEntryBuffer buffer) List<org.apache.hadoop.fs.Path>
close()
(package private) void
flush()
int
Returns number of regions we've recoveredprotected int
Returns the number of currently opened writersReturns a map from encoded region ID to the number of edits written out for that region.(package private) AtomicLong
boolean
keepRegionEvent
(WAL.Entry entry) Some WALEdit's contain only KV's for account on what happened to a region.private boolean
requiresReplication
(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:
append
in 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:OutputSink
Some 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:
keepRegionEvent
in classOutputSink
- Returns:
- Return true if this sink wants to accept this region-level WALEdit.
-
close
- Specified by:
close
in classOutputSink
- Throws:
IOException
-
getOutputCounts
Description copied from class:OutputSink
Returns a map from encoded region ID to the number of edits written out for that region.- Specified by:
getOutputCounts
in classOutputSink
-
getNumberOfRecoveredRegions
Description copied from class:OutputSink
Returns number of regions we've recovered- Specified by:
getNumberOfRecoveredRegions
in 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:OutputSink
Returns the number of currently opened writers- Specified by:
getNumOpenWriters
in classOutputSink
-