Database Reference
In-Depth Information
Beacon
The beacon is a useful operator because it's used to create tuples on the fly.
For example, you can set up a beacon to send tuples into a stream at various
intervals that are defined either by a time period (send a tuple every n tenths
of a second) or iteration (send out n tuples and then stop). The beacon
operator can be useful for testing and debugging your Streams applications.
Throttle and Delay
Two other useful operators can help you to manipulate the timing and flow
of a given stream: throttle and delay . The throttle operator helps you
to set the “pace” of the data flowing through a stream. For example, tuples
that are arriving sporadically can be sent to the output of the throttle
operator at a specified rate (defined by tuples per second). Similarly, the
delay operator can be used to change the timing of the stream. A delay
operator can be set up to output tuples after a specific time interval; however,
with delay , the tuples exit the operator with the same time interval that
existed between the tuples when they arrived. That is, if tuple A arrives 10
seconds before tuple B, which arrives three seconds before tuple C, the
delay operator maintains this timing between tuples on exit, after the tuples
have been delayed by the specified amount of time.
Split and Union
The split operator takes one input stream and, as the name suggests, splits
that stream into multiple output streams. This operator takes a parameter-
ized list of values for a given attribute in the tuple and matches the tuple's
attribute with this list to determine on which output stream the tuple will be
sent. The union operator acts in reverse: it takes multiple input streams and
combines all of the tuples that are found in those input streams into one out-
put stream.
Streams Toolkits
In addition to the adapters and operators that are described in the previous
sections, Streams ships with a number of toolkits that enable even faster
application development. These toolkits enable you to connect to specific
data sources and manipulate the data that is commonly found in databases or
Hadoop; perform signal processing on time series data; extract information
 
Search WWH ::




Custom Search