public abstract class RoleLifecycleCommand extends AbstractClusterCommand
factory, parser, stateStoreFactory| Constructor and Description |
|---|
RoleLifecycleCommand(String name,
String description,
ClusterControllerFactory factory,
ClusterStateStoreFactory stateStoreFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected Set<String> |
getTargetInstanceIdsOrEmpty(joptsimple.OptionSet optionSet)
Get the list of targeted instance IDs for this command or an empty set
|
protected Set<String> |
getTargetRolesOrEmpty(joptsimple.OptionSet optionSet)
Get the list of targeted roles for this command or an empty set
|
void |
printUsage(PrintStream stream)
Print a generic usage indication for this class of commands
|
int |
run(InputStream in,
PrintStream out,
PrintStream err,
List<String> args) |
abstract int |
runLifecycleStep(ClusterSpec clusterSpec,
ClusterController controller,
joptsimple.OptionSet optionSet)
Implement this method to trigger the relevant role lifecycle action
|
createClusterController, createClusterStateStore, getCluster, getClusterSpec, printErrorAndHelpHint, printProviderInfogetDescription, getNamepublic RoleLifecycleCommand(String name, String description, ClusterControllerFactory factory, ClusterStateStoreFactory stateStoreFactory)
public abstract int runLifecycleStep(ClusterSpec clusterSpec, ClusterController controller, joptsimple.OptionSet optionSet) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception
protected Set<String> getTargetRolesOrEmpty(joptsimple.OptionSet optionSet)
protected Set<String> getTargetInstanceIdsOrEmpty(joptsimple.OptionSet optionSet)
public void printUsage(PrintStream stream) throws IOException
printUsage in class AbstractClusterCommandIOExceptionCopyright © 2010–2016 Cloudera. All rights reserved.