Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.63 KB

File metadata and controls

41 lines (33 loc) · 1.63 KB

Turbine Heat Processor

A Flink streaming application for processing temperature data from a Pravega Stream. Complements the Turbine Heat Sensor app (turbineheatsensor). The application computes a daily summary of the temperature range observed on that day by each sensor.

Automatically creates a scope (default: examples) and stream (default: turbineHeatTest) as necessary.

Pre-requisites

  1. Pravega running (see here for instructions)
  2. Build pravega-samples repository
  3. Apache Flink running

Execution

Run the sample from the command-line:

$ bin/run-example [--controller <URI>] [--input <scope>/<stream>] [--startTime <long>] [--output <path>]

Alternately, run the sample from the Flink UI.

  • JAR: pravega-flink-examples-<VERSION>-all.jar
  • Main class: io.pravega.turbineheatprocessor.TurbineHeatProcessor or io.pravega.turbineheatprocessor.TurbineHeatProcessorScala

Outputs

The application outputs the daily summary as a comma-separated values (CSV) file, one line per sensor per day. The data is also emitted to stdout (which may be viewed in the Flink UI). For example:

...
SensorAggregate(1065600000,12,Illinois,(60.0,100.0))
SensorAggregate(1065600000,3,Arkansas,(60.0,100.0))
SensorAggregate(1065600000,7,Delaware,(60.0,100.0))
SensorAggregate(1065600000,15,Kansas,(40.0,80.0))
SensorAggregate(1152000000,3,Arkansas,(60.0,100.0))
SensorAggregate(1152000000,12,Illinois,(60.0,100.0))
SensorAggregate(1152000000,15,Kansas,(40.0,80.0))
SensorAggregate(1152000000,7,Delaware,(60.0,100.0))
...