You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by go...@apache.org on 2015/07/18 07:03:28 UTC

hive git commit: HIVE-10930: LLAP: Set java.io.tmpdir correctly for LLAP Slider instance (Gopal V)

Repository: hive
Updated Branches:
  refs/heads/llap af7bf5754 -> 479307d37


HIVE-10930: LLAP: Set java.io.tmpdir correctly for LLAP Slider instance (Gopal V)


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

Branch: refs/heads/llap
Commit: 479307d3733ab11c0753a0138835f1d036f201aa
Parents: af7bf57
Author: Gopal V <go...@apache.org>
Authored: Fri Jul 17 22:03:08 2015 -0700
Committer: Gopal V <go...@apache.org>
Committed: Fri Jul 17 22:03:08 2015 -0700

----------------------------------------------------------------------
 llap-server/bin/runLlapDaemon.sh            | 5 +++++
 llap-server/src/main/resources/llap.py      | 4 ++++
 llap-server/src/main/resources/params.py    | 1 +
 llap-server/src/main/resources/templates.py | 1 +
 4 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/479307d3/llap-server/bin/runLlapDaemon.sh
----------------------------------------------------------------------
diff --git a/llap-server/bin/runLlapDaemon.sh b/llap-server/bin/runLlapDaemon.sh
index bd14fe8..b39c4fd 100755
--- a/llap-server/bin/runLlapDaemon.sh
+++ b/llap-server/bin/runLlapDaemon.sh
@@ -25,6 +25,7 @@ set -x
 #   LLAP_DAEMON_OPTS - additional options
 #   LLAP_DAEMON_LOGGER - default is INFO,console
 #   LLAP_DAEMON_LOG_DIR - defaults to /tmp
+#   LLAP_DAEMON_TMP_DIR - defaults to /tmp
 #   LLAP_DAEMON_LOG_FILE - 
 #   LLAP_DAEMON_CONF_DIR
 
@@ -114,6 +115,10 @@ then
   LLAP_DAEMON_OPTS="${LLAP_DAEMON_OPTS} -XX:+UseParallelGC"
 fi
 
+# In general, avoid using the OS temporary directory
+if [ -n "$LLAP_DAEMON_TMP_DIR" ]; then
+  export LLAP_DAEMON_OPTS="${LLAP_DAEMON_OPTS} -Djava.io.tmpdir=$LLAP_DAEMON_TMP_DIR"
+fi
 
 LLAP_DAEMON_OPTS="${LLAP_DAEMON_OPTS} -Dlog4j.configuration=llap-daemon-log4j.properties"
 LLAP_DAEMON_OPTS="${LLAP_DAEMON_OPTS} -Dllap.daemon.log.dir=${LLAP_DAEMON_LOG_DIR}"

http://git-wip-us.apache.org/repos/asf/hive/blob/479307d3/llap-server/src/main/resources/llap.py
----------------------------------------------------------------------
diff --git a/llap-server/src/main/resources/llap.py b/llap-server/src/main/resources/llap.py
index 601dfb3..f62f504 100644
--- a/llap-server/src/main/resources/llap.py
+++ b/llap-server/src/main/resources/llap.py
@@ -23,6 +23,7 @@ import os
 import subprocess
 from resource_management import *
 from os.path import dirname
+from os.path import join as join_path
 
 class Llap(Script):
   def install(self, env):
@@ -39,6 +40,7 @@ class Llap(Script):
     os.environ['JAVA_HOME'] = format('{java64_home}')
     # this is the same as TEZ_PREFIX
     os.environ['LLAP_DAEMON_HOME'] = format('{app_root}')
+    os.environ['LLAP_DAEMON_TMP_DIR'] = format('{app_tmp_dir}')
     # this is the location where we have the llap server components (shell scripts)
     os.environ['LLAP_DAEMON_BIN_HOME'] = format('{app_root}/bin')
     # location containing llap-daemon-site.xml, tez and yarn configuration xmls as well.
@@ -69,3 +71,5 @@ class Llap(Script):
 
 if __name__ == "__main__":
   Llap().execute()
+
+# vim: tabstop=24 expandtab shiftwidth=4 softtabstop=4

http://git-wip-us.apache.org/repos/asf/hive/blob/479307d3/llap-server/src/main/resources/params.py
----------------------------------------------------------------------
diff --git a/llap-server/src/main/resources/params.py b/llap-server/src/main/resources/params.py
index 802baf3..d6a4fa0 100644
--- a/llap-server/src/main/resources/params.py
+++ b/llap-server/src/main/resources/params.py
@@ -29,6 +29,7 @@ pid_file = config['configurations']['global']['pid_file']
 
 additional_cp = config['configurations']['global']['additional_cp']
 app_log_dir = config['configurations']['global']['app_log_dir']
+app_tmp_dir = config['configurations']['global']['app_tmp_dir']
 app_log_level = config['configurations']['global']['app_log_level']
 daemon_args = config['configurations']['global']['daemon_args']
 

http://git-wip-us.apache.org/repos/asf/hive/blob/479307d3/llap-server/src/main/resources/templates.py
----------------------------------------------------------------------
diff --git a/llap-server/src/main/resources/templates.py b/llap-server/src/main/resources/templates.py
index 173aefb..dae0afb 100644
--- a/llap-server/src/main/resources/templates.py
+++ b/llap-server/src/main/resources/templates.py
@@ -73,6 +73,7 @@ appConfig = """
     "java_home": "%(java_home)s",
     "site.global.app_user": "yarn",
     "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/",
+    "site.global.app_tmp_dir": "${AGENT_WORK_ROOT}/tmp/",
     "site.global.app_log_level": "%(daemon_loglevel)s,RFA",
     "site.global.additional_cp": "%(hadoop_home)s",
     "site.global.daemon_args": "%(daemon_args)s",