Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
[BAHIR-147] update with last extensions
Browse files Browse the repository at this point in the history
Closes #14
  • Loading branch information
eskabetxe authored and lresende committed Dec 12, 2018
1 parent 93a9945 commit c68a138
Show file tree
Hide file tree
Showing 14 changed files with 258 additions and 15 deletions.
2 changes: 1 addition & 1 deletion NOTICE
@@ -1,5 +1,5 @@
Apache Website Template
Copyright [2016-2017] The Apache Software Foundation
Copyright [2016-2018] The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
5 changes: 2 additions & 3 deletions site/_includes/themes/apache-clean/footer.html
Expand Up @@ -18,9 +18,8 @@
</div>
{% endif %}
<div>
Copyright &copy; 2016-2017 <a href="http://www.apache.org">The Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
Copyright &copy; 2016-<script>document.write(new Date().getFullYear());</script> <a href="http://www.apache.org">The Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
<br>
{% if site.data.project.podling %}
Apache, the Apache Feather logo, and the Apache Incubator project logo are trademarks of The Apache
Expand Down
8 changes: 6 additions & 2 deletions site/docs/flink/current/documentation.md
@@ -1,7 +1,7 @@
---
layout: page
title: Extensions for Apache Flink (1.0.0-SNAPSHOT)
description: Extensions for Apache Flink (1.0.0-SNAPSHOT)
title: Extensions for Apache Flink (1.1-SNAPSHOT)
description: Extensions for Apache Flink (1.1-SNAPSHOT)
group: nav-right
---
<!--
Expand Down Expand Up @@ -37,6 +37,10 @@ limitations under the License.

[Flume connector](../flink-streaming-flume)

[InfluxDB connector](../flink-streaming-influxdb)

[Kudu connector](../flink-streaming-kudu)

[Netty connector](../flink-streaming-netty)

[Redis connector](../flink-streaming-redis)
2 changes: 1 addition & 1 deletion site/docs/flink/current/flink-streaming-activemq.md
Expand Up @@ -33,7 +33,7 @@ To use this connector, add the following dependency to your project:
<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-activemq_2.11</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
</dependency>

*Version Compatibility*: This module is compatible with ActiveMQ 5.14.0.
Expand Down
2 changes: 1 addition & 1 deletion site/docs/flink/current/flink-streaming-akka.md
Expand Up @@ -33,7 +33,7 @@ To use this connector, add the following dependency to your project:
<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-akka_2.11</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
</dependency>

*Version Compatibility*: This module is compatible with Akka 2.0+.
Expand Down
6 changes: 3 additions & 3 deletions site/docs/flink/current/flink-streaming-flume.md
Expand Up @@ -33,15 +33,15 @@ following dependency to your project:
<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-flume_2.11</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
</dependency>

*Version Compatibility*: This module is compatible with Flume 1.5.0.
*Version Compatibility*: This module is compatible with Flume 1.8.0.

Note that the streaming connectors are not part of the binary distribution of Flink. You need to link them into your job jar for cluster execution.
See how to link with them for cluster execution [here](https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/linking.html).

To create a `FlumeSink` instantiate the following constructor:

FlumeSink(String host, int port, SerializationSchema<IN> schema)

59 changes: 59 additions & 0 deletions site/docs/flink/current/flink-streaming-influxdb.md
@@ -0,0 +1,59 @@
---
layout: page
title: Apache Flink Streaming Connector for InfluxDB
description: Apache Flink Streaming Connector for InfluxDB
group: nav-right
---
<!--
{% comment %}
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
-->

{% include JB/setup %}

# Flink InfluxDB Connector

