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
- AmbariException
Cluster getCluster(String clusterName) throws AmbariException
clusterName
- Name of the Cluster to retrieveCluster
identified by the given nameAmbariException
Map<String,Cluster> getClusters()
Map
of clusters with cluster name as keyList<Host> getHosts()
List
of Host
Set<Cluster> getClustersForHost(String hostname) throws AmbariException
hostname
- AmbariException
Host getHost(String hostname) throws AmbariException
hostname
- Name of the host requestedAmbariException
void addHost(String hostname) throws AmbariException
hostname
- Host to be addedAmbariException
void mapHostToCluster(String hostname, String clusterName) throws AmbariException
hostname
- clusterName
- AmbariException
void mapHostsToCluster(Set<String> hostnames, String clusterName) throws AmbariException
hostnames
- clusterName
- AmbariException
void updateClusterName(String oldName, String newName)
oldName
- newName
- AmbariException
Cluster getClusterById(long id) throws AmbariException
id
- The identifier associated with the clusterCluster
identified by the identifierAmbariException
void 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 Host
AmbariException
void deleteCluster(String clusterName) throws AmbariException
clusterName
- The name of the clusterAmbariException
void setCurrentStackVersion(String clusterName, StackId stackId) throws AmbariException
clusterName
- The name of the clusterstackId
- The identifier for the stackAmbariException
void updateHostWithClusterAndAttributes(Map<String,Set<String>> hostsClusters, Map<String,Map<String,String>> hostAttributes) throws AmbariException
hostsClusters
- hostAttributes
- AmbariException
void unmapHostFromCluster(String hostname, String clusterName) throws AmbariException
hostname
- clusterName
- AmbariException
void deleteHost(String hostname) throws AmbariException
addHost(String)
hostname
- AmbariException
Copyright © 2016. All rights reserved.