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
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RecoveredReplicationSourceShippercreateNewShipper(String walGroupId) Get the id that the source is replicating to.private org.apache.hadoop.fs.PathgetReplSyncUpPath(org.apache.hadoop.fs.Path path) The queue of WALs only belong to one region server.voidinit(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 serversbooleanReturns whether this is a replication source for recovery.voidlocateRecoveredPaths(String walGroupId) (package private) voidMethods 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, tryThrottleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ReplicationSourceInstantiation method used by region servers- Specified by:
initin interfaceReplicationSourceInterface- Overrides:
initin 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:
createNewShipperin 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:ReplicationSourceInterfaceGet the id that the source is replicating to.- Specified by:
getPeerIdin interfaceReplicationSourceInterface- Overrides:
getPeerIdin classReplicationSource- Returns:
- peer id
-
getServerWALsBelongTo
Description copied from interface:ReplicationSourceInterfaceThe queue of WALs only belong to one region server. This will return the server name which all WALs belong to.- Specified by:
getServerWALsBelongToin interfaceReplicationSourceInterface- Overrides:
getServerWALsBelongToin classReplicationSource- Returns:
- the server name which all WALs belong to
-
isRecovered
Description copied from interface:ReplicationSourceInterfaceReturns whether this is a replication source for recovery.
-