Class SidecarTapPoller
java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.SidecarTapPoller
Reads in-process tap counters and rich-observation snapshots for the
orchestrator's poll loop. Pure CDI bean — no I/O, no network, no
blocking. Wraps
TransportTestCounter (always-on counts) and
RichObservationCollector (opt-in latency / ring buffer / errors)
so the orchestrator has one place to ask for "what's the state of this
tap right now."
Used as the terminal poll when OPENSEARCH_SINK is NOT in the
run's effective steps — the LAST main-flow step's tap is the visible
terminal, and the orchestrator gates "done" on the tap's unique-doc
count reaching the expected total.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the tap poller; its collaborators are injected and it is managed by CDI. -
Method Summary
Modifier and TypeMethodDescriptionvoidresetAccount(String accountId) Reset all per-account state across both collectors.richSnapshot(String accountId, String tapNodeId) Rich snapshot for one observed tap, ornullif no rich data has been collected yet (no docs received OR the tap isn't in rich-collection mode).inttotalCount(String accountId, String tapNodeId) Total receipts (including duplicates) at one tap.intuniqueCount(String accountId, String tapNodeId) Unique-doc count seen at one specific tap node for the given account.
-
Constructor Details
-
SidecarTapPoller
public SidecarTapPoller()Creates the tap poller; its collaborators are injected and it is managed by CDI.
-
-
Method Details
-
uniqueCount
Unique-doc count seen at one specific tap node for the given account. The tap node-ids are whatPipelineGraphFactorystamps on the graph (e.g.,"tap-chunker","tap-opensearch-sink"), which the engine sets aspipe_step_nameon every dispatch to that tap — and the TestProcessor keys the counter on it.- Parameters:
accountId- the account whose counters to readtapNodeId- the tap node-id to read the count for- Returns:
- the number of distinct docs seen at that tap for the account
-
totalCount
-
richSnapshot
Rich snapshot for one observed tap, ornullif no rich data has been collected yet (no docs received OR the tap isn't in rich-collection mode). Caller should treatnullas "no panel data yet — render zeroes or a placeholder."- Parameters:
accountId- the account whose rich data to readtapNodeId- the tap node-id to read the snapshot for- Returns:
- the rich snapshot for that tap, or
nullif none collected yet
-
resetAccount
Reset all per-account state across both collectors. Call at the start of a new run so prior runs' counters don't bleed into the new test.- Parameters:
accountId- the account whose state to clear in both collectors
-