vahmed-hamdy commented on a change in pull request #17345:
URL: https://github.com/apache/flink/pull/17345#discussion_r764029533



##########
File path: 
flink-connectors/flink-connector-aws-kinesis-data-streams/src/main/java/org/apache/flink/connector/kinesis/sink/KinesisDataStreamsException.java
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.connector.kinesis.sink;
+
+/**
+ * A {@link RuntimeException} wrapper indicating the exception was thrown from 
the Kinesis Data
+ * Streams Sink.
+ */
+class KinesisDataStreamsException extends RuntimeException {
+
+    public KinesisDataStreamsException(final String message) {
+        super(message);
+    }
+
+    public KinesisDataStreamsException(final String message, final Throwable 
cause) {
+        super(message, cause);
+    }
+
+    /**
+     * When the flag {@code failOnError} is set in {@link 
KinesisDataStreamsSinkWriter}, this
+     * exception is raised as soon as any exception occurs when KDS is written 
to.
+     */
+    static class KinesisDataStreamsFailFastException extends 
KinesisDataStreamsException {

Review comment:
       This exception is **only** used to fail fast to deny request retries 
(the class is not extendible for reuse in case there is another case of runtime 
exceptions in datastreams, i.e. the error message is fixed). I think the 
intended use of this class is to be specific while the 
`KinesisDataStreamsException` is general. 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to