public class VcrReplicationManager
extends com.github.ambry.replication.ReplicationEngine
VcrReplicationManager
is used to backup partitions to Cloud. Partitions assignment is handled by Helix.clusterMap, dataNodeId, dataNodeIdToReplicaThread, leaderBasedReplicationAdmin, logger, metricRegistry, mountPathToPartitionInfos, nextReplicaThreadIndexByDc, partitionToPartitionInfo, persistor, replicaSyncUpManager, replicaThreadPoolByDc, Replication_Delay_Multiplier, replicationConfig, replicationMetrics, replicaTokenFileName, rwLock, scheduler, storeKeyConverterFactory, storeManager, tokenHelper
Constructor and 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) |
Modifier and Type | Method and 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) |
addRemoteReplicaInfoToReplicaThread, controlReplicationForPartitions, getRemoteReplicaInfo, isTokenForRemoteReplicaInfo, reloadReplicationTokenIfExists, removeRemoteReplicaInfoFromReplicaThread, retrieveReplicaTokensAndPersistIfNecessary, stopPartitionReplication
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
com.github.ambry.replication.ReplicationException
java.lang.IllegalStateException
public void start() throws com.github.ambry.replication.ReplicationException
start
in class com.github.ambry.replication.ReplicationEngine
com.github.ambry.replication.ReplicationException
public void shutdown() throws com.github.ambry.replication.ReplicationException
shutdown
in class com.github.ambry.replication.ReplicationEngine
com.github.ambry.replication.ReplicationException
public VcrMetrics getVcrMetrics()
public void updateTotalBytesReadByRemoteReplica(com.github.ambry.clustermap.PartitionId partitionId, java.lang.String hostName, java.lang.String replicaPath, long totalBytesRead)
updateTotalBytesReadByRemoteReplica
in interface com.github.ambry.replication.ReplicationAPI
updateTotalBytesReadByRemoteReplica
in class com.github.ambry.replication.ReplicationEngine
public long getRemoteReplicaLagFromLocalInBytes(com.github.ambry.clustermap.PartitionId partitionId, java.lang.String hostName, java.lang.String replicaPath)
getRemoteReplicaLagFromLocalInBytes
in interface com.github.ambry.replication.ReplicationAPI
getRemoteReplicaLagFromLocalInBytes
in class com.github.ambry.replication.ReplicationEngine