Class RackManager

java.lang.Object
org.apache.hadoop.hbase.master.RackManager
Direct Known Subclasses:
BalancerClusterState.DefaultRackManager

@Private public class RackManager extends Object
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 Details

  • Constructor Details

    • RackManager

      public RackManager()
    • RackManager

      public RackManager(org.apache.hadoop.conf.Configuration conf)
  • Method Details

    • getRack

      public String getRack(ServerName server)
      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

      public List<String> getRack(List<ServerName> servers)
      Same as getRack(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