Composite operators and consistent regions
@consistentannotation is applied to a composite operator, the annotation indicates that the composite operator and the reachability graph of the composite operator participate in a single consistent region. All the primitive operators inside the composite operator and their reachability graphs form a single consistent region even if they do not form a connected subgraph.
- An operator that has no input streams, for example, a source operator
- An operator in which all its input stream connections originate from outside of the enclosing annotated composite. Such an operator must be able to replay its output stream. If it is not, include a
ReplayableStartoperator as the start operator. Remember, however, that applications that use a
ReplayableStartoperator cannot be deployed to an instance with fewer than four host resources.
The following figures show several examples on how consistent regions
are computed when the
@consistent annotation is applied
to composite operators.
One composite operator with one consistent region
following figure shows an example of an SPL graph that is annotated
@consistent. In this example, the whole composite,
which is indicated by the box, is annotated with
The figure shows the same pattern on all the operators that are in
the consistent region. All the operators that are inside the composite
belong to the same consistent region. The compiler automatically identified
the start operators of the consistent region, which are indicated
with the label,
start. From the two start operators,
the compiler computes their reachability graph. The compiler identifies
op10 as the end operators of the consistent
region, which are indicated with the label,
All the end operators are sink operators.
Composite operator with disconnected subgraphs
following figure shows an example of a composite operator (shown with
the box) with the
@consistent annotation. In this
example, the composite operator contains two disconnected subgraphs:
the subgraph with
the subgraph with
Because the annotation is applied on the composite operator, both
subgraphs are in the same consistent region.
Multiple composite operators with one consistent region
following figure shows an example where the
is placed on two composite operators. The reachability graph of both
composite operators contains
results in a single consistent region.