Class SingleDocDispatcher
java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.SingleDocDispatcher
Drives the SINGLE_DOC source for a
RunPipelineCrawl run.
Two intake modes, selected by SingleDocSourceConfig.getIntakeMode():
- HTTP (default): streams the sample to connector-intake's HTTP raw
upload (
POST /uploads/raw) — the S3-style path. The body flows connector-intake → repo → S3 chunk-by-chunk and lands in the account's:intakedrive, never buffered whole. - gRPC: builds a
PipeDocwith the sample bytes in itsBlobBagand sends it via the unaryUploadPipeDoc— the in-memory path for small docs. connector-intake enqueues it to the Redis intake ingress (same as HTTP), so the engine drains it to:intakeand the parser hydrates the blob. A client could equally put its own model instructured_data(Any) instead of a blob.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult ofuploadAndDispatch(String, String, String, SingleDocSourceConfig, String): thedoc_idthe upload produced. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionuploadAndDispatch(String accountId, String datasourceId, String apiKey, ai.pipestream.testing.harness.v1.SingleDocSourceConfig cfg, String crawlId) Upload a single bundled sample to connector-intake and return the resultingdoc_id.
-
Constructor Details
-
SingleDocDispatcher
public SingleDocDispatcher()Creates the single-doc dispatcher. Managed by CDI.
-
-
Method Details
-
uploadAndDispatch
public SingleDocDispatcher.SingleDocDispatch uploadAndDispatch(String accountId, String datasourceId, String apiKey, ai.pipestream.testing.harness.v1.SingleDocSourceConfig cfg, String crawlId) Upload a single bundled sample to connector-intake and return the resultingdoc_id. The intake mode (HTTP raw stream vs gRPC unaryUploadPipeDocwith a BlobBag) is chosen bycfg.intake_mode;E2EIntakeMode.E2E_INTAKE_MODE_GRPCselects gRPC, anything else (including UNSPECIFIED) uses the HTTP path.- Parameters:
accountId- the run's account id (stamped on the source_doc_id)datasourceId- the datasource minted byDatasourceManagerapiKey- api key for that datasourcecfg- thesingle_docbranch of the source configcrawlId- the run's crawl id, stamped on the upload so the doc's StepExecutionRecords carry it (live observation panels)- Returns:
- the
SingleDocDispatcher.SingleDocDispatchcarrying the resultingdoc_id - Throws:
IllegalStateException- if the upload fails
-