I get the following error when I try to format the hdfs :
This is the first time im installing hadoop
hduser@dbserver:~$ /home/hduser/hadoop/bin/hadoop namenode -format
/home/hduser/hadoop/bin/hadoop: line 297:
/usr/lib/j2sdk1.5-sun/bin/java: No such file or directory
/home/hduser/hadoop/bin/hadoop: line 345:
/usr/lib/j2sdk1.5-sun/bin/java: No such file or directory
/home/hduser/hadoop/bin/hadoop: line 345: exec:
/usr/lib/j2sdk1.5-sun/bin/java: cannot execute: No such file or
directory
Any suggestions are welcome.
Best Answer
You need to uncomment and set JAVA_HOME in hadoop-env.sh file most probably.