mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
ZEPPELIN-3290. Unnecessary message 'IPython is available, use IPython for PySparkInterpreter'
This commit is contained in:
parent
233c098734
commit
7bf8d6ea42
2 changed files with 10 additions and 36 deletions
|
|
@ -232,30 +232,17 @@ public class PythonInterpreter extends Interpreter implements ExecuteResultHandl
|
|||
StringUtils.isEmpty(iPythonInterpreter.checkIPythonPrerequisite(getPythonBindPath()))) {
|
||||
try {
|
||||
iPythonInterpreter.open();
|
||||
if (InterpreterContext.get() != null) {
|
||||
InterpreterContext.get().out.write(("IPython is available, " +
|
||||
"use IPython for PythonInterpreter\n")
|
||||
.getBytes());
|
||||
}
|
||||
LOG.info("Use IPythonInterpreter to replace PythonInterpreter");
|
||||
LOG.info("IPython is available, Use IPythonInterpreter to replace PythonInterpreter");
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
iPythonInterpreter = null;
|
||||
LOG.warn("Fail to open IPythonInterpreter", e);
|
||||
}
|
||||
}
|
||||
// reset iPythonInterpreter to null
|
||||
|
||||
// reset iPythonInterpreter to null as it is not available
|
||||
iPythonInterpreter = null;
|
||||
|
||||
try {
|
||||
if (InterpreterContext.get() != null) {
|
||||
InterpreterContext.get().out.write(("IPython is not available, " +
|
||||
"use the native PythonInterpreter\n")
|
||||
.getBytes());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Fail to write InterpreterOutput", e.getMessage());
|
||||
}
|
||||
|
||||
LOG.info("IPython is not available, use the native PythonInterpreter");
|
||||
// Add matplotlib display hook
|
||||
InterpreterGroup intpGroup = getInterpreterGroup();
|
||||
if (intpGroup != null && intpGroup.getInterpreterHookRegistry() != null) {
|
||||
|
|
|
|||
|
|
@ -126,30 +126,17 @@ public class PySparkInterpreter extends Interpreter implements ExecuteResultHand
|
|||
iPySparkInterpreter.checkIPythonPrerequisite(getPythonExec(getProperties())))) {
|
||||
try {
|
||||
iPySparkInterpreter.open();
|
||||
if (InterpreterContext.get() != null) {
|
||||
// don't print it when it is in testing, just for easy output check in test.
|
||||
InterpreterContext.get().out.write(("IPython is available, " +
|
||||
"use IPython for PySparkInterpreter\n")
|
||||
.getBytes());
|
||||
}
|
||||
LOGGER.info("Use IPySparkInterpreter to replace PySparkInterpreter");
|
||||
LOGGER.info("IPython is available, Use IPySparkInterpreter to replace PySparkInterpreter");
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
iPySparkInterpreter = null;
|
||||
LOGGER.warn("Fail to open IPySparkInterpreter", e);
|
||||
}
|
||||
}
|
||||
iPySparkInterpreter = null;
|
||||
if (getProperty("zeppelin.pyspark.useIPython", "true").equals("true")) {
|
||||
// don't print it when it is in testing, just for easy output check in test.
|
||||
try {
|
||||
InterpreterContext.get().out.write(("IPython is not available, " +
|
||||
"use the native PySparkInterpreter\n")
|
||||
.getBytes());
|
||||
} catch (IOException e) {
|
||||
LOGGER.warn("Fail to write InterpreterOutput", e);
|
||||
}
|
||||
}
|
||||
|
||||
// reset iPySparkInterpreter to null as it is not available
|
||||
iPySparkInterpreter = null;
|
||||
LOGGER.info("IPython is not available, use the native PySparkInterpreter\n");
|
||||
// Add matplotlib display hook
|
||||
InterpreterGroup intpGroup = getInterpreterGroup();
|
||||
if (intpGroup != null && intpGroup.getInterpreterHookRegistry() != null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue