Package org.apache.whirr.state

Examples of org.apache.whirr.state.ClusterStateStoreFactory


    ClusterStateStore memStore = new MemoryClusterStateStore();
    memStore.save(createTestCluster(
      new String[]{"id1", "id2"}, new String[]{"role1", "role2"}));

    ClusterStateStoreFactory stateStoreFactory = mock(ClusterStateStoreFactory.class);
    when(stateStoreFactory.create((ClusterSpec) any())).thenReturn(memStore);

    ListClusterCommand command = new ListClusterCommand(factory, stateStoreFactory);

    Map<String, File> keys = KeyPair.generateTemporaryFiles();
    int rc = command.run(null, out, null, Lists.newArrayList(
View Full Code Here


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

    ClusterStateStoreFactory stateStoreFactory = mock(ClusterStateStoreFactory.class);
    when(stateStoreFactory.create((ClusterSpec) any())).thenReturn(memStore);

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

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

  protected HandlerMapFactory handlerMapFactory = new HandlerMapFactory();


  public ClusterController() {
    this(ComputeCache.INSTANCE, new ClusterStateStoreFactory());
  }
View Full Code Here

  protected OptionParser parser = new OptionParser();
  private Map<Property, OptionSpec<?>> optionSpecs;
  private OptionSpec<String> configOption;

  public AbstractClusterCommand(String name, String description, ClusterControllerFactory factory) {
    this(name, description, factory, new ClusterStateStoreFactory());
  }
View Full Code Here

        }
    }
  }

  private Cluster.Instance findMahoutInstance() throws IOException {
      Cluster cluster = new ClusterStateStoreFactory().create(clusterSpec).load();
      return cluster.getInstanceMatching(anyRoleIn(newHashSet(MAHOUT_CLIENT_ROLE)));
  }
View Full Code Here

      }
    }
  }

  private Cluster.Instance findPigInstance() throws IOException {
    Cluster cluster = new ClusterStateStoreFactory().create(clusterSpec).load();
    return cluster.getInstanceMatching(anyRoleIn(newHashSet(PIG_CLIENT_ROLE)));
  }
View Full Code Here

  public RunScriptCommand() {
    this(new ClusterControllerFactory());
  }

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

  public RestartServicesCommand() throws IOException {
    this(new ClusterControllerFactory());
  }

  public RestartServicesCommand(ClusterControllerFactory factory) {
    this(factory, new ClusterStateStoreFactory());
  }
View Full Code Here

  public StopServicesCommand() throws IOException {
    this(new ClusterControllerFactory());
  }

  public StopServicesCommand(ClusterControllerFactory factory) {
    this(factory, new ClusterStateStoreFactory());
  }
View Full Code Here

  public ListClusterCommand() throws IOException {
    this(new ClusterControllerFactory());
  }

  public ListClusterCommand(ClusterControllerFactory factory) {
    this(factory, new ClusterStateStoreFactory());
  }
View Full Code Here

TOP

Related Classes of org.apache.whirr.state.ClusterStateStoreFactory

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.