accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [32/38] git commit: ACCUMULO-645 found and removed many other references to HADOOP_HOME
Date Tue, 26 Nov 2013 15:47:36 GMT
ACCUMULO-645 found and removed many other references to HADOOP_HOME

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

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

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


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: d16fd77fa10afedab3bffe17235a3d700fd8de8e
Parents: d70e5a1
Author: Sean Busbey <busbey@cloudera.com>
Authored: Sun Oct 27 15:47:25 2013 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Mon Nov 25 16:06:44 2013 -0500

----------------------------------------------------------------------
 bin/accumulo                                        | 15 +++++++++------
 bin/config.sh                                       |  6 +++---
 .../start/classloader/AccumuloClassLoader.java      |  7 ++++---
 test/system/auto/TestUtils.py                       | 16 ++++++++++++++--
 4 files changed, 30 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d16fd77f/bin/accumulo
----------------------------------------------------------------------
diff --git a/bin/accumulo b/bin/accumulo
index 6642818..bbca3f0 100755
--- a/bin/accumulo
+++ b/bin/accumulo
@@ -48,9 +48,9 @@ if [ -z "$JAVA_HOME" -o ! -d "$JAVA_HOME" ]; then
     echo "JAVA_HOME is not set.  Please make sure it's set globally or in conf/accumulo-env.sh"
     exit 1
 fi
-if [ -z "$HADOOP_HOME" -o ! -d "$HADOOP_HOME" ]; then
-    echo "HADOOP_HOME is not set.  Please make sure it's set globally or in conf/accumulo-env.sh"
-    exit 1
+if [ -z $HADOOP_PREFIX -o ! -d $HADOOP_PREFIX ]; then
+  echo "HADOOP_PREFIX is not set.  Please make sure it's set globally or in conf/accumulo-env.sh"
+  exit 1
 fi
 if [ -z "$ZOOKEEPER_HOME" -o ! -d "$ZOOKEEPER_HOME" ]; then
     echo "ZOOKEEPER_HOME is not set.  Please make sure it's set globally or in conf/accumulo-env.sh"
@@ -60,8 +60,11 @@ fi
 #Export the variables just in case they are not exported
 #This makes them available to java
 export JAVA_HOME=$JAVA_HOME
-export HADOOP_HOME=$HADOOP_HOME
+export HADOOP_PREFIX=$HADOOP_PREFIX
 export ZOOKEEPER_HOME=$ZOOKEEPER_HOME
+# backwards compatible with old configurations
+export HADOOP_HOME=$HADOOP_PREFIX
+export HADOOP_HOME_WARN_SUPPRESS=1
 
 START_JAR=$ACCUMULO_HOME/lib/accumulo-start-$ACCUMULO_VERSION.jar
 COMMONS_JCI_JARS=$ACCUMULO_HOME/lib/commons-jci-core-1.0.jar:$ACCUMULO_HOME/lib/commons-jci-fam-1.0.jar:$ACCUMULO_HOME/lib/log4j-1.2.16.jar:$ACCUMULO_HOME/lib/commons-logging-1.0.4.jar:$ACCUMULO_HOME/lib/commons-logging-api-1.0.4.jar
@@ -79,7 +82,7 @@ locationByProgram()
 }
 
 test -n "$JAVA_HOME"      || export JAVA_HOME=`locationByProgram java`
-test -n "$HADOOP_HOME"    || export HADOOP_HOME=`locationByProgram hadoop`
+test -n "$HADOOP_PREFIX"  || export HADOOP_PREFIX=`locationByProgram hadoop`
 test -n "$ZOOKEEPER_HOME" || export ZOOKEEPER_HOME=`locationByProgram zkCli.sh`
 
 
@@ -130,4 +133,4 @@ JAVA=$JAVA_HOME/bin/java
 PLATFORM="`$JAVA -cp $CLASSPATH org.apache.accumulo.start.Platform`"
 
 # app isn't used anywhere, but it makes the process easier to spot when ps/top/snmp truncate
the command line
-exec $JAVA "-Dapp=$1" -classpath $CLASSPATH $ACCUMULO_OPTS -XX:OnOutOfMemoryError="${ACCUMULO_KILL_CMD:-kill
-9 %p}" -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djava.library.path="$HADOOP_HOME/lib/native/$PLATFORM" -Dorg.apache.accumulo.core.home.dir="$ACCUMULO_HOME"
-Dhadoop.home.dir="$HADOOP_HOME" -Dzookeeper.home.dir="$ZOOKEEPER_HOME" org.apache.accumulo.start.Main
"$@"
+exec $JAVA "-Dapp=$1" -classpath $CLASSPATH $ACCUMULO_OPTS -XX:OnOutOfMemoryError="${ACCUMULO_KILL_CMD:-kill
-9 %p}" -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djava.library.path="$HADOOP_PREFIX/lib/native/$PLATFORM" -Dorg.apache.accumulo.core.home.dir="$ACCUMULO_HOME"
-Dhadoop.home.dir="$HADOOP_PREFIX" -Dhadoop.conf.dir="$HADOOP_CONF_DIR" -Dzookeeper.home.dir="$ZOOKEEPER_HOME"
org.apache.accumulo.start.Main "$@"

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d16fd77f/bin/config.sh
----------------------------------------------------------------------
diff --git a/bin/config.sh b/bin/config.sh
index d9300d5..08a8bbd 100755
--- a/bin/config.sh
+++ b/bin/config.sh
@@ -74,14 +74,14 @@ fi
 
 if [ -z "$HADOOP_PREFIX" ]
 then
