4. Verify Rack Awareness

After the services have started, verify that rack awareness has been activated by looking in the NameNode logs located in /var/log/hadoop/hdfs/ (for example: hadoop-hdfs-namenode-sandbox.log). You should see an entry like this:

014-01-13 15:58:08,495 INFO org.apache.hadoop.net.NetworkTopology: Adding a new node: /rack01/<ipaddress>

Also, the Hadoop fsck command should return something like the following (if there are two racks):

Status: HEALTHY 
Total size: 123456789 B 
Total dirs: 0 
Total files: 1 
Total blocks (validated): 1 (avg. block size 123456789 B) 
Minimally replicated blocks: 1 (100.0 %) 
Over-replicated blocks: 0 (0.0 %) 
Under-replicated blocks: 0 (0.0 %) 
Mis-replicated blocks: 0 (0.0 %) 
Default replication factor: 3 
Average block replication: 3.0 
Corrupt blocks: 0 
Missing replicas: 0 (0.0 %) 
Number of data-nodes: 40 
Number of racks: 2 
FSCK ended at Mon Jan 13 17:10:51 UTC 2014 in 1 milliseconds

loading table of contents...