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

[Kinesis] Fix null error messages in onFailure exception in KinesisSink. #10416

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

RobertIndie
Copy link
Member

Motivation

Currently, if the kinesis producer fails to send a message, the error message in the exception in onFailure is null.
So the log output will look like below:
image
exception.getMessage() is null.
If the exception is UserRecordFailedException, we need to extract it to see real error messages.
The expected output is as follows:

[kpl-callback-pool-0-thread-0] ERROR org.apache.pulsar.io.kinesis.KinesisSink - [test-io] Failed to published message for replicator of Optional[persistent://public/default/test-kinesis-0]-Optional[420369924113]: Attempts:errorMessage:Unable to connect to endpoint with address : 3.15.36.110, errorCode:, delay:103, duration:12010;errorMessage:Unable to connect to endpoint, errorCode:, delay:54, duration:6005;errorMessage:Unable to connect to endpoint, errorCode:, delay:54, duration:6004;errorMessage:Unable to connect to endpoint, errorCode:, delay:50, duration:6004;errorMessage:Record has reached expiration, errorCode:Expired, delay:0, duration:0;

Modifications

  • Extract the UserRecordFailedException to see real error messages

@sijie
Copy link
Member

sijie commented Apr 29, 2021

@eolivelli @codelipenghui I marked this issue for 2.7.2

@eolivelli
Copy link
Contributor

Okay

codelipenghui pushed a commit that referenced this pull request Apr 30, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.7.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants