Class AdminTool


  • public class AdminTool
    extends java.lang.Object
    • Constructor Detail

      • AdminTool

        public AdminTool()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getCommandLine

        public static org.apache.commons.cli.CommandLine getCommandLine​(java.lang.String[] args)
                                                                 throws org.apache.commons.cli.ParseException,
                                                                        java.io.IOException
        Throws:
        org.apache.commons.cli.ParseException
        java.io.IOException
      • getUpdateClusterConfigQueryParams

        protected static UpdateClusterConfigQueryParams getUpdateClusterConfigQueryParams​(org.apache.commons.cli.CommandLine cmd)
      • checkMigrationStatus

        public static void checkMigrationStatus​(org.apache.commons.cli.CommandLine cmd,
                                                AdminTool.PrintFunction printFunction)
      • isClonedStoreOnline

        protected static boolean isClonedStoreOnline​(ControllerClient srcControllerClient,
                                                     ControllerClient destControllerClient,
                                                     java.lang.String storeName)
      • abortMigration

        public static void abortMigration​(java.lang.String veniceUrl,
                                          java.lang.String storeName,
                                          java.lang.String srcClusterName,
                                          java.lang.String destClusterName,
                                          boolean force,
                                          boolean[] promptsOverride)
        Parameters:
        promptsOverride - is an array of boolean used to replace/override user's responses to various possible prompts when calling abort migration programmatically. The corresponding response for each index is defined as follows: [0] Continue to execute abort migration even if the store doesn't appear to be migrating. [1] Continue to reset store migration flag, storeConfig and cluster discovery mapping. [2] Continue to delete the cloned store in the destination cluster.
      • loadProperties

        public static java.util.Properties loadProperties​(org.apache.commons.cli.CommandLine cmd,
                                                          Arg arg)
                                                   throws VeniceException
        Throws:
        VeniceException
      • printObject

        protected static void printObject​(java.lang.Object response,
                                          java.util.function.Consumer<java.lang.String> printFunction)