Class DataRecoveryManager
java.lang.Object
com.linkedin.venice.controller.datarecovery.DataRecoveryManager
- All Implemented Interfaces:
Closeable
,AutoCloseable
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
ConstructorsConstructorDescriptionDataRecoveryManager
(VeniceHelixAdmin veniceAdmin, Optional<ICProvider> icProvider, PubSubTopicRepository pubSubTopicRepository, ParticipantStoreClientsManager participantStoreClientsManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
initiateDataRecovery
(String clusterName, String storeName, int version, String sourceFabric, boolean copyAllVersionConfigs, Version sourceFabricVersion) Initiate data recovery process by recreating the version, kafka topic, and Helix resources accordingly.void
prepareStoreVersionForDataRecovery
(String clusterName, String storeName, String destinationFabric, int versionNumber) void
verifyStoreVersionIsReadyForDataRecovery
(String clusterName, String storeName, int versionNumber) Verify that target store version is ready for data recovery.
-
Constructor Details
-
DataRecoveryManager
public DataRecoveryManager(VeniceHelixAdmin veniceAdmin, Optional<ICProvider> icProvider, PubSubTopicRepository pubSubTopicRepository, ParticipantStoreClientsManager participantStoreClientsManager)
-
-
Method Details
-
initiateDataRecovery
public void initiateDataRecovery(String clusterName, String storeName, int version, String sourceFabric, boolean copyAllVersionConfigs, Version sourceFabricVersion) Initiate data recovery process by recreating the version, kafka topic, and Helix resources accordingly. -
prepareStoreVersionForDataRecovery
-
verifyStoreVersionIsReadyForDataRecovery
public void verifyStoreVersionIsReadyForDataRecovery(String clusterName, String storeName, int versionNumber) Verify that target store version is ready for data recovery. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-