You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2024/07/06 07:59:24 UTC
(zeppelin) 01/03: [ZEPPELIN-6028] Enhance default value assignment for ZEPPELIN_IDENT_STRING (#4772)
This is an automated email from the ASF dual-hosted git repository.
jongyoul pushed a commit to branch branch-0.11
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
commit 227559a51bfa69b3c9e84ad34f60e93ff3e885e2
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Thu Jul 4 00:31:14 2024 +1000
[ZEPPELIN-6028] Enhance default value assignment for ZEPPELIN_IDENT_STRING (#4772)
(cherry picked from commit dbf112fb035cacfa9b833ef859c9e33fa7938edb)
---
bin/common.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/bin/common.sh b/bin/common.sh
index 411e915bbf..56f8aa45ff 100644
--- a/bin/common.sh
+++ b/bin/common.sh
@@ -171,6 +171,14 @@ else
fi
export ZEPPELIN_RUNNER
+if [[ -z "$ZEPPELIN_IDENT_STRING" ]]; then
+ # if for some reason the shell doesn't have $USER defined
+ # (e.g., ssh'd in to execute a command)
+ # let's get the effective username and use that
+ USER=${USER:-$(id -nu)}
+ export ZEPPELIN_IDENT_STRING="${USER}"
+fi
+
if [[ -z "$ZEPPELIN_INTERPRETER_REMOTE_RUNNER" ]]; then
export ZEPPELIN_INTERPRETER_REMOTE_RUNNER="bin/interpreter.sh"
fi