You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2020/04/04 14:56:50 UTC
[zeppelin] branch branch-0.9 updated: [ZEPPELIN-4721]Fix the
ConcurrentModificationException occured when connect presto via JDBC
generic interpreter
This is an automated email from the ASF dual-hosted git repository.
zjffdu pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/branch-0.9 by this push:
new a784406 [ZEPPELIN-4721]Fix the ConcurrentModificationException occured when connect presto via JDBC generic interpreter
a784406 is described below
commit a784406b6aacdfd8f4d7df23293fd4e493a33b3c
Author: qiguoxiaosheng <ma...@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 <ma...@163.com>
Closes #3712 from qiguoxiaosheng/master and squashes the following commits:
1ecb53efc [qiguoxiaosheng] modify the presto properties
(cherry picked from commit cb886d31a24314e855fb39cd420082088eeb5327)
Signed-off-by: Jeff Zhang <zj...@apache.org>
---
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);
}
}