diff --git llap-server/bin/runLlapDaemon.sh llap-server/bin/runLlapDaemon.sh index bd14fe8..b39c4fd 100755 --- llap-server/bin/runLlapDaemon.sh +++ 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}" diff --git llap-server/src/main/resources/llap.py llap-server/src/main/resources/llap.py index 601dfb3..f62f504 100644 --- llap-server/src/main/resources/llap.py +++ llap-server/src/main/resources/llap.py @@ -23,6 +23,7 @@ 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 @@ def start(self, env): 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 @@ def status(self, env): if __name__ == "__main__": Llap().execute() + +# vim: tabstop=24 expandtab shiftwidth=4 softtabstop=4 diff --git llap-server/src/main/resources/params.py llap-server/src/main/resources/params.py index 802baf3..d6a4fa0 100644 --- llap-server/src/main/resources/params.py +++ llap-server/src/main/resources/params.py @@ -29,6 +29,7 @@ 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'] diff --git llap-server/src/main/resources/templates.py llap-server/src/main/resources/templates.py index 173aefb..dae0afb 100644 --- llap-server/src/main/resources/templates.py +++ llap-server/src/main/resources/templates.py @@ -73,6 +73,7 @@ "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",