@InterfaceAudience.Private public class RackManager extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.net.DNSToSwitchMapping |
switchMapping |
static String |
UNKNOWN_RACK |
Constructor and Description |
---|
RackManager() |
RackManager(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getRack(List<ServerName> servers)
Same as
getRack(ServerName) except that a list is passed |
String |
getRack(ServerName server)
Get the name of the rack containing a server, according to the DNS to
switch mapping.
|
private static final org.slf4j.Logger LOG
public static final String UNKNOWN_RACK
private org.apache.hadoop.net.DNSToSwitchMapping switchMapping
public RackManager()
public RackManager(org.apache.hadoop.conf.Configuration conf)
public String getRack(ServerName server)
server
- the server for which to get the rack namepublic List<String> getRack(List<ServerName> servers)
getRack(ServerName)
except that a list is passedservers
- list of servers we're requesting racks information forCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.