jdbc:hive2://host:10001/default;transportMode=http;httpPath=cliservice
try (Connection conn = DriverManager.getConnection(url); Statement stmt = conn.createStatement()) hive server address java
hive-jdbc pulls Hadoop & Hive dependencies – make sure versions match your server. hive server address java
| Component | Value / Pattern | |--------------------|-------------------------------------------------------| | JDBC prefix | jdbc:hive2:// | | Host:Port | <hive-server>:10000 (or HTTP 10001) | | Auth param | auth=noSasl / principal=... / user=... | | Transport mode | binary (default) or transportMode=http | | HA (ZooKeeper) | serviceDiscoveryMode=zooKeeper + ZooKeeper hosts | | Java driver | org.apache.hive.jdbc.HiveDriver (auto-loaded) | hive server address java
The most critical aspect of the Java implementation is the JDBC URL string.
Allow inbound on port 10000 (or custom port)