Class OrchestrationDriver
java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.OrchestrationDriver
The actual pipeline-crawl orchestration body (preferred harness path — blocking gRPC, no Mutiny).
Single virtual-thread
sequence:
- Setup: resolve account, build graph from request, ensure active graph version, create connector-admin datasource, bind datasource to graph.
- Trigger: call the JDBC connector to register a crawl
definition and start it. Returns a
triggerId. - Subscribe: open a server-streaming subscription to the
connector's
StreamCrawlStatusRPC, hydrating aRunLedgerfromEXPECTED_COUNT_KNOWN,DOC_DISPATCHED, andDISPATCH_COMPLETEevents. - Wait: poll the receive-side taps every poll interval,
refreshing each
StageLedgerfromTransportTestCounter.getReceivedDocIds(String, String). Emit a tick event per poll and terminate whenRunLedger.isClosedSuccessfully()OR a deadline is hit OR the post-dispatch grace window expires without receive-side catch-up. - Summarize: emit a final
summaryevent with the outcome and, if there's a gap, the actual missing doc id set.
Strict error rules: catches list specific exception types only. No
catch (RuntimeException), no swallowed exceptions. Any failure
before the wait loop is reported via the summary event with the
exception type + message; the response stream is closed by the caller's
finally on EventEmitter.close().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHard wall-clock deadline exceeded.static final classWait loop interrupted (sidecar shutdown, etc).static final classThe OS-drain phase found docs the platform terminally failed to index.static final classDispatch-stream subscription terminated with a real failure: either the connector emitted a malformed event our handler refused to accept, or the gRPC stream errored with a non-CANCELLED status. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun(ai.pipestream.testing.harness.v1.RunPipelineCrawlRequest req, EventEmitter emitter) Run one orchestration.
-
Constructor Details
-
OrchestrationDriver
public OrchestrationDriver()Creates the orchestration driver. Managed by CDI.
-
-
Method Details
-
run
Run one orchestration. Caller is on a virtual thread; we block here until the run terminates. Caller is responsible forEventEmitter.close().- Parameters:
req- the run request selecting the source and carrying its source configemitter- the sink that progress and summary events are emitted to during the run
-