diff --git a/CHANGES.txt b/CHANGES.txt index 5c9306d4b2e..4000199018d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -33,6 +33,7 @@ Trunk (unreleased changes) HADOOP-2040 Hudson hangs AFTER test has finished HADOOP-2274 Excess synchronization introduced by HADOOP-2139 negatively impacts performance + HADOOP-2196 Fix how hbase sits in hadoop 'package' product IMPROVEMENTS HADOOP-2401 Add convenience put method that takes writable diff --git a/bin/hbase-config.sh b/bin/hbase-config.sh index 54d38967071..95d1cafa4c5 100644 --- a/bin/hbase-config.sh +++ b/bin/hbase-config.sh @@ -80,7 +80,18 @@ do done # If no hadoop home specified, then we assume its above this directory. -HADOOP_HOME="${HADOOP_HOME:-$HBASE_HOME/../../../}" +# Can be in one of two places. If we've been packaged, then it'll be +# two levels above us. If we are running from src at src/contrib/hbase +# or from the build directory at build/contrib/hbase, then its three +# levels up. Look for the hadoop script. +if [ "$HADOOP_HOME" = "" ]; then + if [ -f "$HBASE_HOME/../../bin/hadoop" ]; then + HADOOP_HOME="$HBASE_HOME/../../" + else + HADOOP_HOME="$HBASE_HOME/../../../" + fi +fi + # Allow alternate hadoop conf dir location. HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_HOME/conf}" # Allow alternate hbase conf dir location. diff --git a/build.xml b/build.xml index 28643c1d934..6ed7fcf3be2 100644 --- a/build.xml +++ b/build.xml @@ -19,10 +19,6 @@ * limitations under the License. */ --> - @@ -104,6 +100,43 @@ to call at top-level: ant deploy-contrib compile-core-test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +