saLeox commented on pull request #3925:
URL: https://github.com/apache/zeppelin/pull/3925#issuecomment-1075893018
@Reamer @zjffdu Hi, sorry to comment here after merging for long time.
For the second improvement
```
Use exec [...] instead of eval [..] &, which means that the Java interpreter
process is not a fork of the shell script
-> no trap handling required in the start script
-> signals land in the JVM
```
I encounter an issue in version 0.10 for python interpreter and report to
you here:
Given that
```
export ZEPPELIN_IMPERSONATE_CMD='sudo -H -u ${ZEPPELIN_IMPERSONATE_USER}
bash -c '
```
and choose **User Impersonate** for python interpreter
After running paragraph, it will get some error as below:
```
[INFO] Interpreter launch command: sudo -H -u suns bash -c source
/home/zeppelin/zeppelin/conf/zeppelin-env.sh; java -Dfile.encoding=UTF-8
-Dlog4j.configuration=file:///home/zeppelin/zeppelin/conf/log4j.properties
-Dlog4j.configurationFile=file:///home/zeppelin/zeppelin/conf/log4j2.properties
-Dzeppelin.log.file=/home/zeppelin/zeppelin/logs/zeppelin-interpreter-python-suns-suns-zeppelin-data-zeppelin00.log
-Xms2048m -Xmx2048m -XX:MaxPermSize=512m -cp
:/home/zeppelin/zeppelin/local-repo/python/*:/home/zeppelin/zeppelin/interpreter/python/*:::/home/zeppelin/zeppelin/interpreter/zeppelin-interpreter-shaded-0.11.0-SNAPSHOT.jar
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer 10.71.27.67
23456 python-suns :
/home/zeppelin/zeppelin/bin/interpreter.sh: line 324: exec: sudo -H -u suns
bash -c: not found
```
I change the `exec` back to `eval` only for **Python** interpreter, the
problem is gone.
But the spark interpreter(not sure for the other interpreters) still need to
use `exec`, otherwise will get another error.
So the workaround from my side will looks like as below:
```
if [[ "${INTERPRETER_ID}" == "python" ]]; then
exec "${INTERPRETER_RUN_COMMAND[@]}"
else
exec "${INTERPRETER_RUN_COMMAND[@]}"
fi
```
Is it possible to take a look and figure out the solution?
--
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]