Package org.apache.whirr

Examples of org.apache.whirr.ClusterControllerFactory


    assertThat(predicate.getValue().toString(), is(expected.toString()));
  }

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

    ClusterStateStore memStore = new MemoryClusterStateStore();
    memStore.save(createTestCluster(
      new String[]{"reg/A", "reg/B"}, new String[]{"A", "B"}));
View Full Code Here


public class AbstractClusterCommandTest {

  @Test
  public void testOverrides() throws Exception {
    AbstractClusterCommand clusterCommand = new AbstractClusterCommand("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 {
    AbstractClusterCommand clusterCommand = new AbstractClusterCommand("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

    .accepts("script", "Path to script file to execute.")
    .withRequiredArg()
    .ofType(String.class);

  public RunScriptCommand() {
    this(new ClusterControllerFactory());
  }
View Full Code Here

  Set<String> testedComputeProviders = ImmutableSet.of("aws-ec2",
      "cloudservers-us", "cloudservers-uk", "byon");

  public ListProvidersCommand() {
    super("list-providers", "Show a list of the supported providers",
        new ClusterControllerFactory());
  }
View Full Code Here

* 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

* 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

    .accepts("script", "Path to script file to execute.")
    .withRequiredArg()
    .ofType(String.class);

  public RunScriptCommand() {
    this(new ClusterControllerFactory());
  }
View Full Code Here

* 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

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.