Aggarwal-Raghav commented on code in PR #6390:
URL: https://github.com/apache/hive/pull/6390#discussion_r2989819847


##########
packaging/src/docker/entrypoint-llap.sh:
##########
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -euo pipefail
+set -x
+
+export HADOOP_HOME=${HADOOP_HOME:-/opt/hadoop}
+export HIVE_HOME=${HIVE_HOME:-/opt/hive}
+export TEZ_HOME=${TEZ_HOME:-/opt/tez}
+
+# Allow external configuration directories to be mounted in for Hadoop/Tez.
+export HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_HOME/etc/hadoop}"
+export TEZ_CONF_DIR="${TEZ_CONF_DIR:-$HADOOP_CONF_DIR}"
+
+export HIVE_CONF_DIR="$HIVE_HOME/conf"
+
+# =========================================================================
+# REPLACE ${VARS} in the template
+# =========================================================================
+: "${HIVE_WAREHOUSE_PATH:=/opt/hive/data/warehouse}"
+: "${HIVE_SCRATCH_DIR:=/opt/hive/scratch}"
+: "${HIVE_QUERY_RESULTS_CACHE_DIRECTORY:=/opt/hive/scratch/_resultscache_}"
+export HIVE_WAREHOUSE_PATH
+export HIVE_SCRATCH_DIR
+export HIVE_QUERY_RESULTS_CACHE_DIRECTORY
+
+envsubst < $HIVE_HOME/conf/core-site.xml.template > 
$HIVE_HOME/conf/core-site.xml
+envsubst < $HIVE_HOME/conf/hive-site.xml.template > 
$HIVE_HOME/conf/hive-site.xml
+envsubst < $HIVE_HOME/conf/llap-daemon-site.xml.template > 
$HIVE_HOME/conf/llap-daemon-site.xml
+# =========================================================================
+
+
+# LLAP daemon logging, temp, and local dirs; can be overridden by the user.
+export LLAP_DAEMON_LOG_DIR="${LLAP_DAEMON_LOG_DIR:-/tmp/llapDaemonLogs}"
+export LLAP_DAEMON_TMP_DIR="${LLAP_DAEMON_TMP_DIR:-/tmp/llapDaemonTmp}"
+export LOCAL_DIRS="${LOCAL_DIRS:-/tmp/llap-local}"
+
+mkdir -p "${LLAP_DAEMON_LOG_DIR}" "${LLAP_DAEMON_TMP_DIR}" "${LOCAL_DIRS}"
+
+cd "${HIVE_HOME}"

Review Comment:
   do we need this `cd "${HIVE_HOME}"` as WORKDIR $HIVE_HOME is set in 
Dockerfile-llap?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to