use of org.apache.zeppelin.interpreter.ConfInterpreter in project zeppelin by apache.
the class RemoteInterpreter method open.
@Override
public void open() throws InterpreterException {
synchronized (this) {
if (!isOpened) {
// also see method Interpreter.getInterpreterInTheSameSessionByClassName
for (Interpreter interpreter : getInterpreterGroup().getOrCreateSession(this.getUserName(), sessionId)) {
try {
if (!(interpreter instanceof ConfInterpreter)) {
((RemoteInterpreter) interpreter).internal_create();
}
} catch (IOException e) {
throw new InterpreterException(e);
}
}
interpreterProcess.callRemoteFunction(client -> {
LOGGER.info("Open RemoteInterpreter {}", getClassName());
// Push angular object loaded from JSON file to remote interpreter
synchronized (getInterpreterGroup()) {
if (!getInterpreterGroup().isAngularRegistryPushed()) {
pushAngularObjectRegistryToRemote(client);
getInterpreterGroup().setAngularRegistryPushed(true);
}
}
return null;
});
isOpened = true;
}
}
}
Aggregations