Package com.linkedin.venice
Class AdminTool
- java.lang.Object
-
- com.linkedin.venice.AdminTool
-
public class AdminTool extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AdminTool.PrintFunction
-
Constructor Summary
Constructors Constructor Description AdminTool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
abortMigration(java.lang.String veniceUrl, java.lang.String storeName, java.lang.String srcClusterName, java.lang.String destClusterName, boolean force, boolean[] promptsOverride)
static void
checkMigrationStatus(org.apache.commons.cli.CommandLine cmd, AdminTool.PrintFunction printFunction)
static void
checkMigrationStatus(org.apache.commons.cli.CommandLine cmd, AdminTool.PrintFunction printFunction, ControllerClient srcControllerClient, ControllerClient destControllerClient)
static org.apache.commons.cli.CommandLine
getCommandLine(java.lang.String[] args)
protected static UpdateClusterConfigQueryParams
getUpdateClusterConfigQueryParams(org.apache.commons.cli.CommandLine cmd)
protected static boolean
isClonedStoreOnline(ControllerClient srcControllerClient, ControllerClient destControllerClient, java.lang.String storeName)
static java.util.Properties
loadProperties(org.apache.commons.cli.CommandLine cmd, Arg arg)
static void
main(java.lang.String[] args)
protected static void
printObject(java.lang.Object response, java.util.function.Consumer<java.lang.String> printFunction)
-
-
-
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)
-
checkMigrationStatus
public static void checkMigrationStatus(org.apache.commons.cli.CommandLine cmd, AdminTool.PrintFunction printFunction, ControllerClient srcControllerClient, ControllerClient destControllerClient)
-
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)
-
-