HBASE-2074 Improvements to the hadoop-config script
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@894505 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bdcfe1f11c
commit
b6a18a17d9
|
@ -257,6 +257,7 @@ Release 0.21.0 - Unreleased
|
||||||
times
|
times
|
||||||
HBASE-2062 Metrics documentation outdated (Lars George via JD)
|
HBASE-2062 Metrics documentation outdated (Lars George via JD)
|
||||||
HBASE-2045 Update trunk and branch zk to just-release 3.2.2.
|
HBASE-2045 Update trunk and branch zk to just-release 3.2.2.
|
||||||
|
HBASE-2074 Improvements to the hadoop-config script
|
||||||
|
|
||||||
NEW FEATURES
|
NEW FEATURES
|
||||||
HBASE-1901 "General" partitioner for "hbase-48" bulk (behind the api, write
|
HBASE-1901 "General" partitioner for "hbase-48" bulk (behind the api, write
|
||||||
|
|
|
@ -44,7 +44,9 @@ bin=`cd "$bin"; pwd`
|
||||||
this="$bin/$script"
|
this="$bin/$script"
|
||||||
|
|
||||||
# the root of the hbase installation
|
# the root of the hbase installation
|
||||||
|
if [ -z "$HBASE_HOME" ]; then
|
||||||
export HBASE_HOME=`dirname "$this"`/..
|
export HBASE_HOME=`dirname "$this"`/..
|
||||||
|
fi
|
||||||
|
|
||||||
#check to see if the conf dir or hbase home are given as an optional arguments
|
#check to see if the conf dir or hbase home are given as an optional arguments
|
||||||
while [ $# -gt 1 ]
|
while [ $# -gt 1 ]
|
||||||
|
@ -71,3 +73,33 @@ done
|
||||||
HBASE_CONF_DIR="${HBASE_CONF_DIR:-$HBASE_HOME/conf}"
|
HBASE_CONF_DIR="${HBASE_CONF_DIR:-$HBASE_HOME/conf}"
|
||||||
# List of hbase regions servers.
|
# List of hbase regions servers.
|
||||||
HBASE_REGIONSERVERS="${HBASE_REGIONSERVERS:-$HBASE_CONF_DIR/regionservers}"
|
HBASE_REGIONSERVERS="${HBASE_REGIONSERVERS:-$HBASE_CONF_DIR/regionservers}"
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
for candidate in \
|
||||||
|
/usr/lib/jvm/java-6-sun \
|
||||||
|
/usr/lib/j2sdk1.6-sun \
|
||||||
|
/usr/java/jdk1.6* \
|
||||||
|
/usr/java/jre1.6* \
|
||||||
|
/Library/Java/Home ; do
|
||||||
|
if [ -e $candidate/bin/java ]; then
|
||||||
|
export JAVA_HOME=$candidate
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# if we didn't set it
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
cat 1>&2 <<EOF
|
||||||
|
+======================================================================+
|
||||||
|
| 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. |
|
||||||
|
+======================================================================+
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue