$ show apache/polaris
Apache Polaris is a production-grade, multi-tenant Iceberg REST catalog server built on Quarkus. It provides a REST API for catalog management (namespaces, tables, views), credential vending for cloud storage (S3, GCS, Azure), fine-grained authorization via built-in RBAC or external OPA/Ranger, and event publishing (Kafka, CloudWatch). The system supports two persistence backends: a legacy relational JDBC (PostgreSQL, H2) and a new NoSQL abstraction with custom indexing, caching, and distributed invalidation. Multi-tenancy is implemented via isolated realms, each with its own configuration and persisted state. Key entry points are the Quarkus server (`polaris-server`), a CLI admin tool, and a Python client. External dependencies include Iceberg libraries, Quarkus, Jackson, Testcontainers, and optional integrations like Open Policy Agent, Apache Ranger, and Kafka. The architecture is modular with clear SPI boundaries, making extensions (persistence, auth, federation) pluggable.
The LLM identified 3 files worth highlighting for reuse:
Provides variable-length integer encoding/decoding for compact serialization. This self-contained utility class can be extracted into any project needing efficient integer storage. It demonstrates careful bit manipulation and is independent of the rest of the Polaris codebase.
Implements a fair retry mechanism for concurrent operations, ensuring that operations waiting longer get priority. This is a reusable concurrency pattern, independent of the persistence layer, and can be adapted to other contexts requiring retry with fairness guarantees.
Provides a JUnit extension for managing local AWS service emulation (e.g., S3, STS) using Testcontainers. This is a reusable pattern for integration testing with cloud storage, encapsulating container lifecycle and configuration. It can be extracted and used in any project that needs to test against local AWS emulators.