Package org.apache.hadoop.hbase.master
Class RackManager
java.lang.Object
org.apache.hadoop.hbase.master.RackManager
- Direct Known Subclasses:
BalancerClusterState.DefaultRackManager
Wrapper over the rack resolution utility in Hadoop. The rack resolution utility in Hadoop does
resolution from hosts to the racks they belong to.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.net.DNSToSwitchMappingstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRack(List<ServerName> servers) Same asgetRack(ServerName)except that a list is passedgetRack(ServerName server) Get the name of the rack containing a server, according to the DNS to switch mapping.
-
Field Details
-
UNKNOWN_RACK
- See Also:
-
switchMapping
-
-
Constructor Details
-
RackManager
public RackManager() -
RackManager
-
-
Method Details
-
getRack
Get the name of the rack containing a server, according to the DNS to switch mapping.- Parameters:
server- the server for which to get the rack name- Returns:
- the rack name of the server
-
getRack
Same asgetRack(ServerName)except that a list is passed- Parameters:
servers- list of servers we're requesting racks information for- Returns:
- list of racks for the given list of servers
-