You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2020/08/25 03:10:08 UTC

[zeppelin] branch branch-0.9 updated: [ZEPPELIN-4987]. CLASSPATH is polluted in zeppelin-daemon.sh

This is an automated email from the ASF dual-hosted git repository.

zjffdu pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.9 by this push:
     new 24f60fb  [ZEPPELIN-4987]. CLASSPATH is polluted in zeppelin-daemon.sh
24f60fb is described below

commit 24f60fbea06573cb071fbe9cf12c904a69f6a488
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Sat Aug 8 23:00:18 2020 +0800

    [ZEPPELIN-4987]. CLASSPATH is polluted in zeppelin-daemon.sh
    
    ### What is this PR for?
    
    This PR fix the CLASSPATH issue by using `ZEPPELIN_CLASSPATH` instead of `CLASSPATH`. Otherwise for some systems, zeppelin/lib will be put on the classpath of spark interpreter which cause conflicts with spark dependencies.
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-4987
    
    ### How should this be tested?
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: Jeff Zhang <zj...@apache.org>
    
    Closes #3882 from zjffdu/ZEPPELIN-4987 and squashes the following commits:
    
    0a34db53c [Jeff Zhang] [ZEPPELIN-4987]. CLASSPATH is polluted in zeppelin-daemon.sh
    
    (cherry picked from commit 82ea5c107da719f0fb0e867a0018661e7f5e67cc)
    Signed-off-by: Jeff Zhang <zj...@apache.org>
---
 bin/zeppelin-daemon.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/bin/zeppelin-daemon.sh b/bin/zeppelin-daemon.sh
index 1065b14..517f925 100755
--- a/bin/zeppelin-daemon.sh
+++ b/bin/zeppelin-daemon.sh
@@ -98,7 +98,6 @@ if [[ "${USE_HADOOP}" == "true"  ]]; then
   fi
 fi
 
-CLASSPATH+=":${ZEPPELIN_CLASSPATH}"
 
 if [[ "${ZEPPELIN_NICENESS}" = "" ]]; then
     export ZEPPELIN_NICENESS=0
@@ -182,9 +181,9 @@ function upstart() {
   # where the service manager starts and stops the process
   initialize_default_directories
 
-  echo "ZEPPELIN_CLASSPATH: ${ZEPPELIN_CLASSPATH_OVERRIDES}:${CLASSPATH}" >> "${ZEPPELIN_OUTFILE}"
+  echo "ZEPPELIN_CLASSPATH: ${ZEPPELIN_CLASSPATH_OVERRIDES}:${ZEPPELIN_CLASSPATH}" >> "${ZEPPELIN_OUTFILE}"
 
-  $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}"
+  $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$ZEPPELIN_CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}"
 }
 
 function start() {
@@ -200,9 +199,9 @@ function start() {
 
   initialize_default_directories
 
-  echo "ZEPPELIN_CLASSPATH: ${ZEPPELIN_CLASSPATH_OVERRIDES}:${CLASSPATH}" >> "${ZEPPELIN_OUTFILE}"
+  echo "ZEPPELIN_CLASSPATH: ${ZEPPELIN_CLASSPATH_OVERRIDES}:${ZEPPELIN_CLASSPATH}" >> "${ZEPPELIN_OUTFILE}"
 
-  nohup nice -n $ZEPPELIN_NICENESS $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}" 2>&1 < /dev/null &
+  nohup nice -n $ZEPPELIN_NICENESS $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$ZEPPELIN_CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}" 2>&1 < /dev/null &
   pid=$!
   if [[ -z "${pid}" ]]; then
     action_msg "${ZEPPELIN_NAME} start" "${SET_ERROR}"