[
https://issues.apache.org/jira/browse/HDFS-16377?focusedWorklogId=693859&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-693859
]
ASF GitHub Bot logged work on HDFS-16377:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Dec/21 11:34
Start Date: 10/Dec/21 11:34
Worklog Time Spent: 10m
Work Description: tomscut opened a new pull request #3784:
URL: https://github.com/apache/hadoop/pull/3784
JIRA: [HDFS-16377](https://issues.apache.org/jira/browse/HDFS-16377).
When starting the DN, we found NPE in the **staring DN's log**, as follows:

The logs of the **upstream DN** are as follows:

This is mainly because `FsDatasetSpi` has not been initialized at the time
of access.
I noticed that checkNotNull is already done in these two
method(`DataNode#getBlockLocalPathInfo` and `DataNode#getVolumeInfo`). So we
should add it to other places(interfaces that clients and other DN can access
directly) so that we can add a message(`Storage not yet initialized`) when
throwing exceptions.
Therefore, the client and the upstream DN know that `FsDatasetSpi` has not
been initialized, rather than blindly unaware of the specific cause of the NPE.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 693859)
Remaining Estimate: 0h
Time Spent: 10m
> Should CheckNotNull before access FsDatasetSpi
> ----------------------------------------------
>
> Key: HDFS-16377
> URL: https://issues.apache.org/jira/browse/HDFS-16377
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: tomscut
> Assignee: tomscut
> Priority: Major
> Labels: pull-request-available
> Attachments: image-2021-12-10-19-19-22-957.png,
> image-2021-12-10-19-20-58-022.png
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When starting the DN, we found NPE in the staring DN's log, as follows:
> !image-2021-12-10-19-19-22-957.png|width=909,height=126!
> The logs of the upstream DN are as follows:
> !image-2021-12-10-19-20-58-022.png|width=905,height=239!
> This is mainly because *FsDatasetSpi* has not been initialized at the time of
> access.
> I noticed that checkNotNull is already done in these two
> method({*}DataNode#getBlockLocalPathInfo{*} and
> {*}DataNode#getVolumeInfo{*}). So we should add it to other places(interfaces
> that clients and other DN can access directly) so that we can add a message
> when throwing exceptions.
> Therefore, the client and the upstream DN know that FsDatasetSpi has not been
> initialized, rather than blindly unaware of the specific cause of the NPE.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]