0

hadoop dfs default only hows relative path. for example

hadoop dfs -ls / .... /tmp1/ .... /tmp2/

How do I check which cluster it is from. the full path.

Amro
  • 123,847
  • 25
  • 243
  • 454
user398384
  • 1,124
  • 3
  • 14
  • 21

1 Answers1

1

There is only one cluster you have which is Hadoop cluster and in this cluster you have once Namenode (may be added avatar node or backup node) and multiple datanodes. HDFS is configured at cluster level so namenode is running HDFS master components and all the datanodes are running HDFS slave components however from logical perspective there is only ONE HDFS scattered across in your cluster.

So now when you call hadoop Dfs -ls command you will get logical view of HDFS which will show the file system view available on every node. This is what everyone will see at any node.

The HDFS configuration explains which physical folder the HDFS is configured within your namenode and datanodes. Open your conf/hdfs-sites.xml which will show you what the physical path is

<property>
 <name>dfs.name.dir</name>
 <value>FOLDER_INFO</value>
</property>
<property>
 <name>dfs.data.dir</name>
 <value>FOLDER_INFO</value>
</property>
AvkashChauhan
  • 20,495
  • 3
  • 34
  • 65