You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2013/12/19 03:55:07 UTC

[07/10] git commit: ACCUMULO-2004 Check for libhadoop.so, not the a directory we think it might be in.

ACCUMULO-2004 Check for libhadoop.so, not the a directory we think it might be in.


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

Branch: refs/heads/master
Commit: 53a7d518cacf2d64ccd2ab04fa84242adf8084b1
Parents: 40df8cd
Author: Josh Elser <el...@apache.org>
Authored: Wed Dec 18 21:30:27 2013 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Wed Dec 18 21:30:27 2013 -0500

----------------------------------------------------------------------
 bin/accumulo | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/53a7d518/bin/accumulo
----------------------------------------------------------------------
diff --git a/bin/accumulo b/bin/accumulo
index e2a89e9..172951e 100755
--- a/bin/accumulo
+++ b/bin/accumulo
@@ -131,12 +131,16 @@ CLASSPATH=${XML_FILES}:${START_JAR}:${COMMONS_JCI_JARS}
 
 JAVA=$JAVA_HOME/bin/java
 PLATFORM="`$JAVA -cp $CLASSPATH org.apache.accumulo.start.Platform`"
-# hadoop 1.0, 1.1
+
+# Try to find the hadoop native library, defaulting to where it should
+# be for the default Hadoop version
 LIB_PATH="$HADOOP_PREFIX/lib/native/$PLATFORM"
-if [ ! -d "$LIB_PATH" ]; then
-   # hadoop-2.0
-   LIB_PATH=$HADOOP_PREFIX/lib/native
+
+if [ -e "$HADOOP_PREFIX/lib/native/libhadoop.so" ]; then
+    # hadoop-2.0
+    LIB_PATH=$HADOOP_PREFIX/lib/native
 fi
+
 #
 # 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="${ACCUMULO_KILL_CMD:-kill -9 %p}" \