accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject git commit: ACCUMULO-1677 Remove extra jvm exec to load native libs
Date Wed, 20 Nov 2013 21:55:46 GMT
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 38394f830 -> 8f5dc6107


ACCUMULO-1677 Remove extra jvm exec to load native libs


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 8f5dc61077dd15d2ba444c19ce069403a59b6b64
Parents: 38394f8
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Nov 20 15:58:35 2013 -0500
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Wed Nov 20 16:54:46 2013 -0500

----------------------------------------------------------------------
 bin/accumulo                                    | 24 +++++++++++---------
 .../1GB/native-standalone/accumulo-env.sh       |  6 +++++
 conf/examples/1GB/standalone/accumulo-env.sh    |  6 +++++
 .../2GB/native-standalone/accumulo-env.sh       |  6 +++++
 conf/examples/2GB/standalone/accumulo-env.sh    |  6 +++++
 .../3GB/native-standalone/accumulo-env.sh       |  6 +++++
 conf/examples/3GB/standalone/accumulo-env.sh    |  6 +++++
 .../512MB/native-standalone/accumulo-env.sh     |  6 +++++
 conf/examples/512MB/standalone/accumulo-env.sh  |  6 +++++
 9 files changed, 61 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/bin/accumulo
----------------------------------------------------------------------
diff --git a/bin/accumulo b/bin/accumulo
index 37b9a43..14918c8 100755
--- a/bin/accumulo
+++ b/bin/accumulo
@@ -125,27 +125,29 @@ if [ ! -d "${ACCUMULO_LOG_DIR}" ]; then
    mkdir -p "$ACCUMULO_LOG_DIR"
 fi
 
-# Export the variables just in case they are not exported
-# This makes them available to java
-export JAVA_HOME HADOOP_PREFIX ZOOKEEPER_HOME
-
-JAVA="${JAVA_HOME}/bin/java"
-PLATFORM=$( "${JAVA}" -cp "${CLASSPATH}" org.apache.accumulo.start.Platform )
-# hadoop 1.0, 1.1
-LIB_PATH="${HADOOP_PREFIX}/lib/native/${PLATFORM}"
-if [ ! -d "${LIB_PATH}" ]; then
-   # hadoop-2.0
+# This is default for hadoop 2.x;
+#   for hadoop 1.0, 1.1, specify (DY)LD_LIBRARY_PATH
+#   explicitly in ${ACCUMULO_HOME}/conf/accumulo-env.sh
+#   usually something like:
+#     ${HADOOP_PREFIX}/lib/native/${PLATFORM}
+if [ -d "${HADOOP_PREFIX}/lib/native" ]; then
    LIB_PATH="${HADOOP_PREFIX}/lib/native"
+   LD_LIBRARY_PATH="${LIB_PATH}:${LD_LIBRARY_PATH}"     # For Linux
+   DYLD_LIBRARY_PATH="${LIB_PATH}:${DYLD_LIBRARY_PATH}" # For Mac
 fi
+
+# Export the variables just in case they are not exported
+# This makes them available to java
+export JAVA_HOME HADOOP_PREFIX ZOOKEEPER_HOME LD_LIBRARY_PATH DYLD_LIBRARY_PATH
 #
 # app isn't used anywhere, but it makes the process easier to spot when ps/top/snmp truncate
the command line
+JAVA="${JAVA_HOME}/bin/java"
 exec $JAVA "-Dapp=$1" \
    $ACCUMULO_OPTS \
    -classpath "${CLASSPATH}" \
    -XX:OnOutOfMemoryError="${ACCUMULO_KILL_CMD:-kill -9 %p}" \
    -XX:-OmitStackTraceInFastThrow \
    -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
\
-   -Djava.library.path="${LIB_PATH}" \
    -Dorg.apache.accumulo.core.home.dir="${ACCUMULO_HOME}" \
    -Dhadoop.home.dir="${HADOOP_PREFIX}" \
    -Dzookeeper.home.dir="${ZOOKEEPER_HOME}" \

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 26a7866..aa5d71a 100755
--- a/conf/examples/1GB/native-standalone/accumulo-env.sh
+++ b/conf/examples/1GB/native-standalone/accumulo-env.sh
@@ -56,3 +56,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx128m
-Xms64m
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 7d5602c..e2170b2 100755
--- a/conf/examples/1GB/standalone/accumulo-env.sh
+++ b/conf/examples/1GB/standalone/accumulo-env.sh
@@ -56,3 +56,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx128m
-Xms64m
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 682c5d7..3d26002 100755
--- a/conf/examples/2GB/native-standalone/accumulo-env.sh
+++ b/conf/examples/2GB/native-standalone/accumulo-env.sh
@@ -55,3 +55,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx256m
-Xms64m
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 ff4853c..8325daf 100755
--- a/conf/examples/2GB/standalone/accumulo-env.sh
+++ b/conf/examples/2GB/standalone/accumulo-env.sh
@@ -56,3 +56,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx256m
-Xms64m
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 da976da..34e17fd 100755
--- a/conf/examples/3GB/native-standalone/accumulo-env.sh
+++ b/conf/examples/3GB/native-standalone/accumulo-env.sh
@@ -55,3 +55,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx1g
-Xms256m"
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 2dd0096..6c786b6 100755
--- a/conf/examples/3GB/standalone/accumulo-env.sh
+++ b/conf/examples/3GB/standalone/accumulo-env.sh
@@ -55,3 +55,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx1g
-Xms256m"
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 64432df..988fe7c 100755
--- a/conf/examples/512MB/native-standalone/accumulo-env.sh
+++ b/conf/examples/512MB/native-standalone/accumulo-env.sh
@@ -55,3 +55,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx128m
-Xms64m
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f5dc610/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 d4a4703..de07c9f 100755
--- a/conf/examples/512MB/standalone/accumulo-env.sh
+++ b/conf/examples/512MB/standalone/accumulo-env.sh
@@ -55,3 +55,9 @@ test -z "$ACCUMULO_OTHER_OPTS"   && export ACCUMULO_OTHER_OPTS="-Xmx128m
-Xms64m
 export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null
| head -1`
 # what do when the JVM runs out of heap memory
 export ACCUMULO_KILL_CMD='kill -9 %p'
+
+### Optionally look for hadoop and accumulo native libraries for your
+### platform in additional directories. (Use DYLD_LIBRARY_PATH on Mac OS X.)
+### May not be necessary for Hadoop 2.x or using an RPM that installs to
+### the correct system library directory.
+# export LD_LIBRARY_PATH=${HADOOP_PREFIX}/lib/native/${PLATFORM}:${LD_LIBRARY_PATH}


Mime
View raw message