Registry / database / hive-jdbc

hive-jdbc

JSON →
library4.2.0javamavenunverified

Hive JDBC driver allows Java applications to connect to Apache Hive and execute SQL queries on Hadoop data.

<dependency> <groupId>org.apache.hive</groupId> <artifactId>hive-jdbc</artifactId> <version>4.2.0</version> </dependency>
INSTALL
IMPORT
SIG · HIVE-JDBC
H
hive-jdbc
databasejavav4.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DriverManager
java.sql.DriverManager

Minimal Hive JDBC connection and query execution.

import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class HiveJdbcExample { public static void main(String[] args) throws Exception { Class.forName("org.apache.hive.jdbc.HiveDriver"); Connection conn = DriverManager.getConnection("jdbc:hive2://localhost:10000/default", "user", ""); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT 1"); while (rs.next()) { System.out.println(rs.getInt(1)); } rs.close(); stmt.close(); conn.close(); } }
Debug
Known issues
breakingHive JDBC driver requires HiveServer2 to be running; connecting without it will fail.
fix
Ensure HiveServer2 is started and accessible at the specified host and port.
affects: all
Upgrade
Version history
4.2.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
hive-jdbc — mvn dependency:get hive-jdbc · libregistry