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
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static classCalls replay on the passed edits for the given set of entries belonging to the region.(package private) static class(package private) static classNested classes/interfaces inherited from class org.apache.hadoop.hbase.replication.HBaseReplicationEndpoint
HBaseReplicationEndpoint.PeerRegionServerListenerNested classes/interfaces inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContextNested 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
FieldsModifier and TypeFieldDescriptionprivate static Stringprivate org.apache.hadoop.conf.Configurationprivate ClusterConnectionprivate WALSplitter.PipelineControllerprivate EntryBuffersprivate static final org.slf4j.Loggerprivate intprivate intprivate ExecutorServiceprivate TableDescriptorsFields inherited from class org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
ctx, REPLICATION_WALENTRYFILTER_CONFIG_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether or not, the replication endpoint can replicate to it's source cluster with the same UUIDprotected voiddoStart()protected voiddoStop()private ExecutorServicegetDefaultThreadPool(org.apache.hadoop.conf.Configuration conf) Returns a Thread pool for the RPC's to region replicas.protected WALEntryFilterReturns a WALEntryFilter for checking the scope.voidinit(ReplicationEndpoint.Context context) Initialize the replication endpoint with the given context.booleanreplicate(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, stopMethods inherited from class org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
getNamespaceTableCfWALEntryFilter, getWALEntryfilter, isStarting, peerConfigUpdatedMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:ReplicationEndpointInitialize the replication endpoint with the given context.- Specified by:
initin interfaceReplicationEndpoint- Overrides:
initin classBaseReplicationEndpoint- Parameters:
context- replication context- Throws:
IOException- error occur when initialize the endpoint.
-
doStart
- Overrides:
doStartin classHBaseReplicationEndpoint
-
doStop
- Overrides:
doStopin classHBaseReplicationEndpoint
-
getDefaultThreadPool
Returns a Thread pool for the RPC's to region replicas. Similar to Connection's thread pool. -
replicate
Description copied from interface:ReplicationEndpointReplicate 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:ReplicationEndpointWhether or not, the replication endpoint can replicate to it's source cluster with the same UUID- Specified by:
canReplicateToSameClusterin interfaceReplicationEndpoint- Overrides:
canReplicateToSameClusterin classBaseReplicationEndpoint
-
getScopeWALEntryFilter
Description copied from class:BaseReplicationEndpointReturns a WALEntryFilter for checking the scope. Subclasses can return null if they don't want this filter- Overrides:
getScopeWALEntryFilterin classBaseReplicationEndpoint
-