mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
correctly handle zeppelin.python property.
This commit is contained in:
parent
5be8db4479
commit
3e6603b163
2 changed files with 14 additions and 4 deletions
|
|
@ -89,8 +89,9 @@ public class PythonDockerInterpreter extends Interpreter {
|
|||
mountPythonScript +
|
||||
mountPy4j +
|
||||
"-e PYTHONPATH=\"" + pythonPath + "\" " +
|
||||
image +
|
||||
" python /_zeppelin_tmp/" + pythonScript.getName());
|
||||
image + " " +
|
||||
getPythonInterpreter().getPythonBindPath() + " " +
|
||||
"/_zeppelin_tmp/" + pythonScript.getName());
|
||||
restartPythonProcess();
|
||||
out.clear();
|
||||
return new InterpreterResult(InterpreterResult.Code.SUCCESS, "\"" + image + "\" activated");
|
||||
|
|
|
|||
|
|
@ -444,14 +444,23 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
|
|||
pythonCommand = cmd;
|
||||
}
|
||||
|
||||
public String getPythonCommand() {
|
||||
private String getPythonCommand() {
|
||||
if (pythonCommand == null) {
|
||||
return DEFAULT_ZEPPELIN_PYTHON;
|
||||
return getPythonBindPath();
|
||||
} else {
|
||||
return pythonCommand;
|
||||
}
|
||||
}
|
||||
|
||||
public String getPythonBindPath() {
|
||||
String path = getProperty("zeppelin.python");
|
||||
if (path == null) {
|
||||
return DEFAULT_ZEPPELIN_PYTHON;
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
private Job getRunningJob(String paragraphId) {
|
||||
Job foundJob = null;
|
||||
Collection<Job> jobsRunning = getScheduler().getJobsRunning();
|
||||
|
|
|
|||
Loading…
Reference in a new issue