Configuring input ports
You have the following three choices when you configure
the punctuation mode of input ports: Expecting
, Oblivious
,
and WindowBound
.
An operator input port is punctuation Expecting
when all configurations of the
operator require a punctuated stream to function correctly. One such example is a primitive
operator that uses a punctuation-based window independent of how the operator invocation is
configured at the Streams Processing Language (SPL) level. For punctuation Expecting
input ports, the SPL compiler performs extra
error checks to ensure that the port is connected to a punctuated stream.
The most common configuration for an input port is to be Oblivious
to
punctuation. Developers can use this configuration when the operator
processing logic does not use window punctuation to change its internal
state or to generate output tuples. An example of operators with Oblivious
input
port is the Filter operator from the SPL Standard
Toolkit. The Filter operator function is to drop
data items from the incoming stream that is based on a specified predicate
and independently of window punctuation. The SPL compiler allows both
punctuated and punctuation free streams to connect to Oblivious
input
ports.
Input ports have a WindowBound
configuration when
the port might be configured with the operator window
clause
and with a punctuation eviction policy (punct
). If
the window
clause indicates a punctuation-based window,
the port behaves as Expecting
. If the window
clause
indicates other configurations, the port is considered Oblivious
.
The WindowBound
configuration is especially useful when you
develop primitive operators that can have different window eviction
policies and one of them is the punctuation-based eviction. One such
example is the Aggregate operator from the SPL
Standard Toolkit, which allows count
, delta
, time
,
and punctuation-based (punct
) eviction policies. In this case, the SPL compiler reports an error when Aggregate is invoked
with a punctuation-based window and is connected to a punctuation
free stream.