Package com.github.ambry.cloud
Class VcrReplicationManager
- java.lang.Object
-
- com.github.ambry.replication.ReplicationEngine
-
- com.github.ambry.cloud.VcrReplicationManager
-
- All Implemented Interfaces:
com.github.ambry.replication.ReplicationAPI
public class VcrReplicationManager extends com.github.ambry.replication.ReplicationEngine
VcrReplicationManager
is used to backup partitions to Cloud. Partitions assignment is handled by Helix.
-
-
Field Summary
-
Fields inherited from class com.github.ambry.replication.ReplicationEngine
clusterMap, dataNodeId, dataNodeIdToReplicaThread, leaderBasedReplicationAdmin, logger, metricRegistry, mountPathToPartitionInfos, nextReplicaThreadIndexByDc, partitionToPartitionInfo, persistor, replicaSyncUpManager, replicaThreadPoolByDc, Replication_Delay_Multiplier, replicationConfig, replicationMetrics, replicaTokenFileName, rwLock, scheduler, storeKeyConverterFactory, storeManager, tokenHelper
-
-
Constructor Summary
Constructors Constructor Description VcrReplicationManager(com.github.ambry.config.CloudConfig cloudConfig, com.github.ambry.config.ReplicationConfig replicationConfig, com.github.ambry.config.ClusterMapConfig clusterMapConfig, com.github.ambry.config.StoreConfig storeConfig, com.github.ambry.server.StoreManager storeManager, com.github.ambry.store.StoreKeyFactory storeKeyFactory, com.github.ambry.clustermap.ClusterMap clusterMap, com.github.ambry.clustermap.VirtualReplicatorCluster virtualReplicatorCluster, CloudDestination cloudDestination, java.util.concurrent.ScheduledExecutorService scheduler, com.github.ambry.network.ConnectionPool connectionPool, VcrMetrics vcrMetrics, com.github.ambry.notification.NotificationSystem requestNotification, com.github.ambry.store.StoreKeyConverterFactory storeKeyConverterFactory, java.lang.String transformerClassName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getRemoteReplicaLagFromLocalInBytes(com.github.ambry.clustermap.PartitionId partitionId, java.lang.String hostName, java.lang.String replicaPath)
VcrMetrics
getVcrMetrics()
void
shutdown()
void
start()
void
updateTotalBytesReadByRemoteReplica(com.github.ambry.clustermap.PartitionId partitionId, java.lang.String hostName, java.lang.String replicaPath, long totalBytesRead)
-
Methods inherited from class com.github.ambry.replication.ReplicationEngine
addRemoteReplicaInfoToReplicaThread, controlReplicationForPartitions, getRemoteReplicaInfo, isTokenForRemoteReplicaInfo, reloadReplicationTokenIfExists, removeRemoteReplicaInfoFromReplicaThread, retrieveReplicaTokensAndPersistIfNecessary, stopPartitionReplication
-
-
-
-
Constructor Detail
-
VcrReplicationManager
public VcrReplicationManager(com.github.ambry.config.CloudConfig cloudConfig, com.github.ambry.config.ReplicationConfig replicationConfig, com.github.ambry.config.ClusterMapConfig clusterMapConfig, com.github.ambry.config.StoreConfig storeConfig, com.github.ambry.server.StoreManager storeManager, com.github.ambry.store.StoreKeyFactory storeKeyFactory, com.github.ambry.clustermap.ClusterMap clusterMap, com.github.ambry.clustermap.VirtualReplicatorCluster virtualReplicatorCluster, CloudDestination cloudDestination, java.util.concurrent.ScheduledExecutorService scheduler, com.github.ambry.network.ConnectionPool connectionPool, VcrMetrics vcrMetrics, com.github.ambry.notification.NotificationSystem requestNotification, com.github.ambry.store.StoreKeyConverterFactory storeKeyConverterFactory, java.lang.String transformerClassName) throws com.github.ambry.replication.ReplicationException, java.lang.IllegalStateException
- Throws:
com.github.ambry.replication.ReplicationException
java.lang.IllegalStateException
-
-
Method Detail
-
start
public void start() throws com.github.ambry.replication.ReplicationException
- Specified by:
start
in classcom.github.ambry.replication.ReplicationEngine
- Throws:
com.github.ambry.replication.ReplicationException
-
shutdown
public void shutdown() throws com.github.ambry.replication.ReplicationException
- Overrides:
shutdown
in classcom.github.ambry.replication.ReplicationEngine
- Throws:
com.github.ambry.replication.ReplicationException
-
getVcrMetrics
public VcrMetrics getVcrMetrics()
-
updateTotalBytesReadByRemoteReplica
public void updateTotalBytesReadByRemoteReplica(com.github.ambry.clustermap.PartitionId partitionId, java.lang.String hostName, java.lang.String replicaPath, long totalBytesRead)
- Specified by:
updateTotalBytesReadByRemoteReplica
in interfacecom.github.ambry.replication.ReplicationAPI
- Overrides:
updateTotalBytesReadByRemoteReplica
in classcom.github.ambry.replication.ReplicationEngine
-
getRemoteReplicaLagFromLocalInBytes
public long getRemoteReplicaLagFromLocalInBytes(com.github.ambry.clustermap.PartitionId partitionId, java.lang.String hostName, java.lang.String replicaPath)
- Specified by:
getRemoteReplicaLagFromLocalInBytes
in interfacecom.github.ambry.replication.ReplicationAPI
- Overrides:
getRemoteReplicaLagFromLocalInBytes
in classcom.github.ambry.replication.ReplicationEngine
-
-