Package org.apache.whirr.service

Examples of org.apache.whirr.service.Service


 
  @Test
  public void testMaxPercentFailure() throws Exception {
   
    ServiceFactory factory = mock(ServiceFactory.class);
    Service service = mock(Service.class);
    Cluster cluster = mock(Cluster.class);
    when(factory.create((String) any())).thenReturn(service);
    when(service.launchCluster((ClusterSpec) any())).thenReturn(cluster);
   
    LaunchClusterCommand command = new LaunchClusterCommand(factory);
    Map<String, File> keys = KeyPair.generateTemporaryFiles();
   
    int rc = command.run(null, out, null, Lists.newArrayList(
View Full Code Here


    if (System.getProperty("config") != null) {
      config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
    }
    config.addConfiguration(new PropertiesConfiguration("whirr-hbase-test.properties"));
    clusterSpec = ClusterSpec.withTemporaryKeys(config);
    service = new Service();

    cluster = service.launchCluster(clusterSpec);
    proxy = new HadoopProxy(clusterSpec, cluster);
    proxy.start();
View Full Code Here

      config.addConfiguration(new PropertiesConfiguration(System.getProperty("config")));
    }
    config.addConfiguration(new PropertiesConfiguration("whirr-cassandra-test.properties"));
    clusterSpec = ClusterSpec.withTemporaryKeys(config);
   
    service = new Service();
    cluster = service.launchCluster(clusterSpec);

    // give it a sec to boot up the cluster
    waitForCassandra();
  }
View Full Code Here

    try {
      if (!optionSet.hasArgument(instanceOption)) {
        throw new IllegalArgumentException("You need to specify an instance ID.");
      }
      ClusterSpec clusterSpec = getClusterSpec(optionSet);
      Service service = createService(clusterSpec.getServiceName());

      String instanceId = optionSet.valueOf(instanceOption);
      service.destroyInstance(clusterSpec, instanceId);
      updateInstancesFile(clusterSpec, instanceId);

      return 0;

    } catch(IllegalArgumentException e) {
View Full Code Here

TOP

Related Classes of org.apache.whirr.service.Service

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.