From a7465b621000ca98426ce6bb0d5e817e1172ef13 Mon Sep 17 00:00:00 2001 From: iijima_satoshi Date: Mon, 9 Apr 2018 21:24:34 +0900 Subject: [PATCH] Fix: Spark interpreter does not run as impersonated user when disable proxy-user option --- bin/interpreter.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/interpreter.sh b/bin/interpreter.sh index 45ee0ce37f6..a8375afed2b 100755 --- a/bin/interpreter.sh +++ b/bin/interpreter.sh @@ -205,7 +205,8 @@ fi addJarInDirForIntp "${LOCAL_INTERPRETER_REPO}" -if [[ ! -z "$ZEPPELIN_IMPERSONATE_USER" && "${INTERPRETER_ID}" != "spark" ]]; then +if [[ ! -z "$ZEPPELIN_IMPERSONATE_USER" ]]; then + if [[ "${INTERPRETER_ID}" != "spark" || "$ZEPPELIN_IMPERSONATE_SPARK_PROXY_USER" == "false" ]]; then suid="$(id -u ${ZEPPELIN_IMPERSONATE_USER})" if [[ -n "${suid}" || -z "${SPARK_SUBMIT}" ]]; then INTERPRETER_RUN_COMMAND=${ZEPPELIN_IMPERSONATE_RUN_CMD}" '" @@ -213,6 +214,7 @@ if [[ ! -z "$ZEPPELIN_IMPERSONATE_USER" && "${INTERPRETER_ID}" != "spark" ]]; th INTERPRETER_RUN_COMMAND+=" source "${ZEPPELIN_CONF_DIR}'/zeppelin-env.sh;' fi fi + fi fi if [[ -n "${SPARK_SUBMIT}" ]]; then