Repository: zeppelin Updated Branches: refs/heads/master 6a90cacc1 -> 6f9012b40
ZEPPELIN-1459: Zeppelin JDBC URL properties mangled ### What is this PR for? While creating connection `DriverManager.getConnection(url, properties);` for JDBC interpreter, phoenix driver is modifying the properties that is passed as parameter, which in modifies propertiesMap. This all is resulting in, not able to execute any other paragraph with phoenix interpreter. This only happens if JDBC URI is "jdbc:phoenix:thin:url" ### What type of PR is it? [Bug Fix] ### Todos * [x] - Pass a copy of `properties` to `DriverManager.getConnection(url, properties)` ### What is the Jira issue? * [ZEPPELIN-1459](https://issues.apache.org/jira/browse/ZEPPELIN-1459) ### How should this be tested? Use the example setting below https://issues.apache.org/jira/browse/ZEPPELIN-1459?focusedCommentId=15505750&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15505750 ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? n/a * Is there breaking changes for older versions? n/a * Does this needs documentation? n/a Author: Prabhjyot Singh <[email protected]> Closes #1442 from prabhjyotsingh/ZEPPELIN-1459 and squashes the following commits: 906fe34 [Prabhjyot Singh] ZEPPELIN-1459: Zeppelin JDBC URL properties mangled Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/6f9012b4 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/6f9012b4 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/6f9012b4 Branch: refs/heads/master Commit: 6f9012b40a63a019723753b9eb171a3fd44a6f6e Parents: 6a90cac Author: Prabhjyot Singh <[email protected]> Authored: Tue Sep 20 14:00:46 2016 +0530 Committer: Prabhjyot Singh <[email protected]> Committed: Thu Sep 22 15:24:45 2016 +0530 ---------------------------------------------------------------------- jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6f9012b4/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java ---------------------------------------------------------------------- diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java index bc473ea..0655f3a 100644 --- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java +++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java @@ -210,7 +210,7 @@ public class JDBCInterpreter extends Interpreter { } } if (null == connection) { - final Properties properties = propertiesMap.get(propertyKey); + final Properties properties = (Properties) propertiesMap.get(propertyKey).clone(); logger.info(properties.getProperty(DRIVER_KEY)); Class.forName(properties.getProperty(DRIVER_KEY)); final String url = properties.getProperty(URL_KEY);
