Exposed StarRocks Adapter
Latest stable Based on Exposed release 1.11.0
bluetape4k-exposed-starrocks is a deliberately narrow Exposed JDBC adapter for StarRocks Connector/J. Release 1.11 proves local all-in-one connection, simple OLAP table DDL, insert, and select paths; it does not claim broad MySQL parity.
Problem
Section titled “Problem”StarRocks speaks a MySQL-compatible wire protocol but has its own OLAP DDL and durability model. The adapter registers the driver/dialect, keeps the connection in autocommit, and provides a conservative table base for smoke-tested schemas.
When to use it
Section titled “When to use it”Use it when the proven 1.11 surface matches a small StarRocks integration and you are prepared to validate each additional feature. Prefer native SQL or a dedicated ingestion path beyond that boundary.
Coordinates
Section titled “Coordinates”dependencies { implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>")) implementation("io.github.bluetape4k.exposed:bluetape4k-exposed-starrocks")}Core concepts
Section titled “Core concepts”StarRocksDatabaseaccepts host/FE query port/catalog/database, a JDBC URL, orDataSource.StarRocksConnectionWrapperforces autocommit; commit/rollback are no-ops.StarRocksTableremoves relational primary-key syntax and appendsENGINE=OLAPwith single-replica fixture properties.StarRocksDialectdisables unproven schema mutation and generated-key features.
Quick start
Section titled “Quick start”val db = StarRocksDatabase.connect( host = "localhost", port = 9030, catalog = "default_catalog", database = "analytics", user = "root",)transaction(db) { Events.selectAll().limit(100).toList() }API by task
Section titled “API by task”| Task | API |
|---|---|
| Direct connection | StarRocksDatabase.connect(...) |
| Application pool | StarRocksDatabase.connect(dataSource) |
| Extra driver properties | StarRocksConnectionOptions |
| Narrow fixture DDL | extend StarRocksTable |
| Query/write | Exposed JDBC DSL within independent statements |
Recommended patterns
Section titled “Recommended patterns”Treat the module as an opt-in compatibility layer. Review generated DDL, replace fixture replication settings for production, and make writes idempotent. Use database-side paging and aggregation; do not infer generic batch semantics from the single-row smoke path.
Integrations
Section titled “Integrations”The module exposes StarRocks Connector/J. Release tests start starrocks/allin1-ubuntu with Testcontainers and prove metadata, connection validation, table creation, insert, and select. That local image is evidence for the smoke path, not every production topology.
Configuration
Section titled “Configuration”The URL is jdbc:starrocks://host:port/catalog.database, normally using FE query port 9030. The caller owns pool lifecycle. extraProperties is an escape hatch and every key/value must be nonblank.
Failure modes
Section titled “Failure modes”- Rollback is not a durability guarantee; statements execute independently.
ALTER COLUMN TYPE, sequences, multiple generated keys, and several reference actions are disabled.- The default
replication_num=1emitted byStarRocksTableis for local fixtures. - MySQL wire compatibility does not prove MySQL DDL or transaction equivalence.
Operations
Section titled “Operations”Observe load errors, query latency, tablet/replica health, FE availability, and rejected rows. Keep ingestion retry and deduplication policy outside the JDBC wrapper and validate production DDL through the StarRocks schema tooling you operate.
Testing
Section titled “Testing”Keep the all-in-one container test for adapter regression and add environment-gated tests against the production-like topology. Assert the final DDL string, not only that SchemaUtils.create returns.
Workshops and learning path
Section titled “Workshops and learning path”Read the database adapter matrix and OLTP vs OLAP guide. Expand from connection → DDL → one insert → one read, adding evidence before relying on any new feature.
Limitations
Section titled “Limitations”Release 1.11 proves a narrow local AIO smoke scope. It does not promise full Connector/J, MySQL dialect, distributed transaction, batch ingestion, paging, or production DDL parity.
Release diagrams
Section titled “Release diagrams”These diagrams are loaded directly from README assets published with the 1.11.0 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.
StarRocks local OLAP integration boundary diagram
Section titled “StarRocks local OLAP integration boundary diagram”Release README: exposed/starrocks/README.md
StarRocks local smoke lifecycle diagram
Section titled “StarRocks local smoke lifecycle diagram”Release README: exposed/starrocks/README.md

