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 bac58c3 [ZEPPELIN-5042]. NullPointerException is thrown for the 1st query on presto interpreter bac58c3 is described below commit bac58c3cd84069c1ba4aebaac6bcf80e5dff8902 Author: Jeff Zhang <zjf...@apache.org> AuthorDate: Tue Oct 13 17:03:32 2020 +0800 [ZEPPELIN-5042]. NullPointerException is thrown for the 1st query on presto interpreter ### What is this PR for? The root cause is that url is not an valid property of presto, so we remove that before connecting to presto. The null url cause the NPE. ### What type of PR is it? [Bug Fix ] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-5042 ### How should this be tested? * Manually tested ### 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: Jeff Zhang <zjf...@apache.org> Closes #3942 from zjffdu/ZEPPELIN-5042 and squashes the following commits: 45627883e [Jeff Zhang] [ZEPPELIN-5042]. NullPointerException is thrown for the 1st query on presto interpreter (cherry picked from commit 78ea11d91d88df796629eebd28ec8afe6aadc000) Signed-off-by: Jeff Zhang <zjf...@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 40fcd1d..76d4d20 100644 --- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java +++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java @@ -747,8 +747,8 @@ public class JDBCInterpreter extends KerberosInterpreter { } // start hive monitor thread if it is hive jdbc - if (getJDBCConfiguration(user).getPropertyMap(dbPrefix).getProperty(URL_KEY) - .startsWith("jdbc:hive2://")) { + String jdbcURL = getJDBCConfiguration(user).getPropertyMap(dbPrefix).getProperty(URL_KEY); + if (jdbcURL != null && jdbcURL.startsWith("jdbc:hive2://")) { HiveUtils.startHiveMonitorThread(statement, context, Boolean.parseBoolean(getProperty("hive.log.display", "true"))); }