This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BAHIR-147] update with last extensions
Closes #14
- Loading branch information
Showing
14 changed files
with
258 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
site/docs/flink/templates/flink-streaming-influxdb.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters