IBM Streams 4.2.1

SPL File ReplayableStart.spl

Content

Operators
  • ReplayableStart: The ReplayableStart operator forwards tuples and punctuations from its input port to its output port.

Composites

composite ReplayableStart(output OUT; input IN)

The ReplayableStart operator forwards tuples and punctuations from its input port to its output port.

Behavior in a consistent region

Use the ReplayableStart operator in a consistent region only. This operator is a bridge between the output of an autonomous region and a consistent region. It ensures that tuples that come from the autonomous region can be replayed into the consistent region when a reset occurs.

The ReplayableStart operator can be used as a start operator of periodic and operator-driven consistent regions. In an operator-driven region, it initiates a drain after it forwards each window punctuation. If no window punctuations are received, the region is never made consistent and any resets revert to the beginning of the stream.

The ReplayableStart operator is a composite operator that consists of three components: a Marker, three Buffers, and a Selector. These components are all on different host resources. An application that uses a ReplayableStart operator cannot be deployed to an instance with fewer than four host resources. If there are fewer than four host resources, the application fails at submission.

Each Buffer operator keeps an in-memory copy of all input tuples and punctuation. It associates them, in the order that they are received, with the consistent region sequence ID in which they were received. The extra copies of the Buffer operator enable tuple replay. Up to two of them can fail without loss of data.

The Marker operator ensures that the same set of tuples are associated to a specific sequence ID in all three buffers. It is the start of the consistent region.

The Selector operator forwards tuples from one of the Buffer operators to its output port. The Selector operator always selects tuples from one of the Buffer operators that either processed a drain since the most recent time it was restarted or was never restarted. All other received tuples are ignored.

If data is fed into the ReplayableStart operator faster than it can be played into the operators downstream from it, or if the amount of data in each sequence is large, the Buffer operators might run out of memory.

Parameters

The ReplayableStart operator does not have any parameters.

Windowing

The ReplayableStart operator does not accept any window configurations.

Metrics

This operator does not report any metrics.

Examples

 composite Main
 {
   graph
    () as JCP = JobControlPlane() {}

    (stream<int32 a, rstring b, list<boolean> c> Source_out0) as Source = Custom () {}

    @consistent(trigger = operatorDriven)
    (stream<SourceFoo_out()> RSO_out0) as RSO = ReplayableStart(Source_out0) {}

    () as Sink = Custom(RSO_out0) {}
 }                                                             

Input Ports

  • IN: The ReplayableStart operator is configurable with a single input port, which is a stream from an autonomous region. The input port is non-mutating and its punctuation mode is Oblivious.

Output Ports

  • OUT: The ReplayableStart operator is configurable with a single output port, which is a stream into a consistent region. The output port is mandatory, non-mutating, and its punctuation mode is Preserving. The schema of the output port must match that of the input port.