-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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-12519: Remove built-in Streams metrics for versions 0.10.0-2.4 #10765
KAFKA-12519: Remove built-in Streams metrics for versions 0.10.0-2.4 #10765
Conversation
Sorry for this massive cleanup PR: @guozhangwang @mjsax @ableegoldman @vvcephei @abbccdda |
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.
@cadonna , thanks for the PR. I have a quick look, left some comments. In additional to that, I did a search, and found there are still 2 places with related variables that should be handled.
THREAD_ID_TAG_0100_TO_24
variable inStreamsMetricsImpl.java
THREAD_ID_TAG_0100_TO_24
variable inStreamTaskTest.java
Thank you.
@@ -175,11 +171,7 @@ public StreamsMetricsImpl(final Metrics metrics, | |||
} | |||
|
|||
private static Version parseBuiltInMetricsVersion(final String builtInMetricsVersion) { |
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.
After removing FROM_0100_TO_24
, I think we can remove this parseBuiltInMetricsVersion
, too.
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.
Removed it.
@@ -52,8 +51,7 @@ | |||
public class StreamsMetricsImpl implements StreamsMetrics { | |||
|
|||
public enum Version { | |||
LATEST, | |||
FROM_0100_TO_24 | |||
LATEST |
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.
If the enum only has 1 element and named as LATEST
, did we still need this enum
?
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.
Since we decided to keep the config built.in.metrics.version
I think it is OK to keep also this enum.
@showuon Nice catch! |
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 effort! Made a pass. Did not spot anything yellow.
@Before | ||
public void setUp() { | ||
expect(streamsMetrics.version()).andReturn(builtInMetricsVersion).anyTimes(); | ||
expect(streamsMetrics.version()).andStubReturn(Version.LATEST); |
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.
Learned something new about andStubReturn v.s. andReturn :)
).metricValue()); | ||
} | ||
|
||
verify(innerStoreMock); |
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 forgot to add this before?
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.
Good that you mention that! I checked the metered state store tests and found some testing holes.
8a8c97d
to
2afe7b3
Compare
As specified in KIP-743, this PR removes the built-in metrics in Streams that are superseded by the refactoring proposed in KIP-444.
2afe7b3
to
cb253df
Compare
@showuon and @guozhangwang Do you want to have a second look after my last update of the unit tests? Otherwise I would move on and merge. |
Test failures are unrelated and known to be flaky:
|
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.
LGTM! Thanks for the PR!
@showuon Thanks for the review! |
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.
Made a quick pass on the latest two commits, LGTM.
As specified in KIP-743, this PR removes the built-in metrics
in Streams that are superseded by the refactoring proposed in KIP-444.
Committer Checklist (excluded from commit message)