puchengy opened a new pull request, #11783:
URL: https://github.com/apache/gravitino/pull/11783

   ### What changes were proposed in this pull request?
   
   Adds a new `hive` namespace backend to the Lance REST server so Lance tables 
can be managed in a Hive Metastore (HMS), mirroring how the Iceberg REST server 
supports HMS.
   
   - Registers `HIVE("hive", HiveLanceNamespaceWrapper.class)` in the existing 
`LanceNamespaceBackend` enum plug-point — no REST-server wiring changes needed.
   - Namespace model: a namespace is a Hive database (1 level); a table is 
`db.table` (2 levels). Tables are registered as `EXTERNAL_TABLE`s with 
`table_type=lance`.
   - The HMS backend is a pointer registry only (`managedVersioning=false`): it 
never writes Lance data, consistent with the Gravitino backend and the Lance 
namespace reference implementations. Column-altering operations are rejected.
   - Adds `HiveClientPool` (a connection pool of `IMetaStoreClient`, compiled 
against Hive 2.3.9) plus supporting helpers, ported from 
`lance-namespace-hive2`.
   - New config keys on `LanceConfig`: `hive-metastore-uris`, `hive-warehouse`, 
`hive-client-pool-size` (default 3).
   
   ### Why are the changes needed?
   
   Lance tables currently can only be cataloged through the Gravitino backend. 
Many deployments already run a Hive Metastore as their central metadata 
service; this lets them register and discover Lance tables there without 
standing up extra infrastructure.
   
   Fix: #11782
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes — new property keys:
   - `gravitino.lance-rest.namespace-backend=hive`
   - `gravitino.lance-rest.hive-metastore-uris`
   - `gravitino.lance-rest.hive-warehouse`
   - `gravitino.lance-rest.hive-client-pool-size`
   
   ### How was this patch tested?
   
   New unit tests (41) covering identifier parsing, the HMS↔Lance helpers, and 
the namespace/table operations against a mocked metastore client: 
`TestObjectIdentifier`, `TestHiveUtil`, `TestHiveLanceNamespaceOperations`, 
`TestHiveLanceTableOperations`, `TestHiveLanceConfig`. Verified locally with 
`:lance:lance-common:test`, `compileJava` (both Lance modules), and 
`spotlessCheck` — all pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to