-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HADOOP-18954. Filter NaN values from JMX json interface #6229
Conversation
- The JMX json represents NaN like invalid JSON token, so some parser can not parse. - To fix this a new feature introduced to replace NaN with 0.0 values. - The feature can be turned on with the hadoop.http.jmx.nan-filter.enabled config
LGTM, thank you for your work on this! |
💔 -1 overall
This message was automatically generated. |
Check style says
but I think we should rather keep it like this cause the other variables like this neither have getter / setter. |
- replace constants place
🎊 +1 overall
This message was automatically generated. |
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.
@K0K0V0K Thanks for your contribution. Leave one nit comment inline. FYI.
result = readOutput(new URL(baseUrl, "/jmx")); | ||
assertReFind("\"name\"\\s*:\\s*\"java.lang:type=Memory\"", result); | ||
|
||
assertReFind( |
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.
How about add another case to verify the result when enable JMX_NAN_FILTER?
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 @Hexiaoqiao !
Thanks for the review!
Yes, I think it would be good to have a test like that, but that change just won't be nice I am afraid.
The problem is that there is no nice way to connect the HttpServerFunctionalTest#createTestServer(Configuration conf) to the JMXJsonServlet, cause in the HttpServlet2#addDefaultServlets we just provide class reference.
A possible solution is to create another JMX servlet class to do the trick.
I would prefer the previous code, cause that was less ugly, but I am open to keeping this one, to have the test.
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.
Got it. Make sense to me.
💔 -1 overall
This message was automatically generated. |
@K0K0V0K Please check the report from Yetus if we need to fix checkstyle and javadoc/blanks. Thanks. |
💔 -1 overall
This message was automatically generated. |
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. +1 from my side.
NOTE: checkstyle report by Yetus should be OK.
Reviewed-by: Ferenc Erdelyi Signed-off-by: He Xiaoqiao <[email protected]>
Description of PR
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?