You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/05 09:11:36 UTC

[GitHub] [flink-connector-aws] hlteoh37 commented on a diff in pull request #35: [FLINK-29907] Externalize Kinesis/Firehose documentation

hlteoh37 commented on code in PR #35:
URL: https://github.com/apache/flink-connector-aws/pull/35#discussion_r1039324378


##########
docs/content.zh/docs/connectors/datastream/firehose.md:
##########
@@ -0,0 +1,199 @@
+---
+title: Firehose
+weight: 5
+type: docs
+aliases:
+- /zh/dev/connectors/firehose.html
+---
+<!--
+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.
+-->
+
+# Amazon Kinesis Data Firehose Sink
+
+The Firehose sink writes to [Amazon Kinesis Data Firehose](https://aws.amazon.com/kinesis/data-firehose/).
+
+Follow the instructions from the [Amazon Kinesis Data Firehose Developer Guide](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html)
+to setup a Kinesis Data Firehose delivery stream.
+
+To use the connector, add the following Maven dependency to your project:
+
+{{< artifact flink-connector-aws-kinesis-firehose >}}
+
+{{< connector_artifact flink-connector-aws-kinesis-firehose 4.0.0 >}}
+
+The `KinesisFirehoseSink` uses [AWS v2 SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/home.html) to write data from a Flink stream into a Firehose delivery stream.
+
+{{< tabs "42vs28vdth5-nm76-6dz1-5m7s-5y345bu56se5u66je" >}}
+{{< tab "Java" >}}
+```java
+Properties sinkProperties = new Properties();
+// Required
+sinkProperties.put(AWSConfigConstants.AWS_REGION, "eu-west-1");
+// Optional, provide via alternative routes e.g. environment variables
+sinkProperties.put(AWSConfigConstants.AWS_ACCESS_KEY_ID, "aws_access_key_id");
+sinkProperties.put(AWSConfigConstants.AWS_SECRET_ACCESS_KEY, "aws_secret_access_key");
+
+KinesisFirehoseSink<String> kdfSink =
+    KinesisFirehoseSink.<String>builder()
+        .setFirehoseClientProperties(sinkProperties)      // Required
+        .setSerializationSchema(new SimpleStringSchema()) // Required
+        .setDeliveryStreamName("your-stream-name")        // Required
+        .setFailOnError(false)                            // Optional
+        .setMaxBatchSize(500)                             // Optional
+        .setMaxInFlightRequests(50)                       // Optional
+        .setMaxBufferedRequests(10_000)                   // Optional
+        .setMaxBatchSizeInBytes(4 * 1024 * 1024)          // Optional
+        .setMaxTimeInBufferMS(5000)                       // Optional
+        .setMaxRecordSizeInBytes(1000 * 1024)             // Optional
+        .build();
+
+flinkStream.sinkTo(kdfSink);
+```
+{{< /tab >}}
+{{< tab "Scala" >}}
+```scala
+Properties sinkProperties = new Properties()

Review Comment:
   nit: `val`



##########
docs/content.zh/docs/connectors/table/kinesis.md:
##########
@@ -0,0 +1,914 @@
+---
+title: Kinesis
+weight: 5
+type: docs
+aliases:
+- /zh/dev/table/connectors/kinesis.html
+---
+<!--
+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.
+-->
+
+# Amazon Kinesis Data Streams SQL Connector
+
+{{< label "Scan Source: Unbounded" >}}
+{{< label "Sink: Streaming Append Mode" >}}
+

Review Comment:
   nit: add batch?



##########
docs/content.zh/docs/connectors/table/firehose.md:
##########
@@ -0,0 +1,312 @@
+---
+title: Firehose
+weight: 5
+type: docs
+aliases:
+- /zh/dev/table/connectors/firehose.html
+---
+
+<!--
+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.
+-->
+
+# Amazon Kinesis Data Firehose SQL Connector
+
+{{< label "Sink: Streaming Append Mode" >}}

Review Comment:
   nit: add batch?



##########
docs/content/docs/connectors/datastream/firehose.md:
##########
@@ -0,0 +1,199 @@
+---
+title: Firehose
+weight: 5
+type: docs
+aliases:
+- /dev/connectors/firehose.html

Review Comment:
   not sure how this works, but should we add the below like kinesis data streams docs?
   ```
     - /apis/streaming/connectors/firehose.html
   ```



##########
docs/content.zh/docs/connectors/datastream/firehose.md:
##########
@@ -0,0 +1,199 @@
+---
+title: Firehose
+weight: 5
+type: docs
+aliases:
+- /zh/dev/connectors/firehose.html
+---
+<!--
+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.
+-->
+
+# Amazon Kinesis Data Firehose Sink
+
+The Firehose sink writes to [Amazon Kinesis Data Firehose](https://aws.amazon.com/kinesis/data-firehose/).
+
+Follow the instructions from the [Amazon Kinesis Data Firehose Developer Guide](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html)
+to setup a Kinesis Data Firehose delivery stream.
+
+To use the connector, add the following Maven dependency to your project:
+
+{{< artifact flink-connector-aws-kinesis-firehose >}}
+
+{{< connector_artifact flink-connector-aws-kinesis-firehose 4.0.0 >}}

Review Comment:
   should we add 
   ```
   {{< py_download_link "aws-kinesis-firehose" >}}
   ```
   like the non-chinese docs?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org