diff --git a/docs/interpreter/jdbc.md b/docs/interpreter/jdbc.md index c21c661bbcc..a94f7bde4de 100644 --- a/docs/interpreter/jdbc.md +++ b/docs/interpreter/jdbc.md @@ -162,7 +162,7 @@ The last step is **Dependency Setting**. Since Zeppelin only includes `PostgreSQ -That's it. You can find more JDBC connection setting examples([Mysql](#mysql), [MariaDB](#mariadb), [Redshift](#redshift), [Apache Hive](#apache-hive), [Presto/Trino](#prestotrino), [Impala](#impala), [Apache Phoenix](#apache-phoenix), and [Apache Tajo](#apache-tajo)) in [this section](#examples). +That's it. You can find more JDBC connection setting examples([Mysql](#mysql), [MariaDB](#mariadb), [Redshift](#redshift), [Apache Hive](#apache-hive), [Presto/Trino](#prestotrino), [Impala](#impala), [Apache Kyuubi (Incubating)](#apache-kyuubi-(incubating)), [Apache Phoenix](#apache-phoenix), and [Apache Tajo](#apache-tajo)) in [this section](#examples). ## JDBC Interpreter Datasource Pool Configuration The Jdbc interpreter uses the connection pool technology, and supports users to do some personal configuration of the connection pool. For example, we can configure `default.validationQuery='select 1'` and `default.testOnBorrow=true` in the Interpreter configuration to avoid the "Invalid SessionHandle" runtime error caused by Session timeout when connecting to HiveServer2 through JDBC interpreter. @@ -827,6 +827,104 @@ Dependencies +### Apache Kyuubi (Incubating) + +Zeppelin connect to `Kyuubi` to run sql via `KyuubiHiveDriver`. There are 2 cases of connecting with Kyuubi: + +* Connect to Kyuubi without KERBEROS +* Connect to Kyuubi with KERBEROS + +Each case requires different settings. + +##### Connect to Kyuubi without KERBEROS + +In this scenario, you need to make the following settings at least. Kyuubi engine run as user of `default.user`. + +Properties + + + + + + + + + + + + + + +
NameValue
default.driverorg.apache.kyuubi.jdbc.KyuubiHiveDriver
default.urljdbc:hive2://kyuubi-server:10009
+ +Dependencies + + + + + + + + + + + + + + +
ArtifactExcludes
org.apache.kyuubi:kyuubi-hive-jdbc-shaded:1.5.2-incubating
org.apache.hive:hive-jdbc:3.1.2
+ + +##### Connect to Kyuubi with KERBEROS + +In this scenario, you need to make the following settings at least. Kyuubi engine run as user of client principal (`zeppelin.jdbc.principal`). + +Properties + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameValue
default.driverorg.apache.kyuubi.jdbc.KyuubiHiveDriver
default.urljdbc:hive2://kyuubi-server:10009/default;principal={kyuubi_principal}
zeppelin.jdbc.auth.typeKERBEROS
zeppelin.jdbc.keytab.locationkeytab of client
zeppelin.jdbc.principalprincipal of client
+ +Dependencies + + + + + + + + + + + + + + +
ArtifactExcludes
org.apache.kyuubi:kyuubi-hive-jdbc-shaded:1.5.2-incubating
org.apache.hive:hive-jdbc:3.1.2
+ ### Apache Phoenix Phoenix supports `thick` and `thin` connection types: diff --git a/docs/quickstart/sql_with_zeppelin.md b/docs/quickstart/sql_with_zeppelin.md index 2f044780203..b2c3beb651e 100644 --- a/docs/quickstart/sql_with_zeppelin.md +++ b/docs/quickstart/sql_with_zeppelin.md @@ -35,6 +35,7 @@ The following guides explain how to use Apache Zeppelin that enables you to writ * [Apache Hive](../interpreter/jdbc.html#apache-hive) * [Presto/Trino](../interpreter/jdbc.html#prestotrino) * [Impala](../interpreter/jdbc.html#impala) + * [Apache Kyuubi (Incubating)](../interpreter/jdbc.html#apache-kyuubi-incubating) * [Apache Phoenix](../interpreter/jdbc.html#apache-phoenix) * [Apache Drill](../interpreter/jdbc.html#apache-drill) * [Apache Tajo](../interpreter/jdbc.html#apache-tajo) 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 f5302dc48ae..705ad19192a 100644 --- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java +++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java @@ -805,7 +805,10 @@ private InterpreterResult executeSql(String dbPrefix, String sql, // start hive monitor thread if it is hive jdbc String jdbcURL = getJDBCConfiguration(user).getPropertyMap(dbPrefix).getProperty(URL_KEY); - if (jdbcURL != null && jdbcURL.startsWith("jdbc:hive2://")) { + String driver = + getJDBCConfiguration(user).getPropertyMap(dbPrefix).getProperty(DRIVER_KEY); + if (jdbcURL != null && jdbcURL.startsWith("jdbc:hive2://") + && driver != null && driver.equals("org.apache.hive.jdbc.HiveDriver")) { HiveUtils.startHiveMonitorThread(statement, context, Boolean.parseBoolean(getProperty("hive.log.display", "true")), this); }