org.apache.whirr
Class ByonClusterController
java.lang.Object
org.apache.whirr.ClusterController
org.apache.whirr.ByonClusterController
public class ByonClusterController
- extends ClusterController
Equivalent of ClusterController
, but for execution in BYON mode
("bring your own nodes").
Methods inherited from class org.apache.whirr.ClusterController |
cleanupCluster, cleanupCluster, configureServices, configureServices, defaultRunScriptOptionsForSpec, destroyCluster, getClusterStateStore, getCompute, getHandlerMapFactory, getInstances, getInstances, launchCluster, runningInGroup, runScriptOnNodesMatching, setHandlerMapFactory, startServices, startServices, startServices, stopServices, stopServices, stopServices |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByonClusterController
public ByonClusterController()
ByonClusterController
public ByonClusterController(com.google.common.base.Function<ClusterSpec,org.jclouds.compute.ComputeServiceContext> getCompute,
ClusterStateStoreFactory stateStoreFactory)
getName
public String getName()
- Overrides:
getName
in class ClusterController
- Returns:
- the unique name of the service.
destroyCluster
public void destroyCluster(ClusterSpec clusterSpec)
throws IOException,
InterruptedException
- Destroys a whirr BYON cluster.
Because this is a BYON cluster it also stops the services.
- Overrides:
destroyCluster
in class ClusterController
- Throws:
IOException
- if there is a problem while stopping the cluster. The cluster may
or may not have been stopped.
InterruptedException
- if the thread is interrupted.
bootstrapCluster
public Cluster bootstrapCluster(ClusterSpec clusterSpec)
throws IOException,
InterruptedException
- Provisions the hardware for a BYON cluster.
- Overrides:
bootstrapCluster
in class ClusterController
- Throws:
IOException
InterruptedException
configureServices
public Cluster configureServices(ClusterSpec clusterSpec,
Cluster cluster,
Set<String> targetRoles,
Set<String> targetInstanceIds)
throws IOException,
InterruptedException
- Configures cluster services for a BYON cluster.
- Overrides:
configureServices
in class ClusterController
- Throws:
IOException
InterruptedException
runScriptOnNodesMatching
public Map<? extends org.jclouds.compute.domain.NodeMetadata,org.jclouds.compute.domain.ExecResponse> runScriptOnNodesMatching(ClusterSpec spec,
com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> condition,
org.jclouds.scriptbuilder.domain.Statement statement)
throws IOException,
org.jclouds.compute.RunScriptOnNodesException
- Overrides:
runScriptOnNodesMatching
in class ClusterController
- Throws:
IOException
org.jclouds.compute.RunScriptOnNodesException
destroyInstance
public void destroyInstance(ClusterSpec clusterSpec,
String instanceId)
throws IOException
- Overrides:
destroyInstance
in class ClusterController
- Throws:
IOException
getNodes
public Set<? extends org.jclouds.compute.domain.NodeMetadata> getNodes(ClusterSpec clusterSpec)
throws IOException,
InterruptedException
- Overrides:
getNodes
in class ClusterController
- Throws:
IOException
InterruptedException
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.