Database guides

Apache Hive

Updated 2026-08-01 · 3 min read

HiveServer2 over Thrift, driven straight from AddisDB — no JDBC driver, no Beeline. It needs HTTP transport enabled.

HiveServer2 has no REST API — it speaks Thrift. AddisDB implements the protocol directly over Thrift’s HTTP transport, so you get a Hive connection without installing a JDBC driver or shelling out to Beeline.

Who it is for

Hive is the SQL layer that made Hadoop approachable, and the Hive Metastore remains the catalog that half the big-data ecosystem reads from. Enormous amounts of historical data still live in Hive tables on HDFS and S3.

It is worth separating the two halves: the Metastore — which maps table names to files, partitions and schemas — has outlived Hive-the-execution-engine and is what Spark, Trino and Iceberg catalogs still read. Hive queries themselves run on MapReduce or Tez and are batch-shaped, not interactive.

You are here because your organization has a Hadoop estate — EMR, Cloudera, or on-premises — and the warehouse tables you need to query are Hive tables.

Set up HiveServer2

AddisDB targets HiveServer2 configured for HTTP transport. That is a server-side setting, and it is the one thing to check before you start.

  1. Set hive.server2.transport.mode to http in hive-site.xml (the default is binary).
  2. Confirm hive.server2.thrift.http.port — 10001 by convention — and the path, which defaults to cliservice.
  3. Restart HiveServer2 and confirm it is listening on the HTTP port.
  4. On Amazon EMR or Cloudera, set the same properties through the cluster configuration rather than editing files on the node.
  5. Note your username; HTTP transport authenticates with HTTP Basic.
<!-- hive-site.xml -->
<property>
  <name>hive.server2.transport.mode</name>
  <value>http</value>
</property>
<property>
  <name>hive.server2.thrift.http.port</name>
  <value>10001</value>
</property>

Connect from AddisDB

  1. New Connection → Apache Hive under Big Data / Warehouse. Port prefills to 10001 and the username to hive.
  2. Enter the HiveServer2 host and your credentials.
  3. Set Database to the Hive database you want — default is prefilled.
  4. If the cluster sits inside a VPC, add your bastion under Tunnel (optional).
  5. Test, then Save.

Querying partitioned tables

Hive tables are usually partitioned by date, and a query without a partition predicate reads every file in the table. SHOW PARTITIONS tells you what the partition columns are called before you guess.

SHOW PARTITIONS events;

SELECT event_type, count(*) AS n
FROM   events
WHERE  dt = '2026-07-31'
GROUP  BY event_type;

If a partition was added on the filesystem rather than through Hive, the Metastore does not know about it and the query returns nothing at all. MSCK REPAIR TABLE is what reconciles them.

What AddisDB gives you

  • The Big Data Console — tables from SHOW TABLES in the catalog browser, a query pane, and a row cap enforced by the fetch itself rather than by rewriting your SQL.
  • A session opened once at connect and reused, so each query is just execute-and-fetch.
  • Full safety: Hive is a SQL engine, so read-only connections and destructive-statement detection apply exactly as they do for Postgres.
  • SSH and AWS SSM tunnels for clusters inside a private network.
  • The Chart view, notebooks, ⌘K search, and AI querying grounded in your schema.