Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sonsoleslp committed Oct 4, 2018
1 parent 9abd6fd commit 7c2f0b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ It has two parts:

Download the JAR from the latest release.
In your project directory run:
```
```bash
mvn install:install-file -Dfile=$(PATH_DOWNLOAD)/orion.flink.connector-1.0.jar -DgroupId=org.fiware.cosmos -DartifactId=orion.flink.connector -Dversion=1.0 -Dpackaging=jar
```

Add it to your `pom.xml` file inside the dependencies section
```
```xml
<dependency>
<groupId>org.fiware.cosmos</groupId>
<artifactId>orion.flink.connector</artifactId>
Expand All @@ -26,16 +26,16 @@ Add it to your `pom.xml` file inside the dependencies section
### OrionSource

* Import dependency
```
```scala
import org.fiware.cosmos.orion.flink.connector.{OrionSource}
```
* Add source to Flink Environment. Indicate what port you want to listen to (e.g. 9001)
```
```scala
val env = StreamExecutionEnvironment.getExecutionEnvironment
val eventStream = env.addSource(new OrionSource(9001))
```
* Parse the received data
```
```scala
val processedDataStream = eventStream.
.flatMap(event => event.entities)
// ...processing
Expand All @@ -55,11 +55,11 @@ Add it to your `pom.xml` file inside the dependencies section

### OrionSink
* Import dependency
```
```scala
import org.fiware.cosmos.orion.flink.connector.{OrionSink,OrionSinkObject,ContentType,HTTPMethod}
```
* Add sink to source
```
```scala
val processedDataStream = eventStream.
// ... processing
.map(obj =>
Expand Down
14 changes: 7 additions & 7 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ It has two parts:

Download the JAR from the latest release.
In your project directory run:
```
```bash
mvn install:install-file -Dfile=$(PATH_DOWNLOAD)/orion.flink.connector-1.0.jar -DgroupId=org.fiware.cosmos -DartifactId=orion.flink.connector -Dversion=1.0 -Dpackaging=jar
```

Add it to your `pom.xml` file inside the dependencies section
```
```xml
<dependency>
<groupId>org.fiware.cosmos</groupId>
<artifactId>orion.flink.connector</artifactId>
Expand All @@ -28,17 +28,17 @@ Add it to your `pom.xml` file inside the dependencies section
### OrionSource

* Import dependency
```
```scala
import org.fiware.cosmos.orion.flink.connector.{OrionSource}
```
* Add source to Flink Environment. Indicate what port you want to listen to (e.g. 9001)
```
```scala
val env = StreamExecutionEnvironment.getExecutionEnvironment
val eventStream = env.addSource(new OrionSource(9001))
```
* Parse the received data

```
```scala
val processedDataStream = eventStream.
.flatMap(event => event.entities)
// ...processing
Expand Down Expand Up @@ -69,11 +69,11 @@ The received data is a DataStream of objects of the class **`NgsiEvent`**. This

### OrionSink
* Import dependency
```
```scala
import org.fiware.cosmos.orion.flink.connector.{OrionSink,OrionSinkObject,ContentType,HTTPMethod}
```
* Add sink to source
```
```scala
val processedDataStream = eventStream.
// ... processing
.map(obj =>
Expand Down

0 comments on commit 7c2f0b3

Please sign in to comment.