Class RecoveredReplicationSource
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.ReplicationSource
org.apache.hadoop.hbase.replication.regionserver.RecoveredReplicationSource
- All Implemented Interfaces:
ReplicationSourceInterface
Class that handles the recovered source of a replication stream, which is transfered from another
dead region server. This will be closed when all logs are pushed to peer cluster.
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.replication.regionserver.ReplicationSource
conf, DEFAULT_WAIT_ON_ENDPOINT_SECONDS, fs, logQueue, manager, queueId, queueSizePerGroup, queueStorage, replicationPeer, replicationQueueInfo, server, sourceRunning, WAIT_ON_ENDPOINT_SECONDS, walEntryFilter, workerThreads
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected RecoveredReplicationSourceShipper
createNewShipper
(String walGroupId) Get the id that the source is replicating to.private org.apache.hadoop.fs.Path
getReplSyncUpPath
(org.apache.hadoop.fs.Path path) The queue of WALs only belong to one region server.void
init
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, ReplicationSourceManager manager, ReplicationQueueStorage queueStorage, ReplicationPeer replicationPeer, Server server, String peerClusterZnode, UUID clusterId, WALFileLengthProvider walFileLengthProvider, MetricsSource metrics) Instantiation method used by region serversboolean
Returns whether this is a replication source for recovery.void
locateRecoveredPaths
(String walGroupId) (package private) void
Methods inherited from class org.apache.hadoop.hbase.replication.regionserver.ReplicationSource
addHFileRefs, enqueueLog, getCurrentPath, getQueueId, getQueues, getReplicationEndpoint, getReplicationQueueInfo, getReplicationQueueStorage, getServer, getSourceManager, getSourceMetrics, getStats, getTotalReplicatedEdits, getWalEntryFilter, getWALFileLengthProvider, getWalGroupStatus, isPeerEnabled, isSourceActive, isWorkerRunning, logPeerId, postShipEdits, sleepForRetries, startup, terminate, terminate, terminate, terminate, tryThrottle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceInterface
logPositionAndCleanOldLogs
-
Field Details
-
LOG
-
actualPeerId
-
-
Constructor Details
-
RecoveredReplicationSource
public RecoveredReplicationSource()
-
-
Method Details
-
init
public void init(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, ReplicationSourceManager manager, ReplicationQueueStorage queueStorage, ReplicationPeer replicationPeer, Server server, String peerClusterZnode, UUID clusterId, WALFileLengthProvider walFileLengthProvider, MetricsSource metrics) throws IOException Description copied from class:ReplicationSource
Instantiation method used by region servers- Specified by:
init
in interfaceReplicationSourceInterface
- Overrides:
init
in classReplicationSource
- Parameters:
conf
- configuration to usefs
- file system to usemanager
- replication manager to ping toserver
- the server for this region serverpeerClusterZnode
- the id of our replication queueclusterId
- unique UUID for the clustermetrics
- metrics for replication source- Throws:
IOException
-
createNewShipper
- Overrides:
createNewShipper
in classReplicationSource
-
locateRecoveredPaths
- Throws:
IOException
-
getReplSyncUpPath
private org.apache.hadoop.fs.Path getReplSyncUpPath(org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
tryFinish
void tryFinish() -
getPeerId
Description copied from interface:ReplicationSourceInterface
Get the id that the source is replicating to.- Specified by:
getPeerId
in interfaceReplicationSourceInterface
- Overrides:
getPeerId
in classReplicationSource
- Returns:
- peer id
-
getServerWALsBelongTo
Description copied from interface:ReplicationSourceInterface
The queue of WALs only belong to one region server. This will return the server name which all WALs belong to.- Specified by:
getServerWALsBelongTo
in interfaceReplicationSourceInterface
- Overrides:
getServerWALsBelongTo
in classReplicationSource
- Returns:
- the server name which all WALs belong to
-
isRecovered
Description copied from interface:ReplicationSourceInterface
Returns whether this is a replication source for recovery.
-