-
Notifications
You must be signed in to change notification settings - Fork 14.9k
KAFKA-3185: Allow users to cleanup internal Kafka Streams data #1636
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
Conversation
|
Still working on some test to be added. |
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.
Nit:
May only be called [either] before instance is started or after instance is closed.
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.
Perhaps move this into a separate method (for which we could also add unit tests if needed), like isInternalStreamsTopic(String topicName)?
|
Overall LGTM - @miguno has some good suggestions for some of the Sysout messages. |
|
@mjsax @miguno Some context about packaging: currently we have an In that case, maybe we should, in the very-near future, move this client from kafka-tools to kafka-streams as well in |
|
Sounds ok to me. |
|
@guozhangwang, one thing to consider is whether the new |
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.
Is there a way to recycle the existing constants like REPARTITION_TOPIC_SUFFIX?
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.
We would need a dependency from kafka-tools to kafka-streams -- I would rather not add this dependency.
| } | ||
|
|
||
| @Test(timeout = 120000) | ||
| public void testCleanUp() throws Exception { |
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.
Can we find a more descriptive name for this test case? e.g. "cleaningUpAfterRunShouldLeadToSameResultsOnRerun" (just saying)
|
Thanks @mjsax. Added some minor comments. |
|
@miguno Updated |
| streamsConfiguration.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 1); | ||
| streamsConfiguration.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 100); | ||
| streamsConfiguration.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "" + CONSUMER_TIMEOUT); | ||
| streamsConfiguration.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "" + STREAMS_CONSUMER_TIMEOUT); |
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.
Why the "" + number?
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.
To get data type String -- without it, there is an exception.
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.
Ah. I was confused because streamsConfiguration.put(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG, 100); is not using type String for 100 either.
Fixed JavaDoc and checkstyle
|
@miguno Updated according to last discussion about re-nameing. Also addressed all other comments. |
|
@mjsax: Question: rename |
|
Already done like this. |
|
@guozhangwang Please review to get this merged by Friday. |
|
LGTM overall. Is the Jenkins failure related? Also I will merge in both trunk and 0.10.0 now, but moving forward we may move it to a different package but only in trunk. Just FYI. |
|
@guozhangwang just added one commit to remove the test timeout -- hope Jenkins passes now. |
|
LGTM. Merged to trunk. Will use a separate PR against 0.10.0 branch. |
Uh oh!
There was an error while loading. Please reload this page.