Database Reference
In-Depth Information
data using an import operator and a subscription expression that matches
the export properties—assuming the application is authorized to access the
exported data stream. Using built-in APIs, both export properties and import
subscriptions can be changed dynamically at run time. This means that
applications can be built to evolve in powerful ways over time, depending on
the jobs that are submitted and the processing that is being done. For example,
a sentiment analysis job might subscribe to all streams with the parameter
textForSentimentAnalysis=true . There might be jobs processing
email and blog text that export that parameter. At some time in the future,
if you decide to process instant messaging text for sentiment, you just need
to deploy the job to process the instant messages and export the  textForSe
ntimentAnalysis=true parameter—it will automatically be connected
in an efficient point-to-point way to the sentiment analysis job. Using
export and import is a very powerful way to dynamically stream data
between applications running under the same Streams instance.
MetricsSink
The MetricsSink adapter is a very interesting and useful sink adapter because
it enables you to set up a named meter , which is incremented whenever a
tuple arrives at the sink. You can think of these meters as a gauge that you
can monitor using Streams Studio or other tools. If you've ever driven over
one of those traffic counters (those black rubber hoses that lie across an inter-
section or road), you've got the right idea. Although a traffic counter mea-
sures the flow of traffic through a point of interest, a MetricsSink can be
used to monitor the volume and velocity of data flowing out of your data
stream.
Operators
Operators are at the heart of the Streams analytical engine. They take data
from upstream adapters or other operators, manipulate that data, and create
a new stream and new tuples (possibly pass-through) to send to downstream
operators. In addition to tuples from an input stream, operators have access
to metrics that can be used to change the behavior of the operator, for example,
during periods of high load. In this section, we discuss some of the more
common Streams operators that can be strung together to build a Streams
application.
 
Search WWH ::




Custom Search