Package | Description |
---|---|
org.apache.edgent.analytics.math3.json |
JSON analytics using Apache Commons Math.
|
org.apache.edgent.analytics.sensors |
Analytics focused on handling sensor data.
|
org.apache.edgent.connectors.command |
Command / OS Process connector.
|
org.apache.edgent.connectors.file |
File stream connector.
|
org.apache.edgent.connectors.http |
HTTP stream connector.
|
org.apache.edgent.connectors.iot |
Edgent device connector API to a message hub.
|
org.apache.edgent.connectors.iotp |
IBM Watson IoT Platform stream connector.
|
org.apache.edgent.connectors.jdbc |
JDBC based database stream connector.
|
org.apache.edgent.connectors.kafka |
Apache Kafka enterprise messing hub stream connector.
|
org.apache.edgent.connectors.mqtt |
MQTT (lightweight messaging protocol for small sensors and mobile devices) stream connector.
|
org.apache.edgent.connectors.mqtt.iot |
An MQTT based IotDevice connector.
|
org.apache.edgent.connectors.pubsub |
Publish subscribe model between jobs.
|
org.apache.edgent.connectors.wsclient |
WebSocket Client Connector API for sending and receiving messages to a WebSocket Server.
|
org.apache.edgent.connectors.wsclient.javax.websocket |
WebSocket Client Connector for sending and receiving messages to a WebSocket Server.
|
org.apache.edgent.metrics |
Metric utility methods, oplets, and reporters which allow an
application to expose metric values, for example via JMX.
|
org.apache.edgent.runtime.jobregistry | |
org.apache.edgent.samples.apps |
Support for some more complex Edgent application samples.
|
org.apache.edgent.samples.connectors.elm327 |
OBD-II protocol sample using ELM327.
|
org.apache.edgent.samples.connectors.iotp |
Samples showing device events and commands with IBM Watson IoT Platform.
|
org.apache.edgent.samples.connectors.obd2 | |
org.apache.edgent.samples.console |
Samples showing use of the
Console web application.
|
org.apache.edgent.samples.topology |
Samples showing creating and executing basic topologies .
|
org.apache.edgent.samples.utils.sensor | |
org.apache.edgent.topology |
Functional api to build a streaming topology.
|
org.apache.edgent.topology.plumbing |
Plumbing for a streaming topology.
|
org.apache.edgent.topology.spi | |
org.apache.edgent.topology.spi.graph | |
org.apache.edgent.topology.tester |
Testing for a streaming topology.
|
Modifier and Type | Method and Description |
---|---|
static <K extends com.google.gson.JsonElement> |
JsonAnalytics.aggregate(TWindow<com.google.gson.JsonObject,K> window,
java.lang.String resultPartitionProperty,
java.lang.String valueProperty,
JsonUnivariateAggregate... aggregates)
Aggregate against a single
Numeric variable contained in an JSON object. |
static <K extends com.google.gson.JsonElement> |
JsonAnalytics.aggregate(TWindow<com.google.gson.JsonObject,K> window,
java.lang.String resultPartitionProperty,
java.lang.String resultProperty,
ToDoubleFunction<com.google.gson.JsonObject> valueGetter,
JsonUnivariateAggregate... aggregates)
Aggregate against a single
Numeric variable contained in an JSON object. |
static <K extends com.google.gson.JsonElement> |
JsonAnalytics.mvAggregate(TWindow<com.google.gson.JsonObject,K> window,
java.lang.String resultPartitionKeyProperty,
java.lang.String resultProperty,
java.util.List<org.apache.commons.math3.util.Pair<java.lang.String,JsonUnivariateAggregate[]>> aggregateSpecs)
Aggregate against multiple
Numeric variables contained in an JSON object. |
Modifier and Type | Method and Description |
---|---|
static <T,V> TStream<T> |
Filters.deadband(TStream<T> stream,
Function<T,V> value,
Predicate<V> inBand)
Deadband filter.
|
static <T,V> TStream<T> |
Filters.deadband(TStream<T> stream,
Function<T,V> value,
Predicate<V> inBand,
long maximumSuppression,
java.util.concurrent.TimeUnit unit)
Deadband filter with maximum suppression time.
|
static <T> TStream<T> |
Filters.deadtime(TStream<T> stream,
long deadtimePeriod,
java.util.concurrent.TimeUnit unit)
Deadtime filter.
|
Modifier and Type | Method and Description |
---|---|
static <T,V> TStream<T> |
Filters.deadband(TStream<T> stream,
Function<T,V> value,
Predicate<V> inBand)
Deadband filter.
|
static <T,V> TStream<T> |
Filters.deadband(TStream<T> stream,
Function<T,V> value,
Predicate<V> inBand,
long maximumSuppression,
java.util.concurrent.TimeUnit unit)
Deadband filter with maximum suppression time.
|
static <T> TStream<T> |
Filters.deadtime(TStream<T> stream,
long deadtimePeriod,
java.util.concurrent.TimeUnit unit)
Deadtime filter.
|
Modifier and Type | Method and Description |
---|---|
static TStream<java.lang.String> |
CommandStreams.generate(Topology topology,
java.lang.ProcessBuilder cmd)
Create an endless
TStream<String> from a long running command's output. |
static TStream<java.util.List<java.lang.String>> |
CommandStreams.periodicSource(Topology topology,
java.lang.ProcessBuilder cmd,
long period,
java.util.concurrent.TimeUnit units)
Create a
TStream<String> from a periodically run command's output. |
Modifier and Type | Method and Description |
---|---|
static TSink<java.lang.String> |
CommandStreams.sink(TStream<java.lang.String> stream,
java.lang.ProcessBuilder cmd)
Sink a
TStream<String> to a command's input. |
Modifier and Type | Method and Description |
---|---|
static TStream<java.lang.String> |
FileStreams.directoryWatcher(TopologyElement te,
Supplier<java.lang.String> directory)
Declare a stream containing the absolute pathname of
newly created file names from watching
directory . |
static TStream<java.lang.String> |
FileStreams.directoryWatcher(TopologyElement te,
Supplier<java.lang.String> directory,
java.util.Comparator<java.io.File> comparator)
Declare a stream containing the absolute pathname of
newly created file names from watching
directory . |
static TStream<java.lang.String> |
FileStreams.textFileReader(TStream<java.lang.String> pathnames)
Declare a stream containing the lines read from the files
whose pathnames correspond to each tuple on the
pathnames
stream. |
static TStream<java.lang.String> |
FileStreams.textFileReader(TStream<java.lang.String> pathnames,
Function<java.lang.String,java.lang.String> preFn,
BiFunction<java.lang.String,java.lang.Exception,java.lang.String> postFn)
Declare a stream containing the lines read from the files
whose pathnames correspond to each tuple on the
pathnames
stream. |
Modifier and Type | Method and Description |
---|---|
static TStream<java.lang.String> |
FileStreams.textFileReader(TStream<java.lang.String> pathnames)
Declare a stream containing the lines read from the files
whose pathnames correspond to each tuple on the
pathnames
stream. |
static TStream<java.lang.String> |
FileStreams.textFileReader(TStream<java.lang.String> pathnames,
Function<java.lang.String,java.lang.String> preFn,
BiFunction<java.lang.String,java.lang.Exception,java.lang.String> postFn)
Declare a stream containing the lines read from the files
whose pathnames correspond to each tuple on the
pathnames
stream. |
static TSink<java.lang.String> |
FileStreams.textFileWriter(TStream<java.lang.String> contents,
Supplier<java.lang.String> basePathname)
Write the contents of a stream to files.
|
static TSink<java.lang.String> |
FileStreams.textFileWriter(TStream<java.lang.String> contents,
Supplier<java.lang.String> basePathname,
Supplier<org.apache.edgent.connectors.file.runtime.IFileWriterPolicy<java.lang.String>> policy)
Write the contents of a stream to files subject to the control
of a file writer policy.
|
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
HttpStreams.deleteJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri)
Make an HTTP DELETE request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.getJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri)
Make an HTTP GET request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.postJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri,
UnaryOperator<com.google.gson.JsonObject> body)
Make an HTTP POST request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.putJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri,
UnaryOperator<com.google.gson.JsonObject> body)
Make an HTTP PUT request with JsonObject.
|
static <T,R> TStream<R> |
HttpStreams.requests(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request for each tuple on a stream.
|
static <T,R> TStream<R> |
HttpStreams.requestsWithBody(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
Function<T,org.apache.http.HttpEntity> body,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request with body for each tuple.
|
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
HttpStreams.deleteJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri)
Make an HTTP DELETE request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.getJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri)
Make an HTTP GET request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.postJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri,
UnaryOperator<com.google.gson.JsonObject> body)
Make an HTTP POST request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.putJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri,
UnaryOperator<com.google.gson.JsonObject> body)
Make an HTTP PUT request with JsonObject.
|
static <T,R> TStream<R> |
HttpStreams.requests(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request for each tuple on a stream.
|
static <T,R> TStream<R> |
HttpStreams.requestsWithBody(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
Function<T,org.apache.http.HttpEntity> body,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request with body for each tuple.
|
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
HeartBeat.addHeartBeat(IotDevice iotDevice,
long period,
java.util.concurrent.TimeUnit unit,
java.lang.String eventId)
Add IoT device heart beat processing to a topology.
|
TStream<com.google.gson.JsonObject> |
IotDevice.commands(java.lang.String... commands)
Create a stream of device commands as JSON objects.
|
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
IotDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos)
Publish a stream's tuples as device events.
|
TSink<com.google.gson.JsonObject> |
IotDevice.events(TStream<com.google.gson.JsonObject> stream,
java.lang.String eventId,
int qos)
Publish a stream's tuples as device events.
|
Modifier and Type | Method and Description |
---|---|
TStream<com.google.gson.JsonObject> |
IotpDevice.commands(java.lang.String... commands)
Create a stream of device commands as JSON objects.
|
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
IotpDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos)
Publish a stream's tuples as device events.
|
TSink<com.google.gson.JsonObject> |
IotpDevice.events(TStream<com.google.gson.JsonObject> stream,
java.lang.String eventId,
int qos)
Publish a stream's tuples as device events.
|
Modifier and Type | Method and Description |
---|---|
<T,R> TStream<R> |
JdbcStreams.executeStatement(TStream<T> stream,
StatementSupplier stmtSupplier,
ParameterSetter<T> paramSetter,
ResultsHandler<T,R> resultsHandler)
For each tuple on
stream execute an SQL statement and
add 0 or more resulting tuples to a result stream. |
<T,R> TStream<R> |
JdbcStreams.executeStatement(TStream<T> stream,
Supplier<java.lang.String> stmtSupplier,
ParameterSetter<T> paramSetter,
ResultsHandler<T,R> resultsHandler)
For each tuple on
stream execute an SQL statement and
add 0 or more resulting tuples to a result stream. |
Modifier and Type | Method and Description |
---|---|
<T> TSink<T> |
JdbcStreams.executeStatement(TStream<T> stream,
StatementSupplier stmtSupplier,
ParameterSetter<T> paramSetter)
For each tuple on
stream execute an SQL statement. |
<T,R> TStream<R> |
JdbcStreams.executeStatement(TStream<T> stream,
StatementSupplier stmtSupplier,
ParameterSetter<T> paramSetter,
ResultsHandler<T,R> resultsHandler)
For each tuple on
stream execute an SQL statement and
add 0 or more resulting tuples to a result stream. |
<T> TSink<T> |
JdbcStreams.executeStatement(TStream<T> stream,
Supplier<java.lang.String> stmtSupplier,
ParameterSetter<T> paramSetter)
For each tuple on
stream execute an SQL statement. |
<T,R> TStream<R> |
JdbcStreams.executeStatement(TStream<T> stream,
Supplier<java.lang.String> stmtSupplier,
ParameterSetter<T> paramSetter,
ResultsHandler<T,R> resultsHandler)
For each tuple on
stream execute an SQL statement and
add 0 or more resulting tuples to a result stream. |
Modifier and Type | Method and Description |
---|---|
<T> TStream<T> |
KafkaConsumer.subscribe(Function<KafkaConsumer.StringConsumerRecord,T> toTupleFn,
java.lang.String... topics)
Subscribe to the specified topics and yield a stream of tuples
from the published Kafka records.
|
<T> TStream<T> |
KafkaConsumer.subscribeBytes(Function<KafkaConsumer.ByteConsumerRecord,T> toTupleFn,
java.lang.String... topics)
Subscribe to the specified topics and yield a stream of tuples
from the published Kafka records.
|
Modifier and Type | Method and Description |
---|---|
TSink<java.lang.String> |
KafkaProducer.publish(TStream<java.lang.String> stream,
java.lang.String topic)
Publish the stream of tuples as Kafka key/value records
to the specified partitions of the specified topics.
|
<T> TSink<T> |
KafkaProducer.publish(TStream<T> stream,
Function<T,java.lang.String> keyFn,
Function<T,java.lang.String> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified partitions of the specified topics.
|
<T> TSink<T> |
KafkaProducer.publishBytes(TStream<T> stream,
Function<T,byte[]> keyFn,
Function<T,byte[]> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified topic partitions.
|
Modifier and Type | Method and Description |
---|---|
<T> TStream<java.lang.String> |
MqttStreams.subscribe(java.lang.String topicFilter,
int qos)
Subscribe to the MQTT topic(s) and create a
TStream<String> . |
<T> TStream<T> |
MqttStreams.subscribe(java.lang.String topicFilter,
int qos,
BiFunction<java.lang.String,byte[],T> message2Tuple)
Subscribe to the MQTT topic(s) and create a stream of tuples of type
T . |
Modifier and Type | Method and Description |
---|---|
TSink<java.lang.String> |
MqttStreams.publish(TStream<java.lang.String> stream,
java.lang.String topic,
int qos,
boolean retain)
Publish a
TStream<String> stream's tuples as MQTT messages. |
<T> TSink<T> |
MqttStreams.publish(TStream<T> stream,
Function<T,java.lang.String> topic,
Function<T,byte[]> payload,
Function<T,java.lang.Integer> qos,
Function<T,java.lang.Boolean> retain)
Publish a stream's tuples as MQTT messages.
|
Modifier and Type | Method and Description |
---|---|
TStream<com.google.gson.JsonObject> |
MqttDevice.commands(java.lang.String... commands) |
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
MqttDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos) |
TSink<com.google.gson.JsonObject> |
MqttDevice.events(TStream<com.google.gson.JsonObject> stream,
java.lang.String eventId,
int qos) |
Modifier and Type | Method and Description |
---|---|
static <T> TStream<T> |
PublishSubscribe.subscribe(TopologyElement te,
java.lang.String topic,
java.lang.Class<T> streamType)
Subscribe to a published topic.
|
Modifier and Type | Method and Description |
---|---|
static <T> TSink<T> |
PublishSubscribe.publish(TStream<T> stream,
java.lang.String topic,
java.lang.Class<? super T> streamType)
Publish this stream to a topic.
|
Modifier and Type | Method and Description |
---|---|
TStream<com.google.gson.JsonObject> |
WebSocketClient.receive()
Create a stream of JsonObject tuples from received JSON WebSocket text messages.
|
TStream<byte[]> |
WebSocketClient.receiveBytes()
Create a stream of byte[] tuples from received WebSocket binary messages.
|
TStream<java.lang.String> |
WebSocketClient.receiveString()
Create a stream of String tuples from received WebSocket text messages.
|
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
WebSocketClient.send(TStream<com.google.gson.JsonObject> stream)
Send a stream's JsonObject tuples as JSON in a WebSocket text message.
|
TSink<byte[]> |
WebSocketClient.sendBytes(TStream<byte[]> stream)
Send a stream's byte[] tuples in a WebSocket binary message.
|
TSink<java.lang.String> |
WebSocketClient.sendString(TStream<java.lang.String> stream)
Send a stream's String tuples in a WebSocket text message.
|
Modifier and Type | Method and Description |
---|---|
TStream<com.google.gson.JsonObject> |
Jsr356WebSocketClient.receive()
Create a stream of JsonObject tuples from received JSON WebSocket text messages.
|
TStream<byte[]> |
Jsr356WebSocketClient.receiveBytes()
Create a stream of byte[] tuples from received WebSocket binary messages.
|
TStream<java.lang.String> |
Jsr356WebSocketClient.receiveString()
Create a stream of String tuples from received WebSocket text messages.
|
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
Jsr356WebSocketClient.send(TStream<com.google.gson.JsonObject> stream)
Send a stream's JsonObject tuples as JSON in a WebSocket text message.
|
TSink<byte[]> |
Jsr356WebSocketClient.sendBytes(TStream<byte[]> stream)
Send a stream's byte[] tuples in a WebSocket binary message.
|
TSink<java.lang.String> |
Jsr356WebSocketClient.sendString(TStream<java.lang.String> stream)
Send a stream's String tuples in a WebSocket text message.
|
Modifier and Type | Method and Description |
---|---|
static <T> TStream<T> |
Metrics.counter(TStream<T> stream)
Increment a counter metric when peeking at each tuple.
|
static <T> TStream<T> |
Metrics.rateMeter(TStream<T> stream)
Measure current tuple throughput and calculate one-, five-, and
fifteen-minute exponentially-weighted moving averages.
|
Modifier and Type | Method and Description |
---|---|
static <T> TStream<T> |
Metrics.counter(TStream<T> stream)
Increment a counter metric when peeking at each tuple.
|
static <T> TStream<T> |
Metrics.rateMeter(TStream<T> stream)
Measure current tuple throughput and calculate one-, five-, and
fifteen-minute exponentially-weighted moving averages.
|
Modifier and Type | Method and Description |
---|---|
static <T> TStream<T> |
JobEvents.source(Topology topology,
BiFunction<JobRegistryService.EventType,Job,T> wrapper)
Declares a stream populated by
JobRegistryService events. |
Modifier and Type | Method and Description |
---|---|
<T> TStream<T> |
ApplicationUtilities.logStream(TStream<T> stream,
java.lang.String eventTag,
java.lang.String baseName)
Log every tuple on the stream using the
FileStreams connector. |
<T> TStream<T> |
ApplicationUtilities.traceStream(TStream<T> stream,
java.lang.String sensorId,
Supplier<java.lang.String> label)
Trace a stream to System.out if the sensor id's "label" has been configured
to enable tracing.
|
<T> TStream<T> |
ApplicationUtilities.traceStream(TStream<T> stream,
Supplier<java.lang.String> label)
Trace a stream to System.out if the "label" has been configured
to enable tracing.
|
static <T> TStream<com.google.gson.JsonObject> |
JsonTuples.wrap(TStream<org.apache.commons.math3.util.Pair<java.lang.Long,T>> stream,
java.lang.String id)
Create a stream of JsonObject wrapping a stream of
raw
Pair<Long msec,T reading>> samples. |
Modifier and Type | Method and Description |
---|---|
<T> TStream<T> |
ApplicationUtilities.logStream(TStream<T> stream,
java.lang.String eventTag,
java.lang.String baseName)
Log every tuple on the stream using the
FileStreams connector. |
<T> TStream<T> |
ApplicationUtilities.traceStream(TStream<T> stream,
java.lang.String sensorId,
Supplier<java.lang.String> label)
Trace a stream to System.out if the sensor id's "label" has been configured
to enable tracing.
|
<T> TStream<T> |
ApplicationUtilities.traceStream(TStream<T> stream,
Supplier<java.lang.String> label)
Trace a stream to System.out if the "label" has been configured
to enable tracing.
|
static <T> TStream<com.google.gson.JsonObject> |
JsonTuples.wrap(TStream<org.apache.commons.math3.util.Pair<java.lang.Long,T>> stream,
java.lang.String id)
Create a stream of JsonObject wrapping a stream of
raw
Pair<Long msec,T reading>> samples. |
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonArray> |
Elm327Streams.poll(SerialDevice device,
long period,
java.util.concurrent.TimeUnit unit,
Cmd... cmds)
Periodically execute a number of ELM327 commands.
|
Modifier and Type | Method and Description |
---|---|
static TStream<java.lang.String> |
IotpSensors.displayMessages(IotDevice device,
boolean print)
Subscribe to IoTP device commands with identifier
display . |
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
Obd2Streams.increasingTemps(SerialDevice device)
Get a stream of temperature readings which
are increasing over the last minute.
|
static TStream<com.google.gson.JsonObject> |
Obd2Streams.tach(SerialDevice device)
Get a stream containing vehicle speed (km/h)
and engine revs (rpm).
|
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
ConsoleWaterDetector.alertFilter(TStream<com.google.gson.JsonObject> readingsDetector,
int wellId,
boolean simulateNormal)
Look through the stream and check to see if any of the measurements cause concern.
|
static TStream<com.google.gson.JsonObject> |
ConsoleWaterDetector.waterDetector(Topology topology,
int wellId)
Creates a TStream<JsonObject> for each sensor reading for each well.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<TStream<com.google.gson.JsonObject>> |
ConsoleWaterDetector.splitAlert(TStream<com.google.gson.JsonObject> alertStream,
int wellId)
Splits the incoming TStream<JsonObject> into individual TStreams based on the sensor type
|
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
ConsoleWaterDetector.alertFilter(TStream<com.google.gson.JsonObject> readingsDetector,
int wellId,
boolean simulateNormal)
Look through the stream and check to see if any of the measurements cause concern.
|
static java.util.List<TStream<com.google.gson.JsonObject>> |
ConsoleWaterDetector.splitAlert(TStream<com.google.gson.JsonObject> alertStream,
int wellId)
Splits the incoming TStream<JsonObject> into individual TStreams based on the sensor type
|
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
SensorsAggregates.sensorsAB(Topology topology)
Create a stream containing two aggregates from two bursty
sensors A and B that only produces output when the sensors
(independently) are having a burst period out of their normal range.
|
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
SimulatedSensors.burstySensor(Topology topology,
java.lang.String name)
Create a stream of simulated bursty sensor readings.
|
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,java.lang.Boolean>> |
PeriodicRandomSensor.newBoolean(Topology t,
long periodMsec)
Create a periodic sensor stream with readings from
Random.nextBoolean() . |
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,byte[]>> |
PeriodicRandomSensor.newBytes(Topology t,
long periodMsec,
int nBytes)
Create a periodic sensor stream with readings from
Random.nextBytes(byte[]) . |
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,java.lang.Double>> |
PeriodicRandomSensor.newDouble(Topology t,
long periodMsec)
Create a periodic sensor stream with readings from
Random.nextDouble() . |
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,java.lang.Float>> |
PeriodicRandomSensor.newFloat(Topology t,
long periodMsec)
Create a periodic sensor stream with readings from
Random.nextFloat() . |
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,java.lang.Double>> |
PeriodicRandomSensor.newGaussian(Topology t,
long periodMsec)
Create a periodic sensor stream with readings from
Random.nextGaussian() . |
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,java.lang.Integer>> |
PeriodicRandomSensor.newInteger(Topology t,
long periodMsec)
Create a periodic sensor stream with readings from
Random.nextInt() . |
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,java.lang.Integer>> |
PeriodicRandomSensor.newInteger(Topology t,
long periodMsec,
int bound)
Create a periodic sensor stream with readings from
Random.nextInt(int) . |
TStream<org.apache.commons.math3.util.Pair<java.lang.Long,java.lang.Long>> |
PeriodicRandomSensor.newLong(Topology t,
long periodMsec)
Create a periodic sensor stream with readings from
Random.nextLong() . |
Modifier and Type | Method and Description |
---|---|
<U> TStream<U> |
TWindow.aggregate(BiFunction<java.util.List<T>,K,U> aggregator)
Declares a stream that is a continuous, sliding, aggregation of
partitions in this window.
|
TStream<T> |
TStream.alias(java.lang.String alias)
Set an alias for the stream.
|
TStream<java.lang.String> |
TStream.asString()
Convert this stream to a stream of
String tuples by calling
toString() on each tuple. |
<U> TStream<U> |
TWindow.batch(BiFunction<java.util.List<T>,K,U> batcher)
Declares a stream that represents a batched aggregation of
partitions in this window.
|
<T> TStream<T> |
Topology.collection(java.util.Collection<T> tuples)
Declare a stream of constants from a collection.
|
<T> TStream<T> |
Topology.events(Consumer<Consumer<T>> eventSetup)
Declare a stream populated by an event system.
|
<U> TStream<U> |
TStream.fanin(FanIn<T,U> fanin,
java.util.List<TStream<T>> others)
Declare a stream that contains the output of the specified
FanIn oplet applied to this stream and others . |
TStream<T> |
TWindow.feeder()
Get the stream that feeds this window.
|
TStream<T> |
TStream.filter(Predicate<T> predicate)
Declare a new stream that filters tuples from this stream.
|
<U> TStream<U> |
TStream.flatMap(Function<T,java.lang.Iterable<U>> mapper)
Declare a new stream that maps tuples from this stream into one or
more (or zero) tuples of a different type
U . |
<T> TStream<T> |
Topology.generate(Supplier<T> data)
Declare an endless source stream.
|
TStream<T> |
TSink.getFeed()
Get the stream feeding this sink.
|
<J,U,K> TStream<J> |
TStream.join(Function<T,K> keyer,
TWindow<U,K> window,
BiFunction<T,java.util.List<U>,J> joiner)
Join this stream with a partitioned window of type
U with key type K . |
<J,U,K> TStream<J> |
TStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner)
Join this stream with the last tuple seen on a stream of type
U
with partitioning. |
<U> TStream<U> |
TStream.map(Function<T,U> mapper)
Declare a new stream that maps (or transforms) each tuple from this stream into one
(or zero) tuple of a different type
U . |
TStream<T> |
TStream.modify(UnaryOperator<T> modifier)
Declare a new stream that modifies each tuple from this stream into one
(or zero) tuple of the same type
T . |
<T> TStream<T> |
Topology.of(T... values)
Declare a stream of objects.
|
TStream<T> |
TStream.peek(Consumer<T> peeker)
Declare a stream that contains the same contents as this stream while
peeking at each element using
peeker . |
<U> TStream<U> |
TStream.pipe(Pipe<T,U> pipe)
Declare a stream that contains the output of the specified
Pipe
oplet applied to this stream. |
<T> TStream<T> |
Topology.poll(Supplier<T> data,
long period,
java.util.concurrent.TimeUnit unit)
Declare a new source stream that calls
data.get() periodically. |
<T> TStream<T> |
Topology.source(Supplier<java.lang.Iterable<T>> data)
Declare a new source stream that iterates over the return of
Iterable<T> get() from data . |
TStream<java.lang.String> |
Topology.strings(java.lang.String... strings)
Declare a stream of strings.
|
TStream<T> |
TStream.tag(java.lang.String... values)
Adds the specified tags to the stream.
|
TStream<T> |
TStream.union(java.util.Set<TStream<T>> others)
Declare a stream that will contain all tuples from this stream and all the
streams in
others . |
TStream<T> |
TStream.union(TStream<T> other)
Declare a stream that will contain all tuples from this stream and
other . |
Modifier and Type | Method and Description |
---|---|
<E extends java.lang.Enum<E>> |
TStream.split(java.lang.Class<E> enumClass,
Function<T,E> splitter)
Split a stream's tuples among
enumClass.size streams as specified by
splitter . |
java.util.List<TStream<T>> |
TStream.split(int n,
ToIntFunction<T> splitter)
Split a stream's tuples among
n streams as specified by
splitter . |
Modifier and Type | Method and Description |
---|---|
<J,U,K> TStream<J> |
TStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner)
Join this stream with the last tuple seen on a stream of type
U
with partitioning. |
TStream<T> |
TStream.union(TStream<T> other)
Declare a stream that will contain all tuples from this stream and
other . |
Modifier and Type | Method and Description |
---|---|
<U> TStream<U> |
TStream.fanin(FanIn<T,U> fanin,
java.util.List<TStream<T>> others)
Declare a stream that contains the output of the specified
FanIn oplet applied to this stream and others . |
TStream<T> |
TStream.union(java.util.Set<TStream<T>> others)
Declare a stream that will contain all tuples from this stream and all the
streams in
others . |
Modifier and Type | Method and Description |
---|---|
static <T> TStream<java.util.List<T>> |
PlumbingStreams.barrier(java.util.List<TStream<T>> streams)
A tuple synchronization barrier.
|
static <T> TStream<java.util.List<T>> |
PlumbingStreams.barrier(java.util.List<TStream<T>> streams,
int queueCapacity)
A tuple synchronization barrier.
|
static <T> TStream<T> |
PlumbingStreams.blockingDelay(TStream<T> stream,
long delay,
java.util.concurrent.TimeUnit unit)
Insert a blocking delay between tuples.
|
static <T> TStream<T> |
PlumbingStreams.blockingOneShotDelay(TStream<T> stream,
long delay,
java.util.concurrent.TimeUnit unit)
Insert a blocking delay before forwarding the first tuple and
no delay for subsequent tuples.
|
static <T> TStream<T> |
PlumbingStreams.blockingThrottle(TStream<T> stream,
long delay,
java.util.concurrent.TimeUnit unit)
Maintain a constant blocking delay between tuples.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrent(TStream<T> stream,
java.util.List<Function<TStream<T>,TStream<U>>> pipelines,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrentMap(TStream<T> stream,
java.util.List<Function<T,U>> mappers,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T> TStream<T> |
PlumbingStreams.gate(TStream<T> stream,
java.util.concurrent.Semaphore semaphore)
Control the flow of tuples to an output stream.
|
static <T> TStream<T> |
PlumbingStreams.isolate(TStream<T> stream,
boolean ordered)
Isolate upstream processing from downstream processing.
|
static <T> TStream<T> |
PlumbingStreams.isolate(TStream<T> stream,
int queueCapacity)
Isolate upstream processing from downstream processing.
|
static <T,R> TStream<R> |
PlumbingStreams.parallel(TStream<T> stream,
int width,
ToIntFunction<T> splitter,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
static <T,R> TStream<R> |
PlumbingStreams.parallelBalanced(TStream<T> stream,
int width,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
static <T,U> TStream<U> |
PlumbingStreams.parallelMap(TStream<T> stream,
int width,
ToIntFunction<T> splitter,
BiFunction<T,java.lang.Integer,U> mapper)
Perform an analytic function on tuples in parallel.
|
static <T,K> TStream<T> |
PlumbingStreams.pressureReliever(TStream<T> stream,
Function<T,K> keyFunction,
int count)
Relieve pressure on upstream processing by discarding tuples.
|
Modifier and Type | Method and Description |
---|---|
static <T> TStream<T> |
PlumbingStreams.blockingDelay(TStream<T> stream,
long delay,
java.util.concurrent.TimeUnit unit)
Insert a blocking delay between tuples.
|
static <T> TStream<T> |
PlumbingStreams.blockingOneShotDelay(TStream<T> stream,
long delay,
java.util.concurrent.TimeUnit unit)
Insert a blocking delay before forwarding the first tuple and
no delay for subsequent tuples.
|
static <T> TStream<T> |
PlumbingStreams.blockingThrottle(TStream<T> stream,
long delay,
java.util.concurrent.TimeUnit unit)
Maintain a constant blocking delay between tuples.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrent(TStream<T> stream,
java.util.List<Function<TStream<T>,TStream<U>>> pipelines,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrentMap(TStream<T> stream,
java.util.List<Function<T,U>> mappers,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T> TStream<T> |
PlumbingStreams.gate(TStream<T> stream,
java.util.concurrent.Semaphore semaphore)
Control the flow of tuples to an output stream.
|
static <T> TStream<T> |
PlumbingStreams.isolate(TStream<T> stream,
boolean ordered)
Isolate upstream processing from downstream processing.
|
static <T> TStream<T> |
PlumbingStreams.isolate(TStream<T> stream,
int queueCapacity)
Isolate upstream processing from downstream processing.
|
static <T,R> TStream<R> |
PlumbingStreams.parallel(TStream<T> stream,
int width,
ToIntFunction<T> splitter,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
static <T,R> TStream<R> |
PlumbingStreams.parallelBalanced(TStream<T> stream,
int width,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
static <T,U> TStream<U> |
PlumbingStreams.parallelMap(TStream<T> stream,
int width,
ToIntFunction<T> splitter,
BiFunction<T,java.lang.Integer,U> mapper)
Perform an analytic function on tuples in parallel.
|
static <T,K> TStream<T> |
PlumbingStreams.pressureReliever(TStream<T> stream,
Function<T,K> keyFunction,
int count)
Relieve pressure on upstream processing by discarding tuples.
|
Modifier and Type | Method and Description |
---|---|
static <T> TStream<java.util.List<T>> |
PlumbingStreams.barrier(java.util.List<TStream<T>> streams)
A tuple synchronization barrier.
|
static <T> TStream<java.util.List<T>> |
PlumbingStreams.barrier(java.util.List<TStream<T>> streams,
int queueCapacity)
A tuple synchronization barrier.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrent(TStream<T> stream,
java.util.List<Function<TStream<T>,TStream<U>>> pipelines,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrent(TStream<T> stream,
java.util.List<Function<TStream<T>,TStream<U>>> pipelines,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T,R> TStream<R> |
PlumbingStreams.parallel(TStream<T> stream,
int width,
ToIntFunction<T> splitter,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
static <T,R> TStream<R> |
PlumbingStreams.parallel(TStream<T> stream,
int width,
ToIntFunction<T> splitter,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
static <T,R> TStream<R> |
PlumbingStreams.parallelBalanced(TStream<T> stream,
int width,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
static <T,R> TStream<R> |
PlumbingStreams.parallelBalanced(TStream<T> stream,
int width,
BiFunction<TStream<T>,java.lang.Integer,TStream<R>> pipeline)
Perform an analytic pipeline on tuples in parallel.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractTStream<G extends Topology,T>
Abstract stream that uses the functional primitives to implement most
methods.
|
Modifier and Type | Method and Description |
---|---|
TStream<java.lang.String> |
AbstractTStream.asString()
Convert this stream to a stream of
String tuples by calling
toString() on each tuple. |
<T> TStream<T> |
AbstractTopology.collection(java.util.Collection<T> tuples) |
<T> TStream<T> |
AbstractTopology.generate(Supplier<T> data) |
TStream<T> |
AbstractTStream.modify(UnaryOperator<T> modifier)
Declare a new stream that modifies each tuple from this stream into one
(or zero) tuple of the same type
T . |
<T> TStream<T> |
AbstractTopology.of(T... values) |
TStream<java.lang.String> |
AbstractTopology.strings(java.lang.String... tuples) |
TStream<T> |
AbstractTStream.union(TStream<T> other)
Declare a stream that will contain all tuples from this stream and
other . |
Modifier and Type | Method and Description |
---|---|
TStream<T> |
AbstractTStream.union(TStream<T> other)
Declare a stream that will contain all tuples from this stream and
other . |
protected void |
AbstractTStream.verify(TStream<T> other) |
Modifier and Type | Class and Description |
---|---|
class |
ConnectorStream<G extends Topology,T>
A stream that directly adds oplets to the graph.
|
Modifier and Type | Method and Description |
---|---|
<U> TStream<U> |
TWindowImpl.aggregate(BiFunction<java.util.List<T>,K,U> processor) |
<U> TStream<U> |
TWindowTimeImpl.aggregate(BiFunction<java.util.List<T>,K,U> processor)
Window behaviour here is that:
Tuples are always inserted into the partition.
|
TStream<T> |
ConnectorStream.alias(java.lang.String alias) |
<U> TStream<U> |
TWindowImpl.batch(BiFunction<java.util.List<T>,K,U> batcher) |
<U> TStream<U> |
TWindowTimeImpl.batch(BiFunction<java.util.List<T>,K,U> batcher) |
protected <N extends Pipe<T,U>,U> |
ConnectorStream.connectPipe(N pipeOp) |
<T> TStream<T> |
GraphTopology.events(Consumer<Consumer<T>> eventSetup) |
<U> TStream<U> |
ConnectorStream.fanin(FanIn<T,U> fanin,
java.util.List<TStream<T>> others) |
TStream<T> |
AbstractTWindow.feeder() |
TStream<T> |
ConnectorStream.filter(Predicate<T> predicate) |
<U> TStream<U> |
ConnectorStream.flatMap(Function<T,java.lang.Iterable<U>> mapper) |
<J,U,K> TStream<J> |
ConnectorStream.join(Function<T,K> keyer,
TWindow<U,K> twindow,
BiFunction<T,java.util.List<U>,J> joiner) |
<J,U,K> TStream<J> |
ConnectorStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner) |
<U> TStream<U> |
ConnectorStream.map(Function<T,U> mapper) |
TStream<T> |
ConnectorStream.peek(Consumer<T> peeker) |
<U> TStream<U> |
ConnectorStream.pipe(Pipe<T,U> pipe) |
<T> TStream<T> |
GraphTopology.poll(Supplier<T> data,
long period,
java.util.concurrent.TimeUnit unit) |
<T> TStream<T> |
GraphTopology.source(Supplier<java.lang.Iterable<T>> data) |
protected <N extends Source<T>,T> |
GraphTopology.sourceStream(N sourceOp) |
TStream<T> |
ConnectorStream.tag(java.lang.String... values) |
TStream<T> |
ConnectorStream.union(java.util.Set<TStream<T>> others) |
Modifier and Type | Method and Description |
---|---|
<E extends java.lang.Enum<E>> |
ConnectorStream.split(java.lang.Class<E> enumClass,
Function<T,E> splitter) |
java.util.List<TStream<T>> |
ConnectorStream.split(int n,
ToIntFunction<T> splitter) |
Modifier and Type | Method and Description |
---|---|
<J,U,K> TStream<J> |
ConnectorStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner) |
Modifier and Type | Method and Description |
---|---|
<U> TStream<U> |
ConnectorStream.fanin(FanIn<T,U> fanin,
java.util.List<TStream<T>> others) |
TStream<T> |
ConnectorStream.union(java.util.Set<TStream<T>> others) |
Modifier and Type | Method and Description |
---|---|
Condition<java.lang.Long> |
Tester.atLeastTupleCount(TStream<?> stream,
long expectedCount)
Return a condition that evaluates if
stream has submitted at
least expectedCount number of tuples. |
<T> Condition<java.util.List<T>> |
Tester.contentsUnordered(TStream<T> stream,
T... values)
Return a condition that evaluates if
stream has submitted
tuples matching values in any order. |
<T> Condition<java.util.List<T>> |
Tester.streamContents(TStream<T> stream,
T... values)
Return a condition that evaluates if
stream has submitted
tuples matching values in the same order. |
Condition<java.lang.Long> |
Tester.tupleCount(TStream<?> stream,
long expectedCount)
Return a condition that evaluates if
stream has submitted exactly
expectedCount number of tuples. |
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641