tweise commented on a change in pull request #6968: [FLINK-4582] [kinesis] 
Consuming data from DynamoDB streams to flink
URL: https://github.com/apache/flink/pull/6968#discussion_r236085419
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkDynamodbStreamsConsumer.java
 ##########
 @@ -0,0 +1,109 @@
+/*
+ * 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.
+ */
+
+package org.apache.flink.streaming.connectors.kinesis;
+
+import org.apache.flink.api.common.functions.RuntimeContext;
+import org.apache.flink.api.common.serialization.DeserializationSchema;
+import org.apache.flink.streaming.api.functions.source.SourceFunction;
+import 
org.apache.flink.streaming.connectors.kinesis.internals.DynamodbStreamsDataFetcher;
+import 
org.apache.flink.streaming.connectors.kinesis.internals.KinesisDataFetcher;
+import 
org.apache.flink.streaming.connectors.kinesis.serialization.DynamodbStreamsSchema;
+import 
org.apache.flink.streaming.connectors.kinesis.serialization.KinesisDeserializationSchema;
+
+import com.amazonaws.services.dynamodbv2.model.Record;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * Consume events from the dyanmodbdb streams.
+ *
+ * @param <T> the type of data emitted
+ */
+public class FlinkDynamodbStreamsConsumer<T> extends FlinkKinesisConsumer<T> {
+       private static final Logger LOG = 
LoggerFactory.getLogger(FlinkDynamodbStreamsConsumer.class);
+
+       /**
+        * Constructor of FlinkDynamodbStreamsConsumer.
+        *
+        * @param stream stream to consume
+        * @param deserializer deserialization schema
+        * @param config config properties
+        */
+       public FlinkDynamodbStreamsConsumer(
+                       String stream,
+                       DeserializationSchema<T> deserializer,
+                       Properties config) {
+               super(stream, deserializer, config);
+       }
+
+       /**
+        * Constructor of FlinkDynamodbStreamConsumer.
+        *
+        * @param streams list of streams to consume
+        * @param deserializer  deserialization schema
+        * @param config config properties
+        */
+       public FlinkDynamodbStreamsConsumer(
+                       List<String> streams,
+                       KinesisDeserializationSchema deserializer,
+                       Properties config) {
+               super(streams, deserializer, config);
+       }
+
+       public static <T> FlinkDynamodbStreamsConsumer<T> create(String stream,
 
 Review comment:
   Please remove these static create methods, they don't provide any benefit 
since the constructors are public (which is consistent with the base class).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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