Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "topology_rack_awareness_scripts" page has been changed by EdwardCapriolo. http://wiki.apache.org/hadoop/topology_rack_awareness_scripts -------------------------------------------------- New page: == Topology Scripts == Topology scripts are used by hadoop to determine the rack location of nodes. This information is used by hadoop to replicate block data to redundant racks. Here is a sample script that uses a separate data file. == Sample 1: Script with datafile == === Topology Script === {{{ HADOOP_CONF=/etc/hadoop/conf while [ $# -gt 0 ] ; do . nodeArg=$1 exec< ${HADOOP_CONF}/topology.data result="" while read line ; do . ar=( $line ) if [ "${ar[0]}" = "$nodeArg" ] ; then . result="${ar[1]}" fi done shift if [ -z "$result" ] ; then . echo -n "/default-rack " else . echo -n "$result " fi done }}} === Topology data === {{{ hadoopdata1.ec.com /dc1/rack1 hadoopdata1 /dc1/rack1 10.1.1.1 /dc1/rack1 }}}