apache / apache/gravitino

[FEATURE] Support Hive Metastore namespace backend for Lance REST server

Open
#11,782 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 17h
Merged PRs (30d)
339

Description

### Describe the feature

Add a `hive` namespace backend to the Lance REST server so Lance tables can be managed in a Hive Metastore (HMS), the same way the Iceberg REST server already supports HMS.

A namespace would map to a Hive database (1 level) and a table to `db.table` (2 levels). Lance tables are registered as `EXTERNAL_TABLE`s carrying `table_type=lance`. The backend acts purely as a pointer registry (`managedVersioning=false`) — it never writes Lance data — which matches the existing Gravitino backend and the Lance namespace reference implementations.

### Motivation

Today Lance tables can only be cataloged through the Gravitino backend. Many deployments already operate a Hive Metastore as their central metadata service; a Hive backend lets them register and discover Lance tables there without standing up additional infrastructure.

### Describe the solution

Register a new `HIVE` value in the existing `LanceNamespaceBackend` enum plug-point (no REST-server wiring changes), backed by a `HiveLanceNamespaceWrapper` that talks to HMS through a pooled `IMetaStoreClient` (compiled against Hive 2.3.9). Add config keys `hive-metastore-uris`, `hive-warehouse`, and `hive-client-pool-size`.

### Additional context

This is the first of two steps; a follow-up will swap in an mTLS Hive client at the `HiveClientPool.newClient()` seam.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing Gravitino backend, the Iceberg REST server's HMS support, and the LanceNamespaceBackend enum plug-point. Trace how HiveLanceNamespaceWrapper and HiveClientPool.newClient() should handle the listed configuration keys and one- or two-level names. Done means the HIVE backend can register and discover EXTERNAL_TABLE Lance entries without writing Lance data.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.