[
https://issues.apache.org/jira/browse/HDFS-14030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16666174#comment-16666174
]
Wei-Chiu Chuang commented on HDFS-14030:
----------------------------------------
Thanks [~adam.antal] for filing the issue and submitted the patch.
I don't quite understand the goal of the patch. Is the goal to suppress the
NPE? If so, maybe a simpler fix would be removing
{{Preconditions.checkNotNull}} in {{DataNode#getVolumeInfo}}?
In many cases, this NPE is thrown when an external monitoring service queries
the DataNode's /jmx web end point. Unless it queries specifically for
{{/jmx?get=Hadoop:service=DataNode,name=DataNodeInfo::SecurityEnabled}} before
querying /jmx (that is, returning every MXBean) this flag won't be really
useful.
> Add query whether storage has been initialized to DN's JMXBean
> --------------------------------------------------------------
>
> Key: HDFS-14030
> URL: https://issues.apache.org/jira/browse/HDFS-14030
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs
> Reporter: Adam Antal
> Assignee: Adam Antal
> Priority: Minor
> Attachments: HDFS-14030.001.patch
>
>
> During the short period while the DN is starting and the storage is not yet
> available we get the following errors:
> {noformat}
> ERROR org.apache.hadoop.jmx.JMXJsonServlet: getting attribute VolumeInfo of
> Hadoop:service=DataNode,name=DataNodeInfo threw an exception
> javax.management.RuntimeMBeanException: java.lang.NullPointerException:
> Storage not yet initialized
> {noformat}
> I suggest to add an option to the DataNodeMXBean to query whether the storage
> has been initialized or not to surpass the exception.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]