Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0C783200B66 for ; Thu, 4 Aug 2016 07:38:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0B04C160AAA; Thu, 4 Aug 2016 05:38:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 54E19160A8C for ; Thu, 4 Aug 2016 07:38:51 +0200 (CEST) Received: (qmail 11559 invoked by uid 500); 4 Aug 2016 05:38:50 -0000 Mailing-List: contact commits-help@zeppelin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zeppelin.apache.org Delivered-To: mailing list commits@zeppelin.apache.org Received: (qmail 11391 invoked by uid 99); 4 Aug 2016 05:38:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2016 05:38:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EB405E3839; Thu, 4 Aug 2016 05:38:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: minalee@apache.org To: commits@zeppelin.apache.org Message-Id: <1e1838661c824027aeeeb67aed7d7501@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: zeppelin git commit: [HOTFIX][ZEPPELIN-1240] Part 2. Removed interpreter properties are restored Date: Thu, 4 Aug 2016 05:38:49 +0000 (UTC) archived-at: Thu, 04 Aug 2016 05:38:52 -0000 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 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 Authored: Wed Aug 3 17:39:33 2016 +0900 Committer: Mina Lee 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 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) {