You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pluggable graph interface for Hoptimator topology + Mermaid renderer (#222)
* Add pipeline graph SPI + Mermaid renderer
Introduces the visualization framework consumed by the `!graph`
command in a follow-up commit:
- `com.linkedin.hoptimator.graph` (in hoptimator-api): GraphNode,
GraphEdge, GraphTarget, PipelineGraph data model + GraphProvider
and GraphRenderer SPIs.
- New `hoptimator-graph` module hosting the Mermaid renderer plus
CronHumanizer (renders cron expressions in trigger labels as
English via cron-utils CronDescriptor, falling through to the raw
cron string on parse failure).
The renderer is registered via META-INF/services and discovered by
GraphService (added in the next commit).
* Add K8s graph provider with SQL identifier resolution
Hooks the graph SPI from the previous commit up to a working data
path:
- GraphService (hoptimator-jdbc): the dispatch entry point. Walks
Calcite's schema tree to resolve a user-typed identifier
(TWO_LEVEL.NAME or THREE_LEVEL.SCHEMA.NAME) to a GraphTarget,
loads GraphProvider and GraphRenderer impls via ServiceLoader,
and dispatches.
- PipelineGraphBuilder + K8sGraphProvider (hoptimator-k8s):
direction-aware traversal of Pipeline / TableTrigger / View
references that produces a PipelineGraph rooted at the target.
- LogicalTable detection: HoptimatorJdbcSchema.isLogical() lazily
walks its downstream Calcite connection to spot any sub-schema
tagged with the new LogicalSchemaMarker, so the JDBC layer can
surface LogicalTable targets without baking driver-specific URL
prefixes or class names into the adapter. LogicalTableSchema
implements the marker. isLogical() lives on HoptimatorJdbcSchema
rather than the Database SPI to keep Database a thin K8s-CRD
surface free of planner concerns.
- GraphService resolves identifiers to MaterializedView (view),
LogicalTable (marker hit), or Resource (everything else with a
HoptimatorJdbcSchema backing) targets; failures throw SQLException
with the offending segment in the message rather than silently
building a degenerate graph.
* Add `!graph` CLI command + integration tests
Surfaces the visualization framework as a single Sqlline command:
- `!graph <identifier> [depth]` in hoptimator-cli renders the
resolved target as Mermaid. Depth defaults to a reasonable bound
and negative depths error. The command auto-detects target kind
via the resolver in the previous commit, so users do not need
separate `!graph table` / `!graph view` / `!graph logical`
variants.
- Quidem-driven integration scripts under hoptimator-k8s,
hoptimator-logical, and hoptimator-mysql (k8s-graph.id,
k8s-trigger-graph.id, logical-graph.id, mysql-graph.id) that
exercise the resolver + Mermaid renderer end-to-end against the
test catalogs each module already ships. Driven by the new
graph-aware harness in QuidemTestBase.
- Sample logicaldb.yaml updated to expose a logical table that the
integration scripts can exercise.
* Refactor to remove heavy K8s .list() calls
* Add documentation and address agent pr review comments
* Add TODO
* Clean up suppressions
| Connect a new external system to the catalog (Kafka, Venice, MySQL, your-system). | A JDBC adapter + `TableTemplate` / `JobTemplate`. See [Data sources](data-sources.md). |
12
-
| Send Hoptimator-generated specs somewhere other than Kubernetes. | A `Deployer` + `DeployerProvider`. See [Deployers](deployers.md). |
13
-
| Reject SQL or YAML that's invalid in your environment before it deploys. | A `Validator` + `ValidatorProvider`. See [Validators](validators.md). |
14
-
| Pull configuration values from somewhere other than `hoptimator-configmap`. | A `ConfigProvider`. See [Config providers](config-providers.md). |
15
-
| Customize what gets deployed for an existing system. | Just a `TableTemplate` or `JobTemplate` — no Java needed. See [Templates and configuration](../kubernetes/templates.md). |
| Connect a new external system to the catalog (Kafka, Venice, MySQL, your-system). | A JDBC adapter + `TableTemplate` / `JobTemplate`. See [Data sources](data-sources.md). |
12
+
| Send Hoptimator-generated specs somewhere other than Kubernetes. | A `Deployer` + `DeployerProvider`. See [Deployers](deployers.md). |
13
+
| Reject SQL or YAML that's invalid in your environment before it deploys. | A `Validator` + `ValidatorProvider`. See [Validators](validators.md). |
14
+
| Pull configuration values from somewhere other than `hoptimator-configmap`. | A `ConfigProvider`. See [Config providers](config-providers.md). |
15
+
| Build a dependency graph from some backing store (e.g. K8s). | A `GraphProvider`. The K8s-backed default ships in `hoptimator-k8s`. |
16
+
| Render the dependency graph in a format other than Mermaid (DOT, JSON, an interactive web view, …). | A `GraphRenderer`. The Mermaid default ships in `hoptimator-graph`. |
17
+
| Customize what gets deployed for an existing system. | Just a `TableTemplate` or `JobTemplate` — no Java needed. See [Templates and configuration](../kubernetes/templates.md). |
16
18
17
19
## How extensions are loaded
18
20
19
-
All four extension points are loaded via Java's `ServiceLoader`. To register
21
+
All extension points are loaded via Java's `ServiceLoader`. To register
20
22
an implementation, drop a service file under
21
23
`src/main/resources/META-INF/services/` named after the SPI interface:
0 commit comments