| Constructor and Description |
|---|
ClustersImpl() |
| 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>> hostClusters,
Map<String,Map<String,String>> hostAttributes)
Update the host set for clusters and the host attributes associated with the hosts
|
public void addCluster(String clusterName) throws AmbariException
ClustersaddCluster in interface ClustersAmbariExceptionpublic Cluster getCluster(String clusterName) throws AmbariException
ClustersgetCluster in interface ClustersclusterName - Name of the Cluster to retrieveCluster identified by the given nameAmbariExceptionpublic Cluster getClusterById(long id) throws AmbariException
ClustersgetClusterById in interface Clustersid - The identifier associated with the clusterCluster identified by the identifierAmbariExceptionpublic void setCurrentStackVersion(String clusterName, StackId stackId) throws AmbariException
ClusterssetCurrentStackVersion in interface ClustersclusterName - The name of the clusterstackId - The identifier for the stackAmbariExceptionpublic List<Host> getHosts()
Clusterspublic Set<Cluster> getClustersForHost(String hostname) throws AmbariException
ClustersgetClustersForHost in interface ClustersAmbariExceptionpublic Host getHost(String hostname) throws AmbariException
ClustersgetHost in interface Clustershostname - Name of the host requestedAmbariExceptionpublic void addHost(String hostname) throws AmbariException
ClustersaddHost in interface Clustershostname - Host to be addedAmbariExceptionpublic void updateHostWithClusterAndAttributes(Map<String,Set<String>> hostClusters, Map<String,Map<String,String>> hostAttributes) throws AmbariException
ClustersupdateHostWithClusterAndAttributes in interface ClustersAmbariExceptionpublic void mapHostToCluster(String hostname, String clusterName) throws AmbariException
ClustersmapHostToCluster in interface ClustersAmbariExceptionpublic Map<String,Cluster> getClusters()
ClustersgetClusters in interface ClustersMap of clusters with cluster name as keypublic void mapHostsToCluster(Set<String> hostnames, String clusterName) throws AmbariException
ClustersmapHostsToCluster in interface ClustersAmbariExceptionpublic void updateClusterName(String oldName, String newName)
ClustersupdateClusterName in interface Clusterspublic void debugDump(StringBuilder sb)
Clusterspublic Map<String,Host> getHostsForCluster(String clusterName) throws AmbariException
ClustersgetHostsForCluster in interface ClustersclusterName - The name of the clusterMap containing host name and HostAmbariExceptionpublic void deleteCluster(String clusterName) throws AmbariException
ClustersdeleteCluster in interface ClustersclusterName - The name of the clusterAmbariExceptionpublic void unmapHostFromCluster(String hostname, String clusterName) throws AmbariException
ClustersunmapHostFromCluster in interface ClustersAmbariExceptionpublic void deleteHost(String hostname) throws AmbariException
ClustersClusters.addHost(String)deleteHost in interface ClustersAmbariExceptionCopyright © 2016. All rights reserved.