Ramya R wrote:
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.
Have you setup the cluster to be rack-aware? Atleast in MR we have to
provide a script that resolves the rack for a given node. Might be
similar for DFS too. See topology.script.file.name parameter in
hadoop-default.conf for more details.
Amar
Any advice?
Thank in advance
Ramya