Class RegionReplicaReplicationEndpoint
java.lang.Object
org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
org.apache.hadoop.hbase.replication.HBaseReplicationEndpoint
org.apache.hadoop.hbase.replication.regionserver.RegionReplicaReplicationEndpoint
- All Implemented Interfaces:
Abortable
,ReplicationEndpoint
,ReplicationPeerConfigListener
,org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service
A
ReplicationEndpoint
endpoint which receives the WAL
edits from the WAL, and sends the edits to replicas of regions.-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
Calls replay on the passed edits for the given set of entries belonging to the region.(package private) static class
(package private) static class
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.replication.HBaseReplicationEndpoint
HBaseReplicationEndpoint.PeerRegionServerListener
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext
Nested classes/interfaces inherited from interface org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service
org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service.Listener, org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service.State
-
Field Summary
Modifier and TypeFieldDescriptionprivate static String
private org.apache.hadoop.conf.Configuration
private ClusterConnection
private WALSplitter.PipelineController
private EntryBuffers
private static final org.slf4j.Logger
private int
private int
private ExecutorService
private TableDescriptors
Fields inherited from class org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
ctx, REPLICATION_WALENTRYFILTER_CONFIG_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether or not, the replication endpoint can replicate to it's source cluster with the same UUIDprotected void
doStart()
protected void
doStop()
private ExecutorService
getDefaultThreadPool
(org.apache.hadoop.conf.Configuration conf) Returns a Thread pool for the RPC's to region replicas.protected WALEntryFilter
Returns a WALEntryFilter for checking the scope.void
init
(ReplicationEndpoint.Context context) Initialize the replication endpoint with the given context.boolean
replicate
(ReplicationEndpoint.ReplicateContext replicateContext) Replicate the given set of entries (in the context) to the other cluster.Methods inherited from class org.apache.hadoop.hbase.replication.HBaseReplicationEndpoint
abort, disconnect, fetchSlavesAddresses, getLastRegionServerUpdate, getPeerUUID, getRegionServers, getZkw, isAborted, reconnect, setRegionServers, start, stop
Methods inherited from class org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
getNamespaceTableCfWALEntryFilter, getWALEntryfilter, isStarting, peerConfigUpdated
Methods inherited from class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning
-
Field Details
-
LOG
-
CLIENT_RETRIES_NUMBER
-
conf
-
connection
-
tableDescriptors
-
controller
-
outputSink
-
entryBuffers
-
numWriterThreads
-
operationTimeout
-
pool
-
-
Constructor Details
-
RegionReplicaReplicationEndpoint
public RegionReplicaReplicationEndpoint()
-
-
Method Details
-
init
Description copied from interface:ReplicationEndpoint
Initialize the replication endpoint with the given context.- Specified by:
init
in interfaceReplicationEndpoint
- Overrides:
init
in classBaseReplicationEndpoint
- Parameters:
context
- replication context- Throws:
IOException
- error occur when initialize the endpoint.
-
doStart
- Overrides:
doStart
in classHBaseReplicationEndpoint
-
doStop
- Overrides:
doStop
in classHBaseReplicationEndpoint
-
getDefaultThreadPool
Returns a Thread pool for the RPC's to region replicas. Similar to Connection's thread pool. -
replicate
Description copied from interface:ReplicationEndpoint
Replicate the given set of entries (in the context) to the other cluster. Can block until all the given entries are replicated. Upon this method is returned, all entries that were passed in the context are assumed to be persisted in the target cluster.- Parameters:
replicateContext
- a context where WAL entries and other parameters can be obtained.
-
canReplicateToSameCluster
Description copied from interface:ReplicationEndpoint
Whether or not, the replication endpoint can replicate to it's source cluster with the same UUID- Specified by:
canReplicateToSameCluster
in interfaceReplicationEndpoint
- Overrides:
canReplicateToSameCluster
in classBaseReplicationEndpoint
-
getScopeWALEntryFilter
Description copied from class:BaseReplicationEndpoint
Returns a WALEntryFilter for checking the scope. Subclasses can return null if they don't want this filter- Overrides:
getScopeWALEntryFilter
in classBaseReplicationEndpoint
-