Skip to content

Commit

Permalink
Enabled removing some properties provided by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jongyoul committed Aug 3, 2016
1 parent 3db0b8f commit a819261
Showing 1 changed file with 0 additions and 21 deletions.
Expand Up @@ -828,8 +828,6 @@ private Interpreter createRepl(String dirName, String className,
throws InterpreterException {
logger.info("Create repl {} from {}", className, dirName);

updatePropertiesFromRegisteredInterpreter(property, className);

ClassLoader oldcl = Thread.currentThread().getContextClassLoader();
try {

Expand Down Expand Up @@ -892,32 +890,13 @@ private Interpreter createRemoteRepl(String interpreterPath, String noteId, Stri
String localRepoPath = conf.getInterpreterLocalRepoPath() + "/" + interpreterSettingId;
int maxPoolSize = conf.getInt(ConfVars.ZEPPELIN_INTERPRETER_MAX_POOL_SIZE);

updatePropertiesFromRegisteredInterpreter(property, className);

LazyOpenInterpreter intp = new LazyOpenInterpreter(new RemoteInterpreter(
property, noteId, className, conf.getInterpreterRemoteRunnerPath(),
interpreterPath, localRepoPath, connectTimeout,
maxPoolSize, remoteInterpreterProcessListener));
return intp;
}

private Properties updatePropertiesFromRegisteredInterpreter(Properties properties,
String className) {
RegisteredInterpreter registeredInterpreter = Interpreter.findRegisteredInterpreterByClassName(
className);
if (null != registeredInterpreter) {
Map<String, InterpreterProperty> defaultProperties = registeredInterpreter.getProperties();
for (String key : defaultProperties.keySet()) {
if (!properties.containsKey(key) && null != defaultProperties.get(key).getValue()) {
properties.setProperty(key, defaultProperties.get(key).getValue());
}
}
}

return properties;
}


private URL[] recursiveBuildLibList(File path) throws MalformedURLException {
URL[] urls = new URL[0];
if (path == null || path.exists() == false) {
Expand Down

0 comments on commit a819261

Please sign in to comment.