-   HADOOP_HOME="`which hadoop`"
+   HADOOP_PREFIX="`which hadoop`"
    if [ -z "$HADOOP_PREFIX" ]
    then
       echo "You must set HADOOP_PREFIX"
       exit 1
    fi
-   HADOOP_HOME=`dirname $HADOOP_PREFIX`
-   HADOOP_HOME=`dirname $HADOOP_PREFIX`
+   HADOOP_PREFIX=`dirname $HADOOP_PREFIX`
+   HADOOP_PREFIX=`dirname $HADOOP_PREFIX`
 fi
 if [ ! -d "$HADOOP_PREFIX" ]
 then

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d16fd77f/src/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
----------------------------------------------------------------------
diff --git a/src/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
b/src/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
index 8d217d7..fd41938 100644
--- a/src/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
+++ b/src/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
@@ -106,10 +106,11 @@ public class AccumuloClassLoader {
   
   public static final String DYNAMIC_CLASSPATH_PROPERTY_NAME = "general.dynamic.classpaths";
   
-  public static final String ACCUMULO_CLASSPATH_VALUE = 
+  public static final String ACCUMULO_CLASSPATH_VALUE =
       "$ACCUMULO_CONF_DIR,\n" 
-      + "$ACCUMULO_HOME/lib/[^.].$ACCUMULO_VERSION.jar,\n"
-      + "$ACCUMULO_HOME/lib/[^.].*.jar,\n" + "$ZOOKEEPER_HOME/zookeeper[^.].*.jar,\n" + "$HADOOP_HOME/[^.].*.jar,\n"
+ "$HADOOP_HOME/conf,\n"
+      + "$ACCUMULO_HOME/lib/[^.].*.jar,\n" 
+      + "$ZOOKEEPER_HOME/zookeeper[^.].*.jar,\n" 
+      + "$HADOOP_PREFIX/[^.].*.jar,\n" + "$HADOOP_CONF_DIR,\n"
       + "$HADOOP_HOME/lib/[^.].*.jar,\n";
   
   /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d16fd77f/test/system/auto/TestUtils.py
----------------------------------------------------------------------
diff --git a/test/system/auto/TestUtils.py b/test/system/auto/TestUtils.py
index b7659a2..0e1bf1a 100755
--- a/test/system/auto/TestUtils.py
+++ b/test/system/auto/TestUtils.py
@@ -54,8 +54,20 @@ LOG_PROPERTIES= os.path.join(ACCUMULO_CONF_DIR, 'log4j.properties')
 LOG_GENERIC = os.path.join(ACCUMULO_CONF_DIR, 'generic_logger.xml')
 LOG_MONITOR = os.path.join(ACCUMULO_CONF_DIR, 'monitor_logger.xml')
 
-General_CLASSPATH = ("$ACCUMULO_CONF_DIR,$ACCUMULO_HOME/lib/[^.].$ACCUMULO_VERSION.jar, $ACCUMULO_HOME/lib/[^.].*.jar,
$ZOOKEEPER_HOME/zookeeper[^.].*.jar,"
-"$HADOOP_HOME/conf,$HADOOP_HOME/[^.].*.jar, $HADOOP_HOME/lib/[^.].*.jar") 
+General_CLASSPATH = """
+$ACCUMULO_CONF_DIR,
+$ACCUMULO_HOME/server/target/classes/,
+    $ACCUMULO_HOME/core/target/classes/,
+    $ACCUMULO_HOME/start/target/classes/,
+    $ACCUMULO_HOME/fate/target/classes/,
+    $ACCUMULO_HOME/examples/instamo/target/classes,
+    $ACCUMULO_HOME/examples/simple/target/classes,
+        $ACCUMULO_HOME/lib/[^.].*.jar,
+        $ZOOKEEPER_HOME/zookeeper[^.].*.jar,
+        $HADOOP_CONF_DIR,
+        $HADOOP_PREFIX/[^.].*.jar,
+        $HADOOP_PREFIX/lib/[^.].*.jar,
+"""
 
 log = logging.getLogger('test.auto')
 


Mime
View raw message