Skip to content

Commit

Permalink
correctly handle zeppelin.python property.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leemoonsoo committed Mar 19, 2017
1 parent 5be8db4 commit 3e6603b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ public InterpreterResult interpret(String st, InterpreterContext context) {
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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,23 @@ public void setPythonCommand(String cmd) {
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();
Expand Down

0 comments on commit 3e6603b

Please sign in to comment.