Source:
public InterpreterClient launch(InterpreterLaunchContext context) throws IOException { LOGGER.info("Launching Interpreter: " + context.getInterpreterSettingGroup()); this.properties = context.getProperties(); InterpreterOption option = context.getOption(); InterpreterRunner runner = context.getRunner(); String groupName = context.getInterpreterSettingGroup(); String name = context.getInterpreterSettingName(); int connectTimeout = zConf.getInt(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT); if (option.isExistingProcess()) { return new RemoteInterpreterRunningProcess( context.getInterpreterSettingName(), connectTimeout, option.getHost(), option.getPort()); } else { if (zConf.isRecoveryEnabled()) { Map<String, InterpreterClient> clients = recoveryStorage.restore(); if (clients.containsKey(context.getInterpreterGroupId())) { InterpreterClient client = clients.get(context.getInterpreterGroupId()); if (client.isRunning()) { LOGGER.info("Recover InterpreterProcess: " + client.getHost() + ":" + client.getPort()); return (RemoteInterpreterRunningProcess) client; } else { LOGGER.warn("Can not recovery interpreter process: " + client.getHost() + ":" + client.getPort() + ", as it is already terminated."); } } } String localRepoPath = zConf.getInterpreterLocalRepoPath() + "/" + context.getInterpreterSettingId(); return new RemoteInterpreterManagedProcess( runner != null ? runner.getPath() : zConf.getInterpreterRemoteRunnerPath(), zConf.getCallbackPortRange(), zConf.getInterpreterPortRange(), zConf.getInterpreterDir() + "/" + groupName, localRepoPath, buildEnvFromProperties(), connectTimeout, name); } }

Target:
public InterpreterClient launch(InterpreterLaunchContext context) throws IOException { LOGGER.info("Launching Interpreter: " + context.getInterpreterSettingGroup()); this.properties = context.getProperties(); InterpreterOption option = context.getOption(); InterpreterRunner runner = context.getRunner(); String groupName = context.getInterpreterSettingGroup(); String name = context.getInterpreterSettingName(); int connectTimeout = zConf.getInt(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT); if (option.isExistingProcess()) { return new RemoteInterpreterRunningProcess( context.getInterpreterSettingName(), connectTimeout, option.getHost(), option.getPort()); } else { if (zConf.isRecoveryEnabled()) { InterpreterClient recoveredClient = recoveryStorage.getInterpreterClient(context.getInterpreterGroupId()); if (recoveredClient != null) { if (recoveredClient.isRunning()) { LOGGER.info("Recover interpreter process: " + recoveredClient.getHost() + ":" + recoveredClient.getPort()); return recoveredClient; } else { LOGGER.warn("Cannot recover interpreter process: " + recoveredClient.getHost() + ":" + recoveredClient.getPort() + ", as it is already terminated."); } } } String localRepoPath = zConf.getInterpreterLocalRepoPath() + "/" + context.getInterpreterSettingId(); return new RemoteInterpreterManagedProcess( runner != null ? runner.getPath() : zConf.getInterpreterRemoteRunnerPath(), zConf.getCallbackPortRange(), zConf.getInterpreterPortRange(), zConf.getInterpreterDir() + "/" + groupName, localRepoPath, buildEnvFromProperties(), connectTimeout, name); } }