This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new cb886d3 [ZEPPELIN-4721]Fix the ConcurrentModificationException occured when connect presto via JDBC generic interpreter cb886d3 is described below commit cb886d31a24314e855fb39cd420082088eeb5327 Author: qiguoxiaosheng <mashuai...@163.com> AuthorDate: Thu Apr 2 17:23:44 2020 +0800 [ZEPPELIN-4721]Fix the ConcurrentModificationException occured when connect presto via JDBC generic interpreter ### What is this PR for? This PR is to fix a issue of connect presto via jdbc interpreter when more than one element needs to be removed from the jdbc properties. In this PR, I only change a method which iterate keys from jdbc properties. I tested it manully with presto-0.215. ### What type of PR is it? [Bug Fix] ### Todos * [ ] - Task ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-4721 ### How should this be tested? Compiles locally, no unit test performed. There should has more than one element needs to be removed in the 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: qiguoxiaosheng <mashuai...@163.com> Closes #3712 from qiguoxiaosheng/master and squashes the following commits: 1ecb53efc [qiguoxiaosheng] modify the presto properties --- jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 3c9907b..1ef784d 100644 --- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java +++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java @@ -422,8 +422,8 @@ public class JDBCInterpreter extends KerberosInterpreter { if (driverClass != null && (driverClass.equals("com.facebook.presto.jdbc.PrestoDriver") || driverClass.equals("io.prestosql.jdbc.PrestoDriver"))) { // Only add valid properties otherwise presto won't work. - for (Object key : properties.keySet()) { - if (!PRESTO_PROPERTIES.contains(key.toString())) { + for (String key : properties.stringPropertyNames()) { + if (!PRESTO_PROPERTIES.contains(key)) { properties.remove(key); } }