Hi James, The use of /usr/lib/jvm/default-java works as long as the JAVA_HOME is set. Only tried on Unbuntu though. I also tried OpenJDK 6 in addition to Sun JDK 6. Installing OpenJDK 6 is much easier (no need to wget/tar/change defaults). I will probably file a bug in Hbase, as its jvm detection code doesn't include /usr/lib/jvm/default-java, along with many others that bigtop's detection did as Bruno pointed out earlier.
I tried /etc/init.d/hbase-master start with JAVA_HOME set in /etc/default/bigtop-utils. It doesn't seem to work. I added env cmd to the start up script, it cannot find JAVA_HOME (see below). Maybe I am using the wrong command here to start the services? Can you point me how startup scripts make use of /etc/default/bigtop-tuils? Thanks, David ubuntu@ubuntu:~$ sudo /etc/init.d/hbase-master start HADOOP_LOG_DIR=/var/log/hadoop HADOOP_IDENT_STRING=hadoop SHELL=/bin/bash HADOOP_HOME=/usr/lib/hadoop HBASE_LOG_DIR=/var/log/hbase HADOOP_DATANODE_USER=hdfs HADOOP_PID_DIR=/var/run/hadoop USER=root HBASE_HOME=/usr/lib/hbase SUDO_USER=ubuntu SUDO_UID=1001 USERNAME=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R 6/bin PWD=/home/ubuntu HADOOP_NAMENODE_USER=hdfs HBASE_IDENT_STRING=hbase HADOOP_JOBTRACKER_USER=mapred SHLVL=1 SUDO_COMMAND=/etc/init.d/hbase-master start HOME=/home/ubuntu HADOOP_SECONDARYNAMENODE_USER=hdfs LOGNAME=root HADOOP_HOME_WARN_SUPPRESS=true SUDO_GID=1001 HBASE_PID_DIR=/var/run/hbase HADOOP_TASKTRACKER_USER=mapred _=/usr/bin/env +======================================================================+ | Error: JAVA_HOME is not set and Java could not be found | +----------------------------------------------------------------------+ | Please download the latest Sun JDK from the Sun Java web site | | > http://java.sun.com/javase/downloads/ < | | | | HBase requires Java 1.6 or later. | | NOTE: This script will find Sun Java whether you install using the | | binary or the RPM based installer. | +======================================================================+ ubuntu@ubuntu:~$ On 3/22/12 8:40 AM, "James Page" <[email protected]> wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA256 > >Hi David > >On 21/03/12 07:17, David Liu (gmail dev) wrote: >> I observed inconsistency of the configuration file used between >> hadoop and hbase. Seems that when starting hadoop service using: >> /etc/init.d/hadoop-xxx start /etc/hadoop/conf/hadoop-env.sh is >> used. >> >> When starting hbase service /etc/init.d/hbase-xxx start >> /usr/lib/hbase/conf/hbase-env.sh is used. >> >> This leads to an issue during deb install: when JAVA is not >> installed at the directory that is one of on the detection list, >> even if you set your JAVA_HOME in /etc/hbase/conf/hbase-env.sh, it >> will still fail. You can try to change the >> /usr/lib/hbase/conf/hbase-env.sh file. But it is overwritten to >> what comes with the deb file during deb installation. >> >> Would appreciate if someone can confirm it is a bug or not. If so, >> we probably should track it in JIRA for fix in hbase or in bigtop. >Can you try setting JAVA_HOME in /etc/default/bigtop-utils? That >should override the automated detection of Java in all bigtop packages >and allow you to install Java in a different location. > >I was also really interested to see that you used >/usr/lib/jvm/default-java: > >export JAVA_HOME="/usr/lib/jvm/default-java" >export JAVA5_HOME="/usr/lib/jvm/default-java" > >Does this work? I have to admit that I have never actually tried that... > >If so that is great as it reduces the dependencies require to build on >Ubuntu... > >Once bigtop switches to supporting the next LTS (Ubuntu Precise) we >also have maven 3 packaged which then only leaves forrest as an >unpackaged first level build dependency. > >Cheers > >James > >- -- James Page Ubuntu Core Developer > > >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.4.11 (GNU/Linux) >Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > >iQIcBAEBCAAGBQJPa1XtAAoJEL/srsug59jDNGsP/2FXFRAwOq2QxVOFqD3wSyk8 >mfh24xLRkFVwQswTTws24iYXu1nuviMkjgE9KAg2QNHgVLoWeOn57TNBy/0FzcCH >FwBYqAINriaFP7gLP6iKaME/N2e6v1vFJ3xMV0c2szcK8ugpKZ/C5wPLWyDXlBjK >JgTRlmKeGLkfoDF79rQrlk2p6aAHUrATsFJLwQz3Uxy3M50pT8v1KW3zB+2ntWVX >w4qk9ARwAVZnk9Km8CSgkYpwhsoDyzx7Bnnf4NPxrgdmYp+TjJPiGlI7nDi0e/IQ >2LQzvu2a2hjNKOEsQrD/TVsnuHU7S5Y2G9nZR9DU5nC232OQf+hbrcAc3EhR6mFv >oRtfCLlhADQzaE6QVfrN+KjufL9As1emv7CJ1lJ3Ig5PyUdjyIciB0QOlDBiTI2g >gFyG/qV84U9/PBBwHn2muCyHafdO54zwQW1h0HK0COwupQkE4LFSw2nYg4uGgEV7 >oEiC1nbdVfAMeCxGujxCTLZWIv9430jTioUlp12ZEeDlkVzLEADGxDMJNVL3zVcX >S8c4K6huyABCGc3d7zEFjHTSk8e2N8uuask4Go+xG5Od6HOxahO3wnuxoTTaRB48 >eksDSZWBoizRF2GVMhS1D0FbRzihiY9syUFJ1pFUfpPHe8BtKkDlVFTnVr63JA3w >0/Tx681GHlwlx0miXBbo >=y0Vm >-----END PGP SIGNATURE-----
