@InterfaceAudience.Private public class RegionReplicaReplicationEndpoint extends HBaseReplicationEndpoint
ReplicationEndpoint
endpoint which receives the WAL edits from the
WAL, and sends the edits to replicas of regions.Modifier and Type | Class and Description |
---|---|
(package private) static class |
RegionReplicaReplicationEndpoint.RegionReplicaOutputSink |
(package private) static class |
RegionReplicaReplicationEndpoint.RegionReplicaReplayCallable
Calls replay on the passed edits for the given set of entries belonging to the region.
|
(package private) static class |
RegionReplicaReplicationEndpoint.RegionReplicaSinkWriter |
(package private) static class |
RegionReplicaReplicationEndpoint.RetryingRpcCallable<V> |
private static class |
RegionReplicaReplicationEndpoint.SkipReplayedEditsFilter
Skips the entries which has original seqId.
|
HBaseReplicationEndpoint.PeerRegionServerListener
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext
Modifier and Type | Field and Description |
---|---|
private static String |
CLIENT_RETRIES_NUMBER |
private org.apache.hadoop.conf.Configuration |
conf |
private ClusterConnection |
connection |
private WALSplitter.PipelineController |
controller |
private WALSplitter.EntryBuffers |
entryBuffers |
private static org.apache.commons.logging.Log |
LOG |
private int |
numWriterThreads |
private int |
operationTimeout |
private RegionReplicaReplicationEndpoint.RegionReplicaOutputSink |
outputSink |
private ExecutorService |
pool |
private TableDescriptors |
tableDescriptors |
ctx
Constructor and Description |
---|
RegionReplicaReplicationEndpoint() |
Modifier and Type | Method and Description |
---|---|
boolean |
canReplicateToSameCluster()
Whether or not, the replication endpoint can replicate to it's source cluster with the same
UUID
|
protected 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 |
getScopeWALEntryFilter()
Returns a WALEntryFilter for checking the scope.
|
protected WALEntryFilter |
getSkipReplayedEditsFilter() |
WALEntryFilter |
getWALEntryfilter()
Returns a default set of filters
|
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.
|
abort, disconnect, fetchSlavesAddresses, getLastRegionServerUpdate, getPeerUUID, getRegionServers, getZkw, isAborted, reconnect, setRegionServers
getTableCfWALEntryFilter
isRunning, notifyFailed, notifyStarted, notifyStopped, start, startAndWait, state, stop, stopAndWait, toString
private static final org.apache.commons.logging.Log LOG
private static String CLIENT_RETRIES_NUMBER
private org.apache.hadoop.conf.Configuration conf
private ClusterConnection connection
private TableDescriptors tableDescriptors
private WALSplitter.PipelineController controller
private RegionReplicaReplicationEndpoint.RegionReplicaOutputSink outputSink
private WALSplitter.EntryBuffers entryBuffers
private int numWriterThreads
private int operationTimeout
private ExecutorService pool
public WALEntryFilter getWALEntryfilter()
BaseReplicationEndpoint
getWALEntryfilter
in interface ReplicationEndpoint
getWALEntryfilter
in class BaseReplicationEndpoint
WALEntryFilter
or null.protected WALEntryFilter getSkipReplayedEditsFilter()
public void init(ReplicationEndpoint.Context context) throws IOException
ReplicationEndpoint
init
in interface ReplicationEndpoint
init
in class BaseReplicationEndpoint
context
- replication contextIOException
protected void doStart()
doStart
in class HBaseReplicationEndpoint
protected void doStop()
doStop
in class HBaseReplicationEndpoint
private ExecutorService getDefaultThreadPool(org.apache.hadoop.conf.Configuration conf)
public boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
ReplicationEndpoint
replicateContext
- a context where WAL entries and other
parameters can be obtained.public boolean canReplicateToSameCluster()
ReplicationEndpoint
canReplicateToSameCluster
in interface ReplicationEndpoint
canReplicateToSameCluster
in class BaseReplicationEndpoint
protected WALEntryFilter getScopeWALEntryFilter()
BaseReplicationEndpoint
getScopeWALEntryFilter
in class BaseReplicationEndpoint
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.