You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "vahmed-hamdy (via GitHub)" <gi...@apache.org> on 2023/04/14 14:58:17 UTC

[GitHub] [flink-connector-aws] vahmed-hamdy commented on a diff in pull request #65: [FLINK-31108][Connectors/Kinesis] Use Stream ARN instead of Stream Na…

vahmed-hamdy commented on code in PR #65:
URL: https://github.com/apache/flink-connector-aws/pull/65#discussion_r1166944534


##########
flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/sink/KinesisStreamsSink.java:
##########
@@ -89,13 +92,23 @@
                 maxBatchSizeInBytes,
                 maxTimeInBufferMS,
                 maxRecordSizeInBytes);
-        this.streamName =
-                Preconditions.checkNotNull(
-                        streamName,
-                        "The stream name must not be null when initializing the KDS Sink.");
-        Preconditions.checkArgument(
-                !this.streamName.isEmpty(),
-                "The stream name must be set when initializing the KDS Sink.");
+
+        // Ensure that either streamName or streamArn is set. If both are set, streamArn takes
+        // precedence.
+        if (streamArn != null) {

Review Comment:
   Do you think this can be reusable by firehose, maybe we should move to aws-util



-- 
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