accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1433049 - in /accumulo/trunk: bin/accumulo bin/bootstrap_hdfs.sh bin/config.sh start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java test/system/auto/TestUtils.py
Date Mon, 14 Jan 2013 19:05:56 GMT
Author: ecn
Date: Mon Jan 14 19:05:56 2013
New Revision: 1433049

URL: http://svn.apache.org/viewvc?rev=1433049&view=rev
Log:
ACCUMULO-645 found and removed many other references to HADOOP_HOME

Modified:
    accumulo/trunk/bin/accumulo
    accumulo/trunk/bin/bootstrap_hdfs.sh
    accumulo/trunk/bin/config.sh
    accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
    accumulo/trunk/test/system/auto/TestUtils.py

Modified: accumulo/trunk/bin/accumulo
URL: http://svn.apache.org/viewvc/accumulo/trunk/bin/accumulo?rev=1433049&r1=1433048&r2=1433049&view=diff
==============================================================================
--- accumulo/trunk/bin/accumulo (original)
+++ accumulo/trunk/bin/accumulo Mon Jan 14 19:05:56 2013
@@ -62,7 +62,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`
 
 
@@ -95,8 +95,8 @@ if [ -z $JAVA_HOME -o ! -d $JAVA_HOME ];
   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"
+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
@@ -115,11 +115,14 @@ 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
 
 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" $ACCUMULO_OPTS -classpath $CLASSPATH -XX:OnOutOfMemoryError="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" $ACCUMULO_OPTS -classpath $CLASSPATH -XX:OnOutOfMemoryError="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 "$@"

Modified: accumulo/trunk/bin/bootstrap_hdfs.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/bin/bootstrap_hdfs.sh?rev=1433049&r1=1433048&r2=1433049&view=diff
==============================================================================
--- accumulo/trunk/bin/bootstrap_hdfs.sh (original)
+++ accumulo/trunk/bin/bootstrap_hdfs.sh Mon Jan 14 19:05:56 2013
@@ -24,9 +24,9 @@ bin=`cd "$bin"; pwd`
 #
 # Find the system context directory in HDFS
 #
-SYSTEM_CONTEXT_HDFS_DIR=`grep -A1 "general.vfs.classpaths" $ACCUMULO_HOME/conf/accumulo-site.xml
| tail -1 | perl -pe 's/\s+<value>//; s/<\/value>//; print $ARGV[1]'`
+SYSTEM_CONTEXT_HDFS_DIR=`grep -A1 "general.vfs.classpaths" "$ACCUMULO_HOME/conf/accumulo-site.xml"
| tail -1 | perl -pe 's/\s+<value>//; s/<\/value>//; print $ARGV[1]'`
 
-if [ -z $SYSTEM_CONTEXT_HDFS_DIR ]; then
+if [ -z "$SYSTEM_CONTEXT_HDFS_DIR" ]; then
 
   echo "Your accumulo-site.xml file is not set up for the HDFS Classloader. Please add the
following to your accumulo-site.xml file:"
   echo ""
@@ -41,9 +41,9 @@ fi
 #
 # Create the system context directy in HDFS if it does not exist
 #
-$HADOOP_HOME/bin/hadoop fs -ls $SYSTEM_CONTEXT_HDFS_DIR  > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -ls "$SYSTEM_CONTEXT_HDFS_DIR"  > /dev/null
 if [ $? -ne 0 ]; then
-  $HADOOP_HOME/bin/hadoop fs -mkdir $SYSTEM_CONTEXT_HDFS_DIR  > /dev/null
+  "$HADOOP_PREFIX/bin/hadoop" fs -mkdir "$SYSTEM_CONTEXT_HDFS_DIR"  > /dev/null
 fi
 
 #
@@ -61,16 +61,16 @@ fi
 #
 # Copy all jars in lib to the system context directory
 #
-hadoop fs -moveFromLocal $ACCUMULO_HOME/lib/*.jar $SYSTEM_CONTEXT_HDFS_DIR  > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -moveFromLocal "$ACCUMULO_HOME/lib/*.jar" "$SYSTEM_CONTEXT_HDFS_DIR"
 > /dev/null
 
-$HADOOP_HOME/bin/hadoop fs -setrep -R $REP $SYSTEM_CONTEXT_HDFS_DIR  > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -setrep -R $REP "$SYSTEM_CONTEXT_HDFS_DIR"  > /dev/null
 
 #
 # We need two of the jars in lib, copy them back out and remove them from the system context
dir
 #
-hadoop fs -copyToLocal $SYSTEM_CONTEXT_HDFS_DIR/log4j-1.2.16.jar $ACCUMULO_HOME/lib/.  >
/dev/null
-hadoop fs -rmr $SYSTEM_CONTEXT_HDFS_DIR/log4j-1.2.16.jar  > /dev/null
-hadoop fs -copyToLocal $SYSTEM_CONTEXT_HDFS_DIR/commons-vfs2-2.0.jar $ACCUMULO_HOME/lib/.
 > /dev/null
-hadoop fs -rmr $SYSTEM_CONTEXT_HDFS_DIR/commons-vfs2-2.0.jar  > /dev/null
-hadoop fs -copyToLocal $SYSTEM_CONTEXT_HDFS_DIR/accumulo-start-${ACCUMULO_VERSION}.jar $ACCUMULO_HOME/lib/.
 > /dev/null
-hadoop fs -rmr $SYSTEM_CONTEXT_HDFS_DIR/accumulo-start-${ACCUMULO_VERSION}.jar  > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -copyToLocal "$SYSTEM_CONTEXT_HDFS_DIR/log4j-1.2.16.jar" "$ACCUMULO_HOME/lib/."
 > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -rmr "$SYSTEM_CONTEXT_HDFS_DIR/log4j-1.2.16.jar"  > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -copyToLocal "$SYSTEM_CONTEXT_HDFS_DIR/commons-vfs2-2.0.jar
$ACCUMULO_HOME/lib/."  > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -rmr "$SYSTEM_CONTEXT_HDFS_DIR/commons-vfs2-2.0.jar"  >
/dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -copyToLocal "$SYSTEM_CONTEXT_HDFS_DIR/accumulo-start-${ACCUMULO_VERSION}.jar"
"$ACCUMULO_HOME/lib/."  > /dev/null
+"$HADOOP_PREFIX/bin/hadoop" fs -rmr "$SYSTEM_CONTEXT_HDFS_DIR/accumulo-start-${ACCUMULO_VERSION}.jar"
 > /dev/null

Modified: accumulo/trunk/bin/config.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/bin/config.sh?rev=1433049&r1=1433048&r2=1433049&view=diff
==============================================================================
--- accumulo/trunk/bin/config.sh (original)
+++ accumulo/trunk/bin/config.sh Mon Jan 14 19:05:56 2013
@@ -51,14 +51,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

Modified: accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java?rev=1433049&r1=1433048&r2=1433049&view=diff
==============================================================================
--- accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
(original)
+++ accumulo/trunk/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
Mon Jan 14 19:05:56 2013
@@ -46,7 +46,9 @@ public class AccumuloClassLoader {
   public static final String CLASSPATH_PROPERTY_NAME = "general.classpaths";
 
   public static final String ACCUMULO_CLASSPATH_VALUE = "$ACCUMULO_HOME/conf,\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";
   
   private static String SITE_CONF;

Modified: accumulo/trunk/test/system/auto/TestUtils.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/TestUtils.py?rev=1433049&r1=1433048&r2=1433049&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/TestUtils.py (original)
+++ accumulo/trunk/test/system/auto/TestUtils.py Mon Jan 14 19:05:56 2013
@@ -57,9 +57,9 @@ $ACCUMULO_HOME/server/target/classes/,
     $ACCUMULO_HOME/examples/simple/target/classes,
         $ACCUMULO_HOME/lib/[^.].*.jar,
         $ZOOKEEPER_HOME/zookeeper[^.].*.jar,
-        $HADOOP_HOME/conf,
-        $HADOOP_HOME/[^.].*.jar,
-        $HADOOP_HOME/lib/[^.].*.jar,
+        $HADOOP_CONF_DIR,
+        $HADOOP_PREFIX/[^.].*.jar,
+        $HADOOP_PREFIX/lib/[^.].*.jar,
 """
 
 log = logging.getLogger('test.auto')



Mime
View raw message