Remove SPARK_MOUNTED_CONFDIR and SPARK_VOLUME_DIR (#14144)

Signed-off-by: George Zubrienko <GZU@ecco.com>

Signed-off-by: George Zubrienko <GZU@ecco.com>
This commit is contained in:
George Zubrienko 2022-11-23 13:03:28 +01:00 committed by GitHub
parent 5a8bf6d318
commit 1091df2ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 19 deletions

View File

@ -25,9 +25,7 @@ spark_env() {
cat <<"EOF"
# Spark directories
export SPARK_BASEDIR="/opt/bitnami/spark"
export SPARK_VOLUMEDIR="/bitnami/spark"
export SPARK_CONFDIR="${SPARK_BASEDIR}/conf"
export SPARK_MOUNTED_CONFDIR="${SPARK_VOLUMEDIR}/conf"
export SPARK_WORKDIR="${SPARK_BASEDIR}/work"
export SPARK_CONF_FILE="${SPARK_CONFDIR}/spark-defaults.conf"
export SPARK_LOGDIR="${SPARK_BASEDIR}/logs"
@ -70,22 +68,6 @@ export SPARK_INITSCRIPTS_DIR="/docker-entrypoint-initdb.d"
EOF
}
########################
# Copy mounted configuration files
# Globals:
# SPARK_*
# Arguments:
# None
# Returns:
# None
#########################
spark_copy_mounted_config() {
if ! is_dir_empty "$SPARK_MOUNTED_CONFDIR"; then
info "Found mounted configuration files in ${SPARK_MOUNTED_CONFDIR}. Copying them to ${SPARK_CONFDIR}"
cp -Lr "$SPARK_MOUNTED_CONFDIR"/* "$SPARK_CONFDIR"
fi
}
########################
# Validate settings in SPARK_* env vars
# Globals:
@ -328,7 +310,6 @@ spark_conf_set() {
spark_initialize() {
ensure_dir_exists "$SPARK_WORKDIR"
am_i_root && chown "$SPARK_DAEMON_USER:$SPARK_DAEMON_GROUP" "$SPARK_WORKDIR"
spark_copy_mounted_config
if [[ ! -f "$SPARK_CONF_FILE" ]]; then
# Generate default config file
spark_generate_conf_file