diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java index dc353b8e18..4fe71f98d2 100644 --- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java +++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java @@ -47,8 +47,8 @@ public class PythonInterpreter extends Interpreter { public static final String BOOTSTRAP_PY = "/bootstrap.py"; public static final String BOOTSTRAP_INPUT_PY = "/bootstrap_input.py"; - public static final String PYTHON_PATH = "python"; - public static final String DEFAULT_PYTHON_PATH = "python"; + public static final String ZEPPELIN_PYTHON = "zeppelin.python"; + public static final String DEFAULT_ZEPPELIN_PYTHON = "python"; private Integer port; private GatewayServer gatewayServer; @@ -63,7 +63,7 @@ public class PythonInterpreter extends Interpreter { "python", PythonInterpreter.class.getName(), new InterpreterPropertyBuilder() - .add(PYTHON_PATH, DEFAULT_PYTHON_PATH, + .add(ZEPPELIN_PYTHON, DEFAULT_ZEPPELIN_PYTHON, "Python directory. Default : python (assume python is in your $PATH)") .build() ); @@ -80,7 +80,7 @@ public class PythonInterpreter extends Interpreter { logger.info("Starting Python interpreter ....."); - logger.info("Python path is set to:" + property.getProperty(PYTHON_PATH)); + logger.info("Python path is set to:" + property.getProperty(ZEPPELIN_PYTHON)); process = getPythonProcess(); @@ -177,7 +177,7 @@ public class PythonInterpreter extends Interpreter { public PythonProcess getPythonProcess() { if (process == null) - return new PythonProcess(getProperty(PYTHON_PATH)); + return new PythonProcess(getProperty(ZEPPELIN_PYTHON)); else return process; } diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java index 6fb26de553..c0bb41c18c 100644 --- a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java +++ b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterTest.java @@ -50,8 +50,8 @@ public class PythonInterpreterTest { Logger logger = LoggerFactory.getLogger(PythonProcess.class); - public static final String PYTHON_PATH = "python"; - public static final String DEFAULT_PYTHON_PATH = "python"; + public static final String ZEPPELIN_PYTHON = "zeppelin.python"; + public static final String DEFAULT_ZEPPELIN_PYTHON = "python"; PythonInterpreter pythonInterpreter = null; PythonProcess mockPythonProcess; @@ -87,7 +87,7 @@ public class PythonInterpreterTest { } Properties properties = new Properties(); - properties.put(PYTHON_PATH, DEFAULT_PYTHON_PATH); + properties.put(ZEPPELIN_PYTHON, DEFAULT_ZEPPELIN_PYTHON); pythonInterpreter = spy(new PythonInterpreter(properties)); when(pythonInterpreter.getPythonProcess()).thenReturn(mockPythonProcess);