public interface Clusters
| Modifier and Type | Method and Description |
|---|---|
void |
addCluster(String clusterName)
Add a new Cluster
|
void |
addHost(String hostname)
Add a Host object to be managed by this server
|
void |
debugDump(StringBuilder sb)
Produces a debug dump into the supplied string buffer
|
void |
deleteCluster(String clusterName)
Deletes the cluster identified by the name
|
void |
deleteHost(String hostname)
Removes a host.
|
Cluster |
getCluster(String clusterName)
Gets the Cluster given the cluster name
|
Cluster |
getClusterById(long id)
Gets the cluster using the id.
|
Map<String,Cluster> |
getClusters()
Get all clusters
|
Set<Cluster> |
getClustersForHost(String hostname)
Returns all the cluster names for this hostname
|
Host |
getHost(String hostname)
Get a Host object managed by this server
|
List<Host> |
getHosts()
Get all hosts being tracked by the Ambari server
|
Map<String,Host> |
getHostsForCluster(String clusterName)
Gets all the hosts associated with the cluster
|
void |
mapHostsToCluster(Set<String> hostnames,
String clusterName)
Maps a set of hosts to the given cluster
|
void |
mapHostToCluster(String hostname,
String clusterName)
Map host to the given cluster.
|
void |
setCurrentStackVersion(String clusterName,
StackId stackId)
Sets the current stack version for the cluster
|
void |
unmapHostFromCluster(String hostname,
String clusterName)
Removes a host from a cluster.
|
void |
updateClusterName(String oldName,
String newName)
Updates the name of the cluster
|
void |
updateHostWithClusterAndAttributes(Map<String,Set<String>> hostsClusters,
Map<String,Map<String,String>> hostAttributes)
Update the host set for clusters and the host attributes associated with the hosts
|
void addCluster(String clusterName) throws AmbariException
clusterName - AmbariExceptionCluster getCluster(String clusterName) throws AmbariException
clusterName - Name of the Cluster to retrieveCluster identified by the given nameAmbariExceptionMap<String,Cluster> getClusters()
Map of clusters with cluster name as keyList<Host> getHosts()
List of HostSet<Cluster> getClustersForHost(String hostname) throws AmbariException
hostname - AmbariExceptionHost getHost(String hostname) throws AmbariException
hostname - Name of the host requestedAmbariExceptionvoid addHost(String hostname) throws AmbariException
hostname - Host to be addedAmbariExceptionvoid mapHostToCluster(String hostname, String clusterName) throws AmbariException
hostname - clusterName - AmbariExceptionvoid mapHostsToCluster(Set<String> hostnames, String clusterName) throws AmbariException
hostnames - clusterName - AmbariExceptionvoid updateClusterName(String oldName, String newName)
oldName - newName - AmbariExceptionCluster getClusterById(long id) throws AmbariException
id - The identifier associated with the clusterCluster identified by the identifierAmbariExceptionvoid debugDump(StringBuilder sb)
sb - The string buffer to add the debug dump toMap<String,Host> getHostsForCluster(String clusterName) throws AmbariException
clusterName - The name of the clusterMap containing host name and HostAmbariExceptionvoid deleteCluster(String clusterName) throws AmbariException
clusterName - The name of the clusterAmbariExceptionvoid setCurrentStackVersion(String clusterName, StackId stackId) throws AmbariException
clusterName - The name of the clusterstackId - The identifier for the stackAmbariExceptionvoid updateHostWithClusterAndAttributes(Map<String,Set<String>> hostsClusters, Map<String,Map<String,String>> hostAttributes) throws AmbariException
hostsClusters - hostAttributes - AmbariExceptionvoid unmapHostFromCluster(String hostname, String clusterName) throws AmbariException
hostname - clusterName - AmbariExceptionvoid deleteHost(String hostname) throws AmbariException
addHost(String)hostname - AmbariExceptionCopyright © 2016. All rights reserved.