This is an automated email from the ASF dual-hosted git repository.
dnskr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 53074ec1ab [KYUUBI #7238] [DOC] Replace 'Getting Started with Hive
JDBC' markdown with rst
53074ec1ab is described below
commit 53074ec1ab0c88a2eba3af622ed382602a20ca40
Author: dnskr <[email protected]>
AuthorDate: Mon Nov 3 22:41:22 2025 +0100
[KYUUBI #7238] [DOC] Replace 'Getting Started with Hive JDBC' markdown with
rst
### Why are the changes needed?
This change fixes version value of JDBC driver by using `release` variable
instead of hardcoded `1.7.0` value.
### How was this patch tested?
Check the doc page looks the same except JDBC driver version value.
<img width="1289" height="891" alt="Screenshot 2025-11-02 at 18 53 27"
src="https://github.com/user-attachments/assets/e16561db-a873-4808-b8ce-24e06ff439e8"
/>
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #7238 from
dnskr/Replace-'Getting-Started-with-Hive-JDBC'-markdown-with-rst.
Closes #7238
1e19251b1 [dnskr] [DOC] Replace 'Getting Started with Hive JDBC' markdown
with rst
Authored-by: dnskr <[email protected]>
Signed-off-by: dnskr <[email protected]>
---
docs/quick_start/quick_start_with_jdbc.md | 94 -----------------------------
docs/quick_start/quick_start_with_jdbc.rst | 97 ++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+), 94 deletions(-)
diff --git a/docs/quick_start/quick_start_with_jdbc.md
b/docs/quick_start/quick_start_with_jdbc.md
deleted file mode 100644
index c0344db223..0000000000
--- a/docs/quick_start/quick_start_with_jdbc.md
+++ /dev/null
@@ -1,94 +0,0 @@
-<!--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--->
-
-# Getting Started with Hive JDBC
-
-## How to get the Kyuubi JDBC driver
-
-Kyuubi Thrift API is fully compatible with HiveServer2, so technically, it
allows to use any Hive JDBC driver to connect
-Kyuubi Server. But it's recommended to use [Kyuubi Hive JDBC
driver](../client/jdbc/kyuubi_jdbc), which is forked from
-Hive 3.1.x JDBC driver, aims to support some missing functionalities of the
original Hive JDBC driver.
-
-The driver is available from Maven Central:
-
-```xml
-<dependency>
- <groupId>org.apache.kyuubi</groupId>
- <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
- <version>1.7.0</version>
-</dependency>
-```
-
-## Connect to non-kerberized Kyuubi Server
-
-The following java code connects directly to the Kyuubi Server by JDBC without
using kerberos authentication.
-
-```java
-package org.apache.kyuubi.examples;
-
-import java.sql.*;
-
-public class KyuubiJDBC {
-
- private static String driverName = "org.apache.kyuubi.jdbc.KyuubiHiveDriver";
- private static String kyuubiJdbcUrl =
"jdbc:kyuubi://localhost:10009/default;";
-
- public static void main(String[] args) throws SQLException {
- try (
- Connection conn = DriverManager.getConnection(kyuubiJdbcUrl);
- Statement stmt = conn.createStatement();
- ResultSet rs = stmt.executeQuery("show databases")) {
- while (rs.next()) {
- System.out.println(rs.getString(1));
- }
- }
- }
-}
-```
-
-## Connect to Kerberized Kyuubi Server
-
-The following Java code uses a keytab file to login and connect to Kyuubi
Server by JDBC.
-
-```java
-package org.apache.kyuubi.examples;
-
-import java.sql.*;
-
-public class KyuubiJDBCDemo {
-
- private static String driverName = "org.apache.kyuubi.jdbc.KyuubiHiveDriver";
- private static String kyuubiJdbcUrlTemplate =
"jdbc:kyuubi://localhost:10009/default;" +
-
"kyuubiClientPrincipal=%s;kyuubiClientKeytab=%s;kyuubiServerPrincipal=%s";
-
- public static void main(String[] args) throws SQLException {
- String clientPrincipal = args[0]; // Kerberos principal
- String clientKeytab = args[1]; // Keytab file location
- String serverPrincipal = args[2]; // Kerberos principal used by Kyuubi
Server
- String kyuubiJdbcUrl = String.format(kyuubiJdbcUrlTemplate,
clientPrincipal, clientKeytab, serverPrincipal);
- try (
- Connection conn = DriverManager.getConnection(kyuubiJdbcUrl);
- Statement stmt = conn.createStatement();
- ResultSet rs = stmt.executeQuery("show databases")) {
- while (rs.next()) {
- System.out.println(rs.getString(1));
- }
- }
- }
-}
-```
-
diff --git a/docs/quick_start/quick_start_with_jdbc.rst
b/docs/quick_start/quick_start_with_jdbc.rst
new file mode 100644
index 0000000000..4a5b682d54
--- /dev/null
+++ b/docs/quick_start/quick_start_with_jdbc.rst
@@ -0,0 +1,97 @@
+.. Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+.. http://www.apache.org/licenses/LICENSE-2.0
+
+.. Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+Getting Started with Hive JDBC
+==============================
+
+How to get the Kyuubi JDBC driver
+---------------------------------
+
+Kyuubi Thrift API is fully compatible with HiveServer2, so technically, it
allows to use any Hive JDBC driver to connect
+Kyuubi Server. But it's recommended to use :doc:`../client/jdbc/kyuubi_jdbc`,
which is forked from
+Hive 3.1.x JDBC driver, aims to support some missing functionalities of the
original Hive JDBC driver.
+
+The driver is available from Maven Central:
+
+.. parsed-literal::
+
+ <dependency>
+ <groupId>org.apache.kyuubi</groupId>
+ <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+ <version>\ |release|\</version>
+ </dependency>
+
+
+Connect to non-kerberized Kyuubi Server
+---------------------------------------
+
+The following java code connects directly to the Kyuubi Server by JDBC without
using kerberos authentication.
+
+.. code-block:: java
+
+ package org.apache.kyuubi.examples;
+
+ import java.sql.*;
+
+ public class KyuubiJDBC {
+
+ private static String driverName =
"org.apache.kyuubi.jdbc.KyuubiHiveDriver";
+ private static String kyuubiJdbcUrl =
"jdbc:kyuubi://localhost:10009/default;";
+
+ public static void main(String[] args) throws SQLException {
+ try (
+ Connection conn = DriverManager.getConnection(kyuubiJdbcUrl);
+ Statement stmt = conn.createStatement();
+ ResultSet rs = stmt.executeQuery("show databases")) {
+ while (rs.next()) {
+ System.out.println(rs.getString(1));
+ }
+ }
+ }
+ }
+
+Connect to Kerberized Kyuubi Server
+-----------------------------------
+
+The following Java code uses a keytab file to login and connect to Kyuubi
Server by JDBC.
+
+.. code-block:: java
+
+ package org.apache.kyuubi.examples;
+
+ import java.sql.*;
+
+ public class KyuubiJDBCDemo {
+
+ private static String driverName =
"org.apache.kyuubi.jdbc.KyuubiHiveDriver";
+ private static String kyuubiJdbcUrlTemplate =
"jdbc:kyuubi://localhost:10009/default;" +
+
"kyuubiClientPrincipal=%s;kyuubiClientKeytab=%s;kyuubiServerPrincipal=%s";
+
+ public static void main(String[] args) throws SQLException {
+ String clientPrincipal = args[0]; // Kerberos principal
+ String clientKeytab = args[1]; // Keytab file location
+ String serverPrincipal = args[2]; // Kerberos principal used by Kyuubi
Server
+ String kyuubiJdbcUrl = String.format(kyuubiJdbcUrlTemplate,
clientPrincipal, clientKeytab, serverPrincipal);
+ try (
+ Connection conn = DriverManager.getConnection(kyuubiJdbcUrl);
+ Statement stmt = conn.createStatement();
+ ResultSet rs = stmt.executeQuery("show databases")) {
+ while (rs.next()) {
+ System.out.println(rs.getString(1));
+ }
+ }
+ }
+ }