Class DataRecoveryManager
- java.lang.Object
-
- com.linkedin.venice.controller.datarecovery.DataRecoveryManager
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class DataRecoveryManager extends java.lang.Object implements java.io.Closeable
This class contains all the logics to: 1. Validate a Venice store version for data recovery. i.e. make sure the destination fabric is capable of data recovery and its previous sates are reset/cleared properly. 2. Prepare a Venice store version for data recovery. i.e. delete the existing version, Helix resources and kafka topic. 3. Initiate the data recovery by recreating the version, kafka topic and Helix resources accordingly.
-
-
Constructor Summary
Constructors Constructor Description DataRecoveryManager(VeniceHelixAdmin veniceAdmin, java.util.Optional<ICProvider> icProvider, PubSubTopicRepository pubSubTopicRepository, ParticipantStoreClientsManager participantStoreClientsManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
initiateDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, boolean copyAllVersionConfigs, Version sourceFabricVersion)
Initiate data recovery process by recreating the version, kafka topic, and Helix resources accordingly.void
prepareStoreVersionForDataRecovery(java.lang.String clusterName, java.lang.String storeName, java.lang.String destinationFabric, int versionNumber)
void
verifyStoreVersionIsReadyForDataRecovery(java.lang.String clusterName, java.lang.String storeName, int versionNumber)
Verify that target store version is ready for data recovery.
-
-
-
Constructor Detail
-
DataRecoveryManager
public DataRecoveryManager(VeniceHelixAdmin veniceAdmin, java.util.Optional<ICProvider> icProvider, PubSubTopicRepository pubSubTopicRepository, ParticipantStoreClientsManager participantStoreClientsManager)
-
-
Method Detail
-
initiateDataRecovery
public void initiateDataRecovery(java.lang.String clusterName, java.lang.String storeName, int version, java.lang.String sourceFabric, boolean copyAllVersionConfigs, Version sourceFabricVersion)
Initiate data recovery process by recreating the version, kafka topic, and Helix resources accordingly.
-
prepareStoreVersionForDataRecovery
public void prepareStoreVersionForDataRecovery(java.lang.String clusterName, java.lang.String storeName, java.lang.String destinationFabric, int versionNumber)
-
verifyStoreVersionIsReadyForDataRecovery
public void verifyStoreVersionIsReadyForDataRecovery(java.lang.String clusterName, java.lang.String storeName, int versionNumber)
Verify that target store version is ready for data recovery.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-