tzulitai commented on a change in pull request #65: [FLINK-16700][docs] 
Document Kinesis I/O Module
URL: https://github.com/apache/flink-statefun/pull/65#discussion_r396063643
 
 

 ##########
 File path: statefun-docs/docs/io_module/kinesis.rst
 ##########
 @@ -0,0 +1,374 @@
+.. 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.
+
+###########
+AWS Kinesis
+###########
+
+Stateful Functions offers an AWS Kinesis I/O Module for reading from and 
writing to Kinesis streams.
+It is based on Apache Flink's `Kinesis connector 
<https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/connectors/kinesis.html>`_.
+The Kinesis I/O Module is configurable in Yaml or Java.
+
+.. contents:: :local:
+
+Dependency
+==========
+
+To use the Kinesis I/O Module in Java, please include the following dependency 
in your pom.
+
+.. code-block:: xml
+
+    <dependency>
+        <groupId>org.apache.flink</groupId>
+        <artifactId>statefun-kinesis-io</artifactId>
+        <version>{version}</version>
+        <scope>provided</scope>
+    </dependency>
+
+Kinesis Ingress Spec
+====================
+
+A ``KinesisIngressSpec`` declares an ingress spec for consuming from Kinesis 
stream.
+
+It accepts the following arguments:
+
+1) The AWS region
+2) An AWS credentials provider
+3) A ``KinesisIngressDeserializer`` for deserializing data from Kinesis (Java 
only)
+4) The stream start position
+5) Properties for the Kinesis client
+6) The name of the stream to consume from
+
+.. tabs::
+
+    .. group-tab:: Java 
+
+        .. literalinclude:: 
../../src/main/java/org/apache/flink/statefun/docs/io/kinesis/IngressSpecs.java
+            :language: java
+            :lines: 18-
+
+    .. group-tab:: Yaml
+
+        .. code-block:: yaml 
+
+            version: "1.0"
+
+            module:
+                meta:
+                    type: remote
+                spec:
+                    ingresses:
+                    - ingress:
+                        meta:
+                            type: statefun.kinesis.io/routable-protobuf-ingress
+                            id: example-namespace/messages
+                        spec:
+                            awsRegion:
+                                type: specific
+                                id: us-west-1
+                            awsCredentials:
+                                type: basic
+                                accessKeyId: my_access_key_id
+                                secretAccessKey: my_secret_access_key
+                            startupPosition:
+                                type: earliest
+                            streams:
+                                - stream: stream-1
+                                typeUrl: com.googleapis/com.mycomp.foo.Message
+                                targets:
 
 Review comment:
   ```suggestion
                                   - stream: stream-1
                                     typeUrl: 
com.googleapis/com.mycomp.foo.Message
                                     targets:
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to