public class HostGroupInfo extends Object
Constructor and Description |
---|
HostGroupInfo(String hostGroupName)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addHost(String hostName)
Associate a single host name to the host group.
|
void |
addHostRackInfo(String host,
String rackInfo)
Registers host rack information.
|
void |
addHosts(Collection<String> hosts)
Associate multiple host names to the host group.
|
Configuration |
getConfiguration()
Get the host group configuration associated with the host group.
|
String |
getHostGroupName()
Get the host group name.
|
Collection<String> |
getHostNames()
Get the collection of user specified host names for the host group.
|
Map<String,String> |
getHostRackInfo()
Returns a map with host names mapped to rack information.
|
Predicate |
getPredicate()
Get the compiled host predicate for the host group.
|
String |
getPredicateString()
Get the host predicate string for the host group.
|
int |
getRequestedHostCount()
Get the requested host count.
|
void |
removeHost(String hostname)
Removes hostname from group
|
void |
setConfiguration(Configuration configuration)
Set host group configuration for the host group.
|
void |
setPredicate(String predicateString)
Set the host predicate for the host group.
|
void |
setRequestedCount(int num)
Set the requested host count for the host group.
|
public HostGroupInfo(String hostGroupName)
hostGroupName
- host group namepublic String getHostGroupName()
public Collection<String> getHostNames()
public int getRequestedHostCount()
public void addHost(String hostName)
hostName
- the host name to associate with the host grouppublic void addHosts(Collection<String> hosts)
hosts
- collection of host names to associate with the host grouppublic void setRequestedCount(int num)
num
- requested host countpublic void setConfiguration(Configuration configuration)
configuration
- configuration instancepublic Configuration getConfiguration()
public void setPredicate(String predicateString) throws InvalidQueryException
predicateString
- host predicate as a stringInvalidQueryException
- if compilation of the predicate failspublic Predicate getPredicate()
public String getPredicateString()
public void addHostRackInfo(String host, String rackInfo)
host
- the name of the hostrackInfo
- the rack informationpublic Map<String,String> getHostRackInfo()
public void removeHost(String hostname)
hostname
- Copyright © 2022 Apache Software Foundation. All rights reserved.