1
votes

So I have a small Hadoop cluster with 1 master and 5 workers. My hdfs-site.xml for masters and workers look like this:

<configuration>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/username/hadoop/yarn/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/username/hadoop/yarn/hdfs/datanode</value>
</property>
</configuration>

My cluster is running smoothly, all daemons runnning fine. I am able to access HDFS to import, export data, run word count jobs, etc... However in my workers, there is no "namenode" folder under "/home/username/hadoop/yarn/hdfs/" path. Is this a normal behaviour?

3

3 Answers

0
votes

NameNode folder should be available on namenode hosts

0
votes

Your namenode folder is present on the node where namenode daemon is running.

According to the hdfs-site.xml stated above. It is created at

/home/username/hadoop/yarn/hdfs/namenode
0
votes

It's been a while since you've posted your question, however, that is the way it should be.

In other words a worker is a data node and therefor only needs a "datanode" directory. Consequently, but this depends on your configuration, a name node does usually only have a namenode directory. An exception would be that your name node is also acting as a data node which is not recommended but possible.