[
https://issues.apache.org/jira/browse/HADOOP-18954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17780334#comment-17780334
]
ASF GitHub Bot commented on HADOOP-18954:
-----------------------------------------
K0K0V0K opened a new pull request, #6229:
URL: https://github.com/apache/hadoop/pull/6229
### Description of PR
- 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
### How was this patch tested?
- Manually tested on a cluster where NaN values were present in the RM
response.
- When the feature was turned on, the NaN values were replaced
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
> Filter NaN values from JMX json interface
> -----------------------------------------
>
> Key: HADOOP-18954
> URL: https://issues.apache.org/jira/browse/HADOOP-18954
> Project: Hadoop Common
> Issue Type: Improvement
> Components: common
> Reporter: Bence Kosztolnik
> Assignee: Bence Kosztolnik
> Priority: Major
>
> As we can see in this [Yarn
> documentation|https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html]
> beans can represent Float values as NaN. These values will be represented in
> the JMX response JSON like:
> {noformat}
> ...
> "GuaranteedCapacity": NaN,
> ...
> {noformat}
> Based on the [JSON doc|https://www.json.org/] NaN is not a valid JSON token (
> however some of the parser libs can handle it ), so not every consumer can
> parse values like these.
> To be able to parse NaN values, a new feature flag should be created.
> The new feature will replace the NaN values with 0.0 values.
> The feature is default turned off. It can be enabled with the
> *hadoop.http.jmx.nan-filter.enabled* config.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]