bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yw...@apache.org
Subject bigtop git commit: BIGTOP-1956 Multi RS HBase requires unique hbase.tmp.dir to be set for each RS on a node
Date Thu, 20 Aug 2015 01:17:12 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master 1f11c766d -> f40c9abd1


BIGTOP-1956 Multi RS HBase requires unique hbase.tmp.dir to be set for each RS on a node

Signed-off-by: YoungWoo Kim <ywkim@apache.org>


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

Branch: refs/heads/master
Commit: f40c9abd1cdd91575a7dbba4040cf01bac686645
Parents: 1f11c76
Author: Biju Nair <gs.biju@gmail.com>
Authored: Wed Aug 19 15:19:25 2015 -0400
Committer: YoungWoo Kim <ywkim@apache.org>
Committed: Thu Aug 20 09:34:53 2015 +0900

----------------------------------------------------------------------
 bigtop-packages/src/common/hbase/hbase.default       |  6 ++++++
 .../src/common/hbase/regionserver-init.d.tpl         | 15 ++++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/f40c9abd/bigtop-packages/src/common/hbase/hbase.default
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hbase/hbase.default b/bigtop-packages/src/common/hbase/hbase.default
index cc5fa26..b537157 100644
--- a/bigtop-packages/src/common/hbase/hbase.default
+++ b/bigtop-packages/src/common/hbase/hbase.default
@@ -33,3 +33,9 @@ export HBASE_IDENT_STRING=hbase
 # which will be equal to starting JMX port + offset
 # 
 # export JMXPORT=10103
+
+#
+# Set a directory which will be used for Java temp directory. For multi RS the
+# directory will be appended with offset to make it unique for each JVM process
+#
+# export JAVA_TMP_DIR="/tmp/java_tmp_dir"

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f40c9abd/bigtop-packages/src/common/hbase/regionserver-init.d.tpl
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/hbase/regionserver-init.d.tpl b/bigtop-packages/src/common/hbase/regionserver-init.d.tpl
index df9a06f..d2de686 100644
--- a/bigtop-packages/src/common/hbase/regionserver-init.d.tpl
+++ b/bigtop-packages/src/common/hbase/regionserver-init.d.tpl
@@ -194,18 +194,27 @@ multi_hbase_daemon() {
         exit 1
     fi
 
-    export HBASE_${UPPERCASE_HBASE_DAEMON}_OPTS=" "
-
     for OFFSET in ${OFFSETS} ; do
+
+        export HBASE_${UPPERCASE_HBASE_DAEMON}_OPTS=" "
+
         echo -n "$ACTION @HBASE_DAEMON@ daemon $OFFSET: "
         export HBASE_IDENT_STRING="hbase-${OFFSET}"
         LOG_FILE="$HBASE_LOG_DIR/hbase-$HBASE_IDENT_STRING-@HBASE_DAEMON@-$HOSTNAME.pid"
         PID_FILE="$HBASE_PID_DIR/hbase-$HBASE_IDENT_STRING-@HBASE_DAEMON@.pid"
         HBASE_MULTI_ARGS="-D hbase.regionserver.port=`expr ${FIRST_PORT} + $OFFSET` \
                           -D hbase.regionserver.info.port=`expr ${FIRST_INFO_PORT} + ${OFFSET}`"
+
+        if [ "x$JAVA_TMP_DIR" == "x" ] ; then
+            JAVA_TMP_DIR="/tmp/java_tmp_dir"
+        fi
+        HBASE_TMP_DIR=" -Djava.io.tmpdir=${JAVA_TMP_DIR}/${OFFSET}"
+
         if [ "x$JMXPORT" != "x" ] ; then
-            HBASE_MULTI_ARGS="${HBASE_MULTI_ARGS} -Dcom.sun.management.jmxremote.port=`expr
${JMXPORT} + ${OFFSET}`"
+            HBASE_JMX_PORT=" -Dcom.sun.management.jmxremote.port=`expr ${JMXPORT} + ${OFFSET}`"
         fi
+        export HBASE_${UPPERCASE_HBASE_DAEMON}_OPTS="`eval '$'HBASE_${UPPERCASE_HBASE_DAEMON}_OPTS`$HBASE_TMP_DIR$HBASE_JMX_PORT"
+
         hbase_check_pidfile $PID_FILE
         STATUS=$?
         if [[ "$STATUS" == "0" && "$COMMAND" == "start" ]] ; then


Mime
View raw message