Class JdbcCrawlManager

java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.JdbcCrawlManager

@ApplicationScoped public class JdbcCrawlManager extends Object
Drives the JDBC source for a RunPipelineCrawl run:
  1. Create the crawl definition via gRPC. The request carries the parent SQL, datasource binding, and the target database JDBC url + credentials inline — no separate REST registration step.
  2. Trigger the crawl. Returns the connector's triggerId, which is the crawl_id stamped on every dispatched PipeStream.

Both calls are plain blocking gRPC on the calling virtual thread. Same shape as JdbcCrawlE2ETestService.createCrawlDefinitionAndTrigger.

Wiring: quarkus.grpc.clients.jdbc-connector.* + quarkus.stork."jdbc-connector".* for the gRPC stub.

  • Constructor Details

    • JdbcCrawlManager

      public JdbcCrawlManager()
      Creates the JDBC crawl manager. Managed by CDI.
  • Method Details

    • setupAndTrigger

      public JdbcCrawlManager.JdbcDispatch setupAndTrigger(String accountId, String datasourceId, String apiKey, ai.pipestream.testing.harness.v1.JdbcSourceConfig source)
      Create the crawl definition and start it. Returns the trigger UUID downstream pollers use to filter per-run progress queries.
      Parameters:
      accountId - the run's account id; the crawl name is derived from it
      datasourceId - the datasource the crawl definition binds to
      apiKey - api key attached as x-api-key call metadata on the create-definition call
      source - the JDBC source config (e.g. external-db flag, max documents)
      Returns:
      the JdbcCrawlManager.JdbcDispatch carrying the trigger id and registered crawl name