You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/11/26 16:48:19 UTC

[30/39] git commit: ACCUMULO-645 switch to using HADOOP_PREFIX and HADOOP_CONF_DIR

ACCUMULO-645 switch to using HADOOP_PREFIX and HADOOP_CONF_DIR

git-svn-id: https://svn.apache.org/repos/asf/accumulo/trunk@1431051 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit b8fdefd91927f82809dfdc4004569f2e223ebdeb)

Reason: Hadoop2 compat
Author: Eric C. Newton <ec...@apache.org>
Ref: ACCUMULO-1792

Signed-off-by: Eric Newton <er...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/344e7254
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/344e7254
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/344e7254

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 344e725426e76b952d0f390d65ef6062c35fdc03
Parents: 651033a
Author: Eric C. Newton <ec...@apache.org>
Authored: Wed Jan 9 20:43:35 2013 +0000
Committer: Eric Newton <er...@gmail.com>
Committed: Mon Nov 25 16:06:44 2013 -0500

----------------------------------------------------------------------
 bin/config.sh                                       | 16 ++++++++--------
 conf/examples/1GB/native-standalone/accumulo-env.sh | 10 +++++++++-
 conf/examples/1GB/standalone/accumulo-env.sh        | 10 +++++++++-
 conf/examples/2GB/native-standalone/accumulo-env.sh |  9 ++++++++-
 conf/examples/2GB/standalone/accumulo-env.sh        | 10 +++++++++-
 conf/examples/3GB/native-standalone/accumulo-env.sh |  9 ++++++++-
 conf/examples/3GB/standalone/accumulo-env.sh        |  9 ++++++++-
 .../512MB/native-standalone/accumulo-env.sh         |  9 ++++++++-
 conf/examples/512MB/standalone/accumulo-env.sh      |  9 ++++++++-
 9 files changed, 75 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/bin/config.sh
----------------------------------------------------------------------
diff --git a/bin/config.sh b/bin/config.sh
index 5836b46..d9300d5 100755
--- a/bin/config.sh
+++ b/bin/config.sh
@@ -72,23 +72,23 @@ if [ -z ${ACCUMULO_VERSION} ]; then
         ACCUMULO_VERSION=1.4.5-SNAPSHOT
 fi
 
-if [ -z "$HADOOP_HOME" ]
+if [ -z "$HADOOP_PREFIX" ]
 then
    HADOOP_HOME="`which hadoop`"
-   if [ -z "$HADOOP_HOME" ]
+   if [ -z "$HADOOP_PREFIX" ]
    then
-      echo "You must set HADOOP_HOME"
+      echo "You must set HADOOP_PREFIX"
       exit 1
    fi
-   HADOOP_HOME=`dirname $HADOOP_HOME`
-   HADOOP_HOME=`dirname $HADOOP_HOME`
+   HADOOP_HOME=`dirname $HADOOP_PREFIX`
+   HADOOP_HOME=`dirname $HADOOP_PREFIX`
 fi
-if [ ! -d "$HADOOP_HOME" ]
+if [ ! -d "$HADOOP_PREFIX" ]
 then
-    echo "$HADOOP_HOME is not a directory"
+    echo "$HADOOP_PREFIX is not a directory"
     exit 1
 fi
-export HADOOP_HOME
+export HADOOP_PREFIX
 
 if [ ! -f "$ACCUMULO_CONF_DIR/masters" -o ! -f "$ACCUMULO_CONF_DIR/slaves" ]
 then

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/1GB/native-standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/1GB/native-standalone/accumulo-env.sh b/conf/examples/1GB/native-standalone/accumulo-env.sh
index 4033152..15caef6 100755
--- a/conf/examples/1GB/native-standalone/accumulo-env.sh
+++ b/conf/examples/1GB/native-standalone/accumulo-env.sh
@@ -27,9 +27,17 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
+
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/1GB/standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/1GB/standalone/accumulo-env.sh b/conf/examples/1GB/standalone/accumulo-env.sh
index 4d09467..5c54a39 100755
--- a/conf/examples/1GB/standalone/accumulo-env.sh
+++ b/conf/examples/1GB/standalone/accumulo-env.sh
@@ -27,9 +27,17 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
+
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/2GB/native-standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/2GB/native-standalone/accumulo-env.sh b/conf/examples/2GB/native-standalone/accumulo-env.sh
index c2346ff..4f93bb4 100755
--- a/conf/examples/2GB/native-standalone/accumulo-env.sh
+++ b/conf/examples/2GB/native-standalone/accumulo-env.sh
@@ -27,9 +27,16 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/2GB/standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/2GB/standalone/accumulo-env.sh b/conf/examples/2GB/standalone/accumulo-env.sh
index 3f6e272..4595783 100755
--- a/conf/examples/2GB/standalone/accumulo-env.sh
+++ b/conf/examples/2GB/standalone/accumulo-env.sh
@@ -27,9 +27,17 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
+
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/3GB/native-standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/3GB/native-standalone/accumulo-env.sh b/conf/examples/3GB/native-standalone/accumulo-env.sh
index 6fe3f3f..d5484be 100755
--- a/conf/examples/3GB/native-standalone/accumulo-env.sh
+++ b/conf/examples/3GB/native-standalone/accumulo-env.sh
@@ -27,9 +27,16 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/3GB/standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/3GB/standalone/accumulo-env.sh b/conf/examples/3GB/standalone/accumulo-env.sh
index c554f61..10b1803 100755
--- a/conf/examples/3GB/standalone/accumulo-env.sh
+++ b/conf/examples/3GB/standalone/accumulo-env.sh
@@ -27,9 +27,16 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/512MB/native-standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/512MB/native-standalone/accumulo-env.sh b/conf/examples/512MB/native-standalone/accumulo-env.sh
index 23c77c4..750da89 100755
--- a/conf/examples/512MB/native-standalone/accumulo-env.sh
+++ b/conf/examples/512MB/native-standalone/accumulo-env.sh
@@ -27,9 +27,16 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]

http://git-wip-us.apache.org/repos/asf/accumulo/blob/344e7254/conf/examples/512MB/standalone/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/conf/examples/512MB/standalone/accumulo-env.sh b/conf/examples/512MB/standalone/accumulo-env.sh
index 85a6784..bf21762 100755
--- a/conf/examples/512MB/standalone/accumulo-env.sh
+++ b/conf/examples/512MB/standalone/accumulo-env.sh
@@ -27,9 +27,16 @@
 ### you may want to use smaller values, especially when running everything
 ### on a single machine.
 ###
+if [ -z "$HADOOP_HOME" ]
+then
+   test -z "$HADOOP_PREFIX"      && export HADOOP_PREFIX=/path/to/hadoop
+else
+   HADOOP_PREFIX="$HADOOP_HOME"
+   unset HADOOP_HOME
+fi
+test -z "$HADOOP_CONF_DIR"       && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf"
 
 test -z "$JAVA_HOME"             && export JAVA_HOME=/path/to/java
-test -z "$HADOOP_HOME"           && export HADOOP_HOME=/path/to/hadoop
 test -z "$ZOOKEEPER_HOME"        && export ZOOKEEPER_HOME=/path/to/zookeeper
 test -z "$ACCUMULO_LOG_DIR"      && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs
 if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ]