-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
KAFKA-16448: Add ProcessingExceptionHandler in Streams configuration #16092
KAFKA-16448: Add ProcessingExceptionHandler in Streams configuration #16092
Conversation
…ions Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
…ions Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@loicgreffier Thanks for the PR!
Here my comment.
Since today is feature freeze, it would be great if you could make the changes as soon as possible.
.define(PROCESSING_EXCEPTION_HANDLER_CLASS_CONFIG, | ||
Type.CLASS, | ||
LogAndFailProcessingExceptionHandler.class.getName(), | ||
Importance.MEDIUM, | ||
PROCESSING_EXCEPTION_HANDLER_CLASS_DOC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add unit tests in StreamsConfigTest
?
I think you need the following unit tests:
- One where config is not set to verify the default value
- One where the config is set and you get the correct instance from
processingExceptionHandler()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi,
It is done !
…ndler Co-authored-by: Dabz <[email protected]> Co-authored-by: loicgreffier <[email protected]>
…ndler Co-authored-by: Dabz <[email protected]> Co-authored-by: loicgreffier <[email protected]>
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig Co-authored-by: Dabz <[email protected]> Co-authored-by: loicgreffier <[email protected]>
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig
…eptionHandler Co-authored-by: Dabz <[email protected]> Co-authored-by: loicgreffier <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates, @loicgreffier and @sebastienviale!
After addressing my comment, I will approve and merge this PR.
@Test | ||
public void testInvalidProcessingExceptionHandler() { | ||
props.put(StreamsConfig.PROCESSING_EXCEPTION_HANDLER_CLASS_CONFIG, "org.apache.kafka.streams.errors.InvalidProcessingExceptionHandler"); | ||
assertThrows(ConfigException.class, () -> new StreamsConfig(props)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also verify the message?
assertThrows(ConfigException.class, () -> new StreamsConfig(props)); | |
final Exception exception = assertThrows(ConfigException.class, () -> new StreamsConfig(props)); | |
assertThat( | |
exception.getMessage(), | |
containsString("<the message to verify>") | |
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verification has been added
…ptionHandler Co-authored-by: Dabz <[email protected]> Co-authored-by: loicgreffier <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @loicgreffier @sebastienviale !
LGTM!
Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
85060e6
to
60bba3b
Compare
Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]>
@cadonna I've rebased this PR so file changes are now clear. Do we need to squash commits manually or is it automatically done when merging ? |
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig
Co-authored-by: Dabz <[email protected]> Co-authored-by: loicgreffier <[email protected]>
Thanks! Squashing happens when merging. Don't worry! |
…uration (apache#16092)" This reverts commit 3f70c46.
…uration (#16092)" (#16141) This reverts commit 3f70c46. Reviewer: Lucas Brutschy <[email protected]>
…pache#16092) This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing. This PR brings ProcessingExceptionHandler in Streams configuration. Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]> Reviewer: Bruno Cadonna <[email protected]>
…uration (apache#16092)" (apache#16141) This reverts commit 3f70c46. Reviewer: Lucas Brutschy <[email protected]>
…pache#16092) This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing. This PR brings ProcessingExceptionHandler in Streams configuration. Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]> Reviewer: Bruno Cadonna <[email protected]>
…uration (apache#16092)" (apache#16141) This reverts commit 3f70c46. Reviewer: Lucas Brutschy <[email protected]>
…pache#16092) This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing. This PR brings ProcessingExceptionHandler in Streams configuration. Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]> Reviewer: Bruno Cadonna <[email protected]>
…uration (apache#16092)" (apache#16141) This reverts commit 3f70c46. Reviewer: Lucas Brutschy <[email protected]>
…pache#16092) This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing. This PR brings ProcessingExceptionHandler in Streams configuration. Co-authored-by: Dabz <[email protected]> Co-authored-by: sebastienviale <[email protected]> Reviewer: Bruno Cadonna <[email protected]>
…uration (apache#16092)" (apache#16141) This reverts commit 3f70c46. Reviewer: Lucas Brutschy <[email protected]>
This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing.
This PR brings
ProcessingExceptionHandler
in Streams configuration.Jira: https://issues.apache.org/jira/browse/KAFKA-16448.
Contributors
@Dabz
@sebastienviale
@loicgreffier
Depends On
#16090
Committer Checklist (excluded from commit message)