Like everyone else in the world, I'm following this hadoop tutorial. I get to the point where I format HDFS, and I get this:
user@linux01:~$ sudo $HADOOP_INSTALL/bin/hadoop namenode -format
Error: JAVA_HOME is not set.
Well that's funny, I set JAVA_HOME in my /etc/profiles.
user@linux01:~$ tail -n 4 /etc/profile
export JAVA_HOME=/usr/local/jdk1.6.0_32/bin
export JDK_HOME=$JAVA_HOME
export PATH=$PATH:/usr/local/jdk1.6.0_32/bin
export HADOOP_INSTALL=/usr/local/hadoop/hadoop-1.0.3
Did I mess that up somehow?
user@linux01:~$ echo $JAVA_HOME
/usr/local/jdk1.6.0_32/bin
user@linux01:~$ ls $JAVA_HOME
appletviewer extcheck jar javac and so forth...
Seems to work. Maybe it absolutely has to be set in my hadoop-env.sh?
# The java implementation to use. Required.
export JAVA_HOME=$JAVA_HOME
Lazy, yeah, but I still get "JAVA_HOME is not set" with or without this comment. I'm running low on ideas. Anyone see anything I'm missing?