Namenode and Datanode are not starting in hadoop
Set the dfs.namenode.name.dir
and dfs.datanode.data.dir
in hdfs-site.xml
and it looks like this:
<property> <name>dfs.namenode.name.dir</name> <value>/<local-dir path>/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>/<local-dir path>r/datanode</value> </property>
If already you have this folders in your directory then delete them and Restart your NameNode
you should configure
hadoop.tmp.dir
in yourcore-site.xml
file, and change its permissions to be accessible.you should configure
dfs.data.dir
property in yourhdfs-site.xml
file to point to a local directory, also change the permissions of that directory to be accessible.you should configure
dfs.name.dir
property in yourhdfs-site.xml
file to point to a local directory, also change the permissions of that directory to be accessible.
After doing above steps try formatting hdfs and starting hadoop. Note that you may not necessarily want to do the third step since your NameNode is already running.
Upon executing jps command you probably should be able to see your DataNode up and running...
33584 ResourceManager29907 33719 Jps33275 NameNode33469 SecondaryNameNode33677 NodeManager33359 DataNode