You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mi...@apache.org on 2016/08/04 05:38:49 UTC
zeppelin git commit: [HOTFIX][ZEPPELIN-1240] Part 2. Removed
interpreter properties are restored
Repository: zeppelin
Updated Branches:
refs/heads/branch-0.6 587bfb706 -> fbb9cd6c8
[HOTFIX][ZEPPELIN-1240] Part 2. Removed interpreter properties are restored
### What is this PR for?
Fixing the bug that users cannot delete some interpreter settings from interpreter tab. This is second part of ZEPPELIN-1240 for branch-0.6 only
### What type of PR is it?
[Bug Fix | Hot Fix]
### Todos
* [x] - Changed `update` to `set`
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-1240
### How should this be tested?
1. Make new interpreter via interpreter tab
1. remove some properties
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jongyoul Lee <jo...@gmail.com>
Closes #1274 from jongyoul/ZEPPELIN-1240-1 and squashes the following commits:
a819261 [Jongyoul Lee] Enabled removing some properties provided by default
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/fbb9cd6c
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/fbb9cd6c
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/fbb9cd6c
Branch: refs/heads/branch-0.6
Commit: fbb9cd6c80970704bb00f4e14e79f61b900268b4
Parents: 587bfb7
Author: Jongyoul Lee <jo...@gmail.com>
Authored: Wed Aug 3 17:39:33 2016 +0900
Committer: Mina Lee <mi...@apache.org>
Committed: Thu Aug 4 14:38:44 2016 +0900
----------------------------------------------------------------------
.../interpreter/InterpreterFactory.java | 21 --------------------
1 file changed, 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/fbb9cd6c/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
index aeb7818..9802275 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
@@ -828,8 +828,6 @@ public class InterpreterFactory implements InterpreterGroupFactory {
throws InterpreterException {
logger.info("Create repl {} from {}", className, dirName);
- updatePropertiesFromRegisteredInterpreter(property, className);
-
ClassLoader oldcl = Thread.currentThread().getContextClassLoader();
try {
@@ -892,8 +890,6 @@ public class InterpreterFactory implements InterpreterGroupFactory {
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,
@@ -901,23 +897,6 @@ public class InterpreterFactory implements InterpreterGroupFactory {
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) {