From 5103c52f6610e356b2bb3915232316a3524e1454 Mon Sep 17 00:00:00 2001 From: Christopher Nash Date: Tue, 14 Dec 2021 11:13:23 -0700 Subject: [PATCH] Fix `logOnErrorReadTimeoutWarning` formatting The formatting of the `logOnErrorReadTimeoutWarning` was inconsistent in where it had spaces and where it didn't. This caused words to be smashed together in the log message. Example output: ``` onError(). Cancelling subscription, and marking self as failed. KCL will recreate the subscription as neccessary to continue processing. If you are seeing this warning frequently consider increasing the SDK timeouts by providing an OverrideConfiguration to the kinesis client. Alternatively youcan configure LifecycleConfig.readTimeoutsToIgnoreBeforeWarning to suppressintermittent ReadTimeout warnings. Last successful request details -- request id - UNKNOWN, timestamp - 2021-12-14T17:41:00.169Z ``` specifically note the `youcan` and `suppressintermittent`. This change corrects the formatting of this log output to not include these smashed together words. It also corrects a type in the word `necessary` (was `neccessary`). --- .../amazon/kinesis/lifecycle/ShardConsumerSubscriber.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShardConsumerSubscriber.java b/amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShardConsumerSubscriber.java index 685a76d2..712856a4 100644 --- a/amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShardConsumerSubscriber.java +++ b/amazon-kinesis-client/src/main/java/software/amazon/kinesis/lifecycle/ShardConsumerSubscriber.java @@ -199,11 +199,11 @@ class ShardConsumerSubscriber implements Subscriber { } protected void logOnErrorReadTimeoutWarning(Throwable t) { - log.warn("{}: onError(). Cancelling subscription, and marking self as failed. KCL will" - + " recreate the subscription as neccessary to continue processing. If you " + log.warn("{}: onError(). Cancelling subscription, and marking self as failed. KCL will " + + "recreate the subscription as necessary to continue processing. If you " + "are seeing this warning frequently consider increasing the SDK timeouts " - + "by providing an OverrideConfiguration to the kinesis client. Alternatively you" - + "can configure LifecycleConfig.readTimeoutsToIgnoreBeforeWarning to suppress" + + "by providing an OverrideConfiguration to the kinesis client. Alternatively you " + + "can configure LifecycleConfig.readTimeoutsToIgnoreBeforeWarning to suppress " + "intermittent ReadTimeout warnings. Last successful request details -- {}", shardInfoId, recordsPublisher.getLastSuccessfulRequestDetails(), t); }