Search in sources :

Example 1 with DestroyClusterCommand

use of org.apache.whirr.cli.command.DestroyClusterCommand in project whirr by apache.

the class DestroyCluster method doExecute.

@Override
protected Object doExecute() throws Exception {
    validateInput();
    DestroyClusterCommand command = new DestroyClusterCommand(clusterControllerFactory);
    ClusterSpec clusterSpec = getClusterSpec();
    if (clusterSpec != null) {
        command.run(System.in, System.out, System.err, clusterSpec);
    }
    return null;
}
Also used : DestroyClusterCommand(org.apache.whirr.cli.command.DestroyClusterCommand) ClusterSpec(org.apache.whirr.ClusterSpec)

Example 2 with DestroyClusterCommand

use of org.apache.whirr.cli.command.DestroyClusterCommand in project whirr by apache.

the class Main method main.

public static void main(String... args) throws Exception {
    Main main = new Main(new LaunchClusterCommand(), new DestroyClusterCommand());
    int rc = main.run(System.in, System.out, System.err, Arrays.asList(args));
    System.exit(rc);
}
Also used : DestroyClusterCommand(org.apache.whirr.cli.command.DestroyClusterCommand) LaunchClusterCommand(org.apache.whirr.cli.command.LaunchClusterCommand)

Aggregations

DestroyClusterCommand (org.apache.whirr.cli.command.DestroyClusterCommand)2 ClusterSpec (org.apache.whirr.ClusterSpec)1 LaunchClusterCommand (org.apache.whirr.cli.command.LaunchClusterCommand)1