/default-rack is set when datanode has not set rackID. It is upto the datanode to tell namenode which rack it belongs to. Is your datanode doing that explicitly ? -Lohit
----- Original Message ---- From: Ramya R <[EMAIL PROTECTED]> To: core-user@hadoop.apache.org Sent: Tuesday, November 25, 2008 10:36:46 PM Subject: How to retrieve rack ID of a datanode Hi all, I want to retrieve the Rack ID of every datanode. How can I do this? I tried using getNetworkLocation() in org.apache.hadoop.hdfs.protocol.DatanodeInfo. I am getting /default-rack as the output for all datanodes. Any advice? Thank in advance Ramya