replace name zeppelin context on pyspark

This commit is contained in:
CloverHearts 2017-03-31 03:26:07 +09:00
parent b552314641
commit 5da3d6ede8
2 changed files with 7 additions and 7 deletions

View file

@ -113,7 +113,7 @@ public class PySparkInterpreter extends Interpreter implements ExecuteResultHand
// Add matplotlib display hook
InterpreterGroup intpGroup = getInterpreterGroup();
if (intpGroup != null && intpGroup.getInterpreterHookRegistry() != null) {
registerHook(HookType.POST_EXEC_DEV, "z._displayhook()");
registerHook(HookType.POST_EXEC_DEV, "_zc._displayhook()");
}
DepInterpreter depInterpreter = getDepInterpreter();
@ -390,9 +390,9 @@ public class PySparkInterpreter extends Interpreter implements ExecuteResultHand
return new InterpreterResult(Code.ERROR, errorMessage);
}
String jobGroup = Utils.buildJobGroupId(context);
ZeppelinContext z = sparkInterpreter.getZeppelinContext();
z.setInterpreterContext(context);
z.setGui(context.getGui());
ZeppelinContext _zc = sparkInterpreter.getZeppelinContext();
_zc.setInterpreterContext(context);
_zc.setGui(context.getGui());
pythonInterpretRequest = new PythonInterpretRequest(st, jobGroup);
statementOutput = null;

View file

@ -282,8 +282,8 @@ else:
sqlContext = sqlc
completion = PySparkCompletion(intp)
z = PyZeppelinContext(intp.getZeppelinContext())
z._setup_matplotlib()
z = _zc = PyZeppelinContext(intp.getZeppelinContext())
_zc._setup_matplotlib()
while True :
req = intp.getStatements()
@ -299,7 +299,7 @@ while True :
global_hook = None
try:
user_hook = z.getHook('post_exec')
user_hook = _zc.getHook('post_exec')
except:
user_hook = None