Lance Catalog is an OpenAPI specification on top of the storage-based Lance format. It provides an integration point for catalog service like Apache Hive MetaStore (HMS), Apache Gravitino, etc. to store and use Lance tables. To integrate, the catalog service implements a Lance Catalog Adapter, which is a REST server that converts the Lance catalog requests to native requests against the catalog service. Different tools can integrate with Lance Catalog using the generated OpenAPI clients in various languages, and invoke operations in Lance Catalog to read, write and manage Lance tables in the integrated catalog services.
Directory | Description |
---|---|
spec | Lance Catalog OpenAPI specification |
rust/lance-catalog-reqwest-client | Generated Rust reqwest client for Lance Catalog |
python/lance_catalog_urllib3_client | Generated Python urllib3 client for Lance Catalog |
java/lance-catalog-apache-client | Generated Java Apache HTTP client for Lance Catalog |
java/lance-catalog-springboot-server | Generated Java SpringBoot server for Lance |
We use OpenAPI Generator to generate various clients and servers for the catalog specification. We recommend installing the tool through pip for consistent experience across platforms. First time setup of virtual environment and installation:
python3 -m venv .env
source .env/bin/activate
pip install -r requirements.txt
cd rust
# clean all existing generated modules
make clean
# clean, and then generate all clients and servers
make gen
# clean and generate the rust reqwest client
make gen-rust-reqwest-client
# clean, generate and build all clients and servers
make build
We use poetry for managing dependency of Python modules. If you are already in a virtual environment for OpenAPI Generator, you can just run the following to install poetry in the same environment:
pip install -r python/requirements.txt
To run codegen and build actions:
cd python
# clean all existing generated modules
make clean
# clean, and then generate all clients and servers
make gen
# clean and generate the python urllib3 client
make gen-python-urllib3-client
# clean, generate and build all clients and servers
make build
cd java
# clean all existing generated modules
make clean
# clean, and then generate all clients and servers
make gen
# clean and generate the Java Apache client
make gen-java-apache-client
# clean and generate the Java Spring Boot server
make gen-java-springboot-server
# clean, generate and build all clients and servers
make build