Class 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Cause all Venice avro client to 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, int sourceAmplificationFactor)  
      void verifyStoreVersionIsReadyForDataRecovery​(java.lang.String clusterName, java.lang.String storeName, int versionNumber, int sourceAmplificationFactor)
      Verify that target store version is ready for data recovery.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataRecoveryManager

        public DataRecoveryManager​(VeniceHelixAdmin veniceAdmin,
                                   com.linkedin.d2.balancer.D2Client d2Client,
                                   java.lang.String clusterDiscoveryD2ServiceName,
                                   java.util.Optional<ICProvider> icProvider,
                                   PubSubTopicRepository pubSubTopicRepository)
    • 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.
      • verifyStoreVersionIsReadyForDataRecovery

        public void verifyStoreVersionIsReadyForDataRecovery​(java.lang.String clusterName,
                                                             java.lang.String storeName,
                                                             int versionNumber,
                                                             int sourceAmplificationFactor)
        Verify that target store version is ready for data recovery.
      • close

        public void close()
        Cause all Venice avro client to close.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable