Liking cljdoc? Tell your friends :D

jackdaw.streams.describe


->edgeclj

(->edge from to)
source

assign-idclj

(assign-id applicaton-id n)

Assigns a deterministic :id (via gen-id) to graph node n.

Assigns a deterministic `:id` (via `gen-id`) to graph node `n`.
sourceraw docstring

assign-idsclj

(assign-ids applicaton-id g)

Assigns deterministic :ids to graph g and each of its nodes, then resolves every edge's :from-id/:to-id from the node names.

Assigns deterministic `:id`s to graph `g` and each of its nodes, then resolves
every edge's `:from-id`/`:to-id` from the node names.
sourceraw docstring

base-nodeclj

(base-node t n)

Returns the base graph fragment {:nodes :edges} for topology node n typed t, with edges connecting it to its predecessor and successor nodes.

Returns the base graph fragment `{:nodes :edges}` for topology node `n` typed
`t`, with edges connecting it to its predecessor and successor nodes.
sourceraw docstring

collapse-merge-chainsclj

(collapse-merge-chains g)

Collapses a chain of pairwise Kafka merge nodes in graph g into a single N-way merge, rewriting edges onto the head merge node and pruning the redundant intermediate nodes.

Collapses a chain of pairwise Kafka merge nodes in graph `g` into a single
N-way merge, rewriting edges onto the head merge node and pruning the redundant
intermediate nodes.
sourceraw docstring

describe-nodecljmultimethod

source

describe-node-dispatchclj

(describe-node-dispatch n)

Dispatch fn for describe-node: the lower-cased simple class name of node n as a keyword (e.g. :source, :sink, :processor, :globalstore, :subtopology).

Dispatch fn for `describe-node`: the lower-cased simple class name of node `n`
as a keyword (e.g. :source, :sink, :processor, :globalstore, :subtopology).
sourceraw docstring

describe-topologyclj

(describe-topology topology streams-config)

Returns a list of the stream graphs in a topology. The passed in topology object must have a describe method, meaning it is one of:

Kafka >= 1.1 : https://kafka.apache.org/21/javadoc/org/apache/kafka/streams/Topology.html Kafka < 1.1 : https://kafka.apache.org/10/javadoc/org/apache/kafka/streams/processor/TopologyBuilder.html#internalTopologyBuilder

Each stream graph takes the form:

{:id <a unique UUID for the stream, deterministic from the encosing topology and its stream name> :type :stream :name <the name that kafka gives this stream> :nodes <a list of all the nodes in the graph> :edges <a list of all the edges in the graph>}

Nodes and edges are represented as:

{:id <a deterministic UUID for the node> :name <the name as assigned by kafka> :type <the type - processor, store, topic &c.>}

{:from <the :name of the node the edge comes from> :from-id <the :id of the node the edge comes from> :to <the :name of the node the edge goes to> :to-id <the :id of the node the edge goes to>}

All identifiers are v5 UUIDs, and are globally unique where objects are distinct and globally equal where objects are the same.

Returns a list of the stream graphs in a topology.
The passed in topology object must have a `describe` method, meaning
it is one of:

Kafka >= 1.1 : https://kafka.apache.org/21/javadoc/org/apache/kafka/streams/Topology.html
Kafka <  1.1 : https://kafka.apache.org/10/javadoc/org/apache/kafka/streams/processor/TopologyBuilder.html#internalTopologyBuilder

Each stream graph takes the form:

{:id    <a unique UUID for the stream, deterministic from the encosing topology and its stream name>
 :type  :stream
 :name  <the name that kafka gives this stream>
 :nodes <a list of all the nodes in the graph>
 :edges <a list of all the edges in the graph>}

Nodes and edges are represented as:

{:id   <a deterministic UUID for the node>
 :name <the name as assigned by kafka>
 :type <the type - processor, store, topic &c.>}

{:from    <the :name of the node the edge comes from>
 :from-id <the :id of the node the edge comes from>
 :to      <the :name of the node the edge goes to>
 :to-id   <the :id of the node the edge goes to>}

All identifiers are v5 UUIDs, and are globally unique where objects
are distinct and globally equal where objects are the same.
sourceraw docstring

gen-idclj

(gen-id applicaton-id n)

Returns a deterministic v5 UUID for graph node/graph n within applicaton-id (topic nodes use a global namespace instead), so the same node in the same application always gets the same id across describe calls and can be merged across applications.

Returns a deterministic v5 UUID for graph node/graph `n` within
`applicaton-id` (topic nodes use a global namespace instead), so the same node
in the same application always gets the same id across describe calls and can
be merged across applications.
sourceraw docstring

good-edgeclj

(good-edge e)

Returns true if edge e is not a self-loop (:from-id differs from :to-id).

Returns true if edge `e` is not a self-loop (`:from-id` differs from `:to-id`).
sourceraw docstring

is-merge?clj

(is-merge? n)

Returns true if node name n is a Kafka Streams merge node ("KSTREAM-MERGE...").

Returns true if node name `n` is a Kafka Streams merge node ("KSTREAM-MERGE...").
sourceraw docstring

parse-descriptionclj

(parse-description applicaton-id d)

Parses a Kafka TopologyDescription d into a sequence of id-assigned, merge-collapsed stream graphs (one per subtopology and per global store) scoped to applicaton-id.

Parses a Kafka `TopologyDescription` `d` into a sequence of id-assigned,
merge-collapsed stream graphs (one per subtopology and per global store) scoped
to `applicaton-id`.
sourceraw docstring

topic?clj

(topic? s)

Returns true if graph node s is a topic node (:type :topic).

Returns true if graph node `s` is a topic node (`:type :topic`).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close