Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch KCL known exceptions to reduce noisy log statements #5102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sb2k16
Copy link
Member

@sb2k16 sb2k16 commented Oct 24, 2024

Description

This PR is to catch KCL known exceptions to reduce noisy log statements.

Issues Resolved

Resolves #1082

Check List

  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -139,6 +142,8 @@ public Scheduler getScheduler(final Buffer<Record<Event>> buffer) {
while (scheduler == null && numRetries++ < kinesisSourceConfig.getMaxInitializationAttempts()) {
try {
scheduler = createScheduler(buffer);
} catch (SdkClientException | KinesisClientLibDependencyException | ThrottlingException ex) {
LOG.error(NOISY, "Caught exception when initializing KCL Scheduler due to {}. Will retry", ex.getMessage());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not always retry as you have a numRetries above. Maybe drop the "Will retry" text or say "The number of retries remaining is N". You could count down instead of counting up in the loop above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dlvenable . I will drop the Will retry part of the statement.

Signed-off-by: Souvik Bose <souvbose@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support AWS Kinesis Data Streams as a Source
3 participants