Skip to content

Commit

Permalink
RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
sonsoleslp committed Nov 29, 2018
1 parent ae0c002 commit 8b89dc3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 62 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@

This repository contains a few examples for getting started with the [**fiware-cosmos-orion-flink-connector**](https://github.com/ging/fiware-cosmos-orion-flink-connector/):


## Content

- [Setup](#what-is-cosmos)
- [Example 1: Receiving simulated notifications](#example-1:-receiving simulated notifications)
- [Example 2: Complete Orion Scenario with docker-compose](#example-2:-complete-Orion-Scenario-with-docker-compose)
- [Example 3: Packaging the code and submitting it to the Flink Job Manager](#example-3:-Packaging-the-code-and-submitting-it-to-the-flink-job-manager)
- [Example 4: Other operations](#example-4:-other-operations)
- [Example 5: Structured values for attributes](#example-5:-structured-values-for-attributes)

---


## Setup

In order to run the examples, first you need to clone the repository:
Expand All @@ -23,7 +36,7 @@ mvn install:install-file -Dfile=$(PATH_DOWNLOAD)/orion.flink.connector-1.0.jar -

where `PATH_DOWNLOAD` is the path where you downloaded the JAR.

## Example 1 : Receiving simulated notifications
## Example 1: Receiving simulated notifications

The first example makes use of the `OrionSource` in order to receive notifications from the Orion Context Broker. For simplicity, in this example the notifications are simulated with a curl command.
Specifically, the example receives a notification every second that a node changed its temperature, and calculates the minimum temperature in a given interval.
Expand Down Expand Up @@ -156,7 +169,7 @@ processedDataStream.print().setParallelism(1)
Or you can persist them using the sink of your choice.


## Example 2 : Complete Orion Scenario with docker-compose
## Example 2: Complete Orion Scenario with docker-compose

The second example does the same processing as the previous one but it writes the processed data back in the Context Broker.

Expand Down
68 changes: 8 additions & 60 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,20 @@
<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-scala_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
<artifactId>flink-scala_2.11</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
<artifactId>flink-streaming-scala_2.11</artifactId>
<version>1.5.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
<version>2.11.12</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand All @@ -169,71 +169,19 @@
<groupId>org.apache.flink</groupId>
<artifactId>flink-scala_2.11</artifactId>
<version>1.5.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>flink-core</artifactId>
<groupId>org.apache.flink</groupId>
</exclusion>
<exclusion>
<artifactId>flink-java</artifactId>
<groupId>org.apache.flink</groupId>
</exclusion>
<exclusion>
<artifactId>flink-shaded-asm</artifactId>
<groupId>org.apache.flink</groupId>
</exclusion>
<exclusion>
<artifactId>scala-reflect</artifactId>
<groupId>org.scala-lang</groupId>
</exclusion>
<exclusion>
<artifactId>scala-compiler</artifactId>
<groupId>org.scala-lang</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>force-shading</artifactId>
<groupId>org.apache.flink</groupId>
</exclusion>
</exclusions>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala_2.11</artifactId>
<version>1.5.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>flink-streaming-java_2.11</artifactId>
<groupId>org.apache.flink</groupId>
</exclusion>
<exclusion>
<artifactId>scala-reflect</artifactId>
<groupId>org.scala-lang</groupId>
</exclusion>
<exclusion>
<artifactId>scala-compiler</artifactId>
<groupId>org.scala-lang</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>force-shading</artifactId>
<groupId>org.apache.flink</groupId>
</exclusion>
</exclusions>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.12</version>
<scope>provided</scope>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down

0 comments on commit 8b89dc3

Please sign in to comment.