In the world of NoSQL

If you have limited connectivity between nodes, i.e. if half your datanodes are connected to one switch, and the other half to another, it’s wise to configure it so that the NameNode is aware of this.

To configure this, you set property to point to a script that reads the node names as arguments, and prints out the location of the node to standard out (space separated). It needs to be able to handle both hostname and IP address.

To configure the NameNode, add the following to /etc/hadoop/conf/hdfs-site.xml:


My topology script looks like this:

declare -A topology
while read host ip rack; do
done < ${HADOOP_CONF}/
while [ -n "$1" ]; do
  echo -n "${topology[$1]:=/default/rack} "

And my contains: /dc-se/rack-1 /dc-se/rack-2

§590 · augusti 16, 2014 · Hadoop · Tags: , , , · [Print]

Leave a Reply