use of org.apache.zeppelin.interpreter.thrift.InterpreterRPCException in project zeppelin by apache.
the class RemoteInterpreterServer method init.
@Override
public void init(Map<String, String> properties) throws InterpreterRPCException, TException {
this.zConf = ZeppelinConfiguration.create();
for (Map.Entry<String, String> entry : properties.entrySet()) {
this.zConf.setProperty(entry.getKey(), entry.getValue());
}
if (zConf.isClusterMode()) {
clusterManagerClient = ClusterManagerClient.getInstance(zConf);
clusterManagerClient.start(interpreterGroupId);
// Cluster mode, discovering interpreter processes through metadata registration
// TODO (Xun): Unified use of cluster metadata for process discovery of all operating modes
// 1. Can optimize the startup logic of the process
// 2. Can solve the problem that running the interpreter's IP in docker may be a virtual IP
putClusterMeta();
}
try {
lifecycleManager = createLifecycleManager();
lifecycleManager.onInterpreterProcessStarted(interpreterGroupId);
} catch (Exception e) {
throw new InterpreterRPCException("Fail to create LifecycleManager, cause: " + e.toString());
}
if (!isTest) {
int connectionPoolSize = this.zConf.getInt(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECTION_POOL_SIZE);
LOGGER.info("Creating RemoteInterpreterEventClient with connection pool size: {}", connectionPoolSize);
intpEventClient = new RemoteInterpreterEventClient(intpEventServerHost, intpEventServerPort, connectionPoolSize);
}
}
Aggregations