Package org.apache.whirr

Examples of org.apache.whirr.ClusterControllerFactory


* A command to list the nodes in a cluster.
*/
public class ListClusterCommand extends AbstractClusterCommand {

  public ListClusterCommand() throws IOException {
    this(new ClusterControllerFactory());
  }
View Full Code Here


*/
@Beta
public class CleanupClusterCommand extends AbstractClusterCommand {

  public CleanupClusterCommand() throws IOException {
    this(new ClusterControllerFactory());
  }
View Full Code Here

*/
@Beta
public class ConfigureServicesCommand extends RoleLifecycleCommand {

  public ConfigureServicesCommand() throws IOException {
    this(new ClusterControllerFactory());
  }
View Full Code Here

* A command to start the cluster services
*/
public class StartServicesCommand extends RoleLifecycleCommand {

  public StartServicesCommand() throws IOException {
    this(new ClusterControllerFactory());
  }
View Full Code Here

* A command to launch a new cluster.
*/
public class LaunchClusterCommand extends AbstractClusterCommand {

  public LaunchClusterCommand() throws IOException {
    this(new ClusterControllerFactory());
  }
View Full Code Here

    .accepts("instance-id", "Cluster instance ID")
    .withRequiredArg()
    .ofType(String.class);

  public DestroyInstanceCommand() throws IOException {
    this(new ClusterControllerFactory());
  }
View Full Code Here

public class AbstractClusterSpecCommandTest {

  @Test
  public void testOverrides() throws Exception {
    AbstractClusterSpecCommand clusterSpecCommand = new AbstractClusterSpecCommand("name",
        "description", new ClusterControllerFactory()) {
      @Override
      public int run(InputStream in, PrintStream out, PrintStream err,
          List<String> args) throws Exception {
        return 0;
      }
View Full Code Here

   * Ensure that an invalid service name uses the default (after logging a
   * warning).
   */
  public void testCreateServerWithInvalidClusterControllerName() throws Exception {
    AbstractClusterSpecCommand clusterSpecCommand = new AbstractClusterSpecCommand("name",
        "description", new ClusterControllerFactory()) {
      @Override
      public int run(InputStream in, PrintStream out, PrintStream err,
          List<String> args) throws Exception {
        return 0;
      }
View Full Code Here

        " --instance-id <ID> [OPTIONS]"));
  }

  @Test
  public void testDestroyInstanceById() throws Exception {
    ClusterControllerFactory factory = mock(ClusterControllerFactory.class);
    ClusterController controller = mock(ClusterController.class);
    when(factory.create((String) any())).thenReturn(controller);

    DestroyInstanceCommand command = new DestroyInstanceCommand(factory);
    Map<String, File> keys = KeyPair.generateTemporaryFiles();

    int rc = command.run(null, out, null, Lists.newArrayList(
View Full Code Here

      containsString("Please specify a script file to be executed."));
  }

  @Test
  public void testRunScriptByInstanceId() throws Exception {
    ClusterControllerFactory factory = mock(ClusterControllerFactory.class);
    ClusterController controller = mock(ClusterController.class);

    when(factory.create((String)any())).thenReturn(controller);

    RunScriptCommand command = new RunScriptCommand(factory);
    Map<String, File> keys = KeyPair.generateTemporaryFiles();

    int rc = command.run(null, out, System.err, Lists.newArrayList(
View Full Code Here

TOP

Related Classes of org.apache.whirr.ClusterControllerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.