This connector provides a sink that can send data to [InfluxDB](https://www.influxdata.com/). To use this connector, add the
following dependency to your project:

<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-influxdb_2.11</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>

*Version Compatibility*: This module is compatible with InfluxDB 1.3.x
*Requirements*: Java 1.8+

Note that the streaming connectors are not part of the binary distribution of Flink. You need to link them into your job jar for cluster execution.
See how to link with them for cluster execution [here](https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/linking.html).

## Installing InfluxDB
Follow the instructions from the [InfluxDB download page](https://portal.influxdata.com/downloads#influxdb).

## Examples

### JAVA API

DataStream<InfluxDBPoint> dataStream = ...
InfluxDBConfig influxDBConfig = InfluxDBConfig.builder(String host, String username, String password, String dbName)
dataStream.addSink(new InfluxDBSink(influxDBConfig));


See end-to-end examples at [InfluxDB Examples](https://github.com/apache/bahir-flink/tree/master/flink-connector-influxdb/examples)


125 changes: 125 additions & 0 deletions site/docs/flink/current/flink-streaming-kudu.md
@@ -0,0 +1,125 @@
---
layout: page
title: Apache Flink Streaming Connector for Apache Kudu
description: Apache Flink Streaming Connector for Apache Kudu
group: nav-right
---
<!--
{% comment %}
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
-->

{% include JB/setup %}

# Flink Kudu Connector

This connector provides a source (```KuduInputFormat```) and a sink/output (```KuduSink``` and ```KuduOutputFormat```, respectively) that can read and write to [Kudu](https://kudu.apache.org/). To use this connector, add the
following dependency to your project:

<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-kudu_2.11</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>

*Version Compatibility*: This module is compatible with Apache Kudu *1.7.1* (last stable version).

Note that the streaming connectors are not part of the binary distribution of Flink. You need to link them into your job jar for cluster execution.
See how to link with them for cluster execution [here](https://ci.apache.org/projects/flink/flink-docs-stable/start/dependencies.html).

## Installing Kudu

Follow the instructions from the [Kudu Installation Guide](https://kudu.apache.org/docs/installation.html).
Optionally, you can use the docker images provided in dockers folder.

## KuduInputFormat

```
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(PARALLELISM);
// create a table info object
KuduTableInfo tableInfo = KuduTableInfo.Builder
.create("books")
.addColumn(KuduColumnInfo.Builder.create("id", Type.INT32).key(true).hashKey(true).build())
.addColumn(KuduColumnInfo.Builder.create("title", Type.STRING).build())
.addColumn(KuduColumnInfo.Builder.create("author", Type.STRING).build())
.addColumn(KuduColumnInfo.Builder.create("price", Type.DOUBLE).build())
.addColumn(KuduColumnInfo.Builder.create("quantity", Type.INT32).build())
.build();
// Pass the tableInfo to the KuduInputFormat and provide kuduMaster ips
env.createInput(new KuduInputFormat<>("172.25.0.6", tableInfo))
.count();
env.execute();
```

## KuduOutputFormat

```
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(PARALLELISM);
// create a table info object
KuduTableInfo tableInfo = KuduTableInfo.Builder
.create("books")
.createIfNotExist(true)
.replicas(1)
.addColumn(KuduColumnInfo.Builder.create("id", Type.INT32).key(true).hashKey(true).build())
.addColumn(KuduColumnInfo.Builder.create("title", Type.STRING).build())
.addColumn(KuduColumnInfo.Builder.create("author", Type.STRING).build())
.addColumn(KuduColumnInfo.Builder.create("price", Type.DOUBLE).build())
.addColumn(KuduColumnInfo.Builder.create("quantity", Type.INT32).build())
.build();
...
env.fromCollection(books)
.output(new KuduOutputFormat<>("172.25.0.6", tableInfo));
env.execute();
```

## KuduSink

```
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(PARALLELISM);
// create a table info object
KuduTableInfo tableInfo = KuduTableInfo.Builder
.create("books")
.createIfNotExist(true)
.replicas(1)
.addColumn(KuduColumnInfo.Builder.create("id", Type.INT32).key(true).hashKey(true).build())
.addColumn(KuduColumnInfo.Builder.create("title", Type.STRING).build())
.addColumn(KuduColumnInfo.Builder.create("author", Type.STRING).build())
.addColumn(KuduColumnInfo.Builder.create("price", Type.DOUBLE).build())
.addColumn(KuduColumnInfo.Builder.create("quantity", Type.INT32).build())
.build();
...
env.fromCollection(books)
.addSink(new KuduSink<>("172.25.0.6", tableInfo));
env.execute();
```
2 changes: 1 addition & 1 deletion site/docs/flink/current/flink-streaming-netty.md
Expand Up @@ -61,7 +61,7 @@ To use this connector, add the following dependency to your project:
<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-netty_2.11</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion site/docs/flink/current/flink-streaming-redis.md
Expand Up @@ -34,7 +34,7 @@ following dependency to your project:
<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-redis_2.11</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
</dependency>

*Version Compatibility*: This module is compatible with Redis 2.8.5.
Expand Down
2 changes: 1 addition & 1 deletion site/docs/flink/overview.md
Expand Up @@ -27,5 +27,5 @@ limitations under the License.

### Apache Bahir Extensions for Apache Flink

- [Current - 1.0-SNAPSHOT](/docs/flink/current/documentation)
- [Current - 1.1-SNAPSHOT](/docs/flink/current/documentation)
- [1.0](/docs/flink/1.0/documentation)
27 changes: 27 additions & 0 deletions site/docs/flink/templates/flink-streaming-influxdb.template
@@ -0,0 +1,27 @@
---
layout: page
title: Apache Flink Streaming Connector for InfluxDB
description: Apache Flink Streaming Connector for InfluxDB
group: nav-right
---
<!--
{% comment %}
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
-->

{% include JB/setup %}

27 changes: 27 additions & 0 deletions site/docs/flink/templates/flink-streaming-kudu.template
@@ -0,0 +1,27 @@
---
layout: page
title: Apache Flink Streaming Connector for Apache Kudu
description: Apache Flink Streaming Connector for Apache Kudu
group: nav-right
---
<!--
{% comment %}
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
-->

{% include JB/setup %}

4 changes: 3 additions & 1 deletion site/index.md
Expand Up @@ -48,9 +48,11 @@ Currently, {{ site.data.project.short_name }} provides extensions for [Apache Sp
## Apache Flink extensions

- Flink streaming connector for ActiveMQ
- Flink streaming connector for Akka
- Flink streaming connector for Flume
- Flink streaming connector for InfluxDB ![](/assets/themes/apache-clean/img/new-black.png){:height="36px" width="36px"}
- Flink streaming connector for Kudu ![](/assets/themes/apache-clean/img/new-black.png){:height="36px" width="36px"}
- Flink streaming connector for Redis
- Flink streaming connector for Akka
- Flink streaming connector for Netty


Expand Down

0 comments on commit c68a138

Please sign in to comment.