TableMapping (Hadoop 0.20.2-cdh3u5 API)
Date: 2012-10-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.net
Class TableMapping

    java.lang.Object
      org.apache.hadoop.net.CachedDNSToSwitchMapping
          org.apache.hadoop.net.TableMapping

All Implemented Interfaces:
  DNSToSwitchMapping

    public class TableMapping

extends CachedDNSToSwitchMapping

Simple `DNSToSwitchMapping` implementation that reads a 2 column text file. The columns are separated by whitespace. The first column is a DNS or IP address and the second column specifies the rack where the address maps.

This class uses the configuration parameter `net.topology.table.file.name` to locate the mapping file.

Calls to `CachedDNSToSwitchMapping.resolve(List)` will look up the address as defined in the mapping file. If no entry corresponding to the address is found, the value `/default-rack` is returned.

Field Summary
`static String` | `MAPPING_FILE`

Fields inherited from class org.apache.hadoop.net.CachedDNSToSwitchMapping
`rawMapping`

Constructor Summary
`TableMapping()`

Method Summary
`Configuration` | `getConf()`
`void` | `setConf(Configuration conf)`

Methods inherited from class org.apache.hadoop.net.CachedDNSToSwitchMapping
`resolve`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAPPING_FILE

    public static final String MAPPING_FILE

See Also:
  Constant Field Values

Constructor Detail

### TableMapping

    public TableMapping()

Method Detail

### getConf

    public Configuration getConf()

### setConf

    public void setConf(Configuration conf)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation