You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Xiaobing Zhou (JIRA)" <ji...@apache.org> on 2017/02/28 23:36:45 UTC
[jira] [Created] (HDFS-11476) Fix NPE in
FsDatasetImpl#checkAndUpdate
Xiaobing Zhou created HDFS-11476:
------------------------------------
Summary: Fix NPE in FsDatasetImpl#checkAndUpdate
Key: HDFS-11476
URL: https://issues.apache.org/jira/browse/HDFS-11476
Project: Hadoop HDFS
Issue Type: Bug
Reporter: Xiaobing Zhou
Assignee: Xiaobing Zhou
diskMetaFile can be null and passed to compareTo which dereferences it, causing NPE
{code}
// Compare generation stamp
if (memBlockInfo.getGenerationStamp() != diskGS) {
File memMetaFile = FsDatasetUtil.getMetaFile(diskFile,
memBlockInfo.getGenerationStamp());
if (memMetaFile.exists()) {
if (memMetaFile.compareTo(diskMetaFile) != 0) {
LOG.warn("Metadata file in memory "
+ memMetaFile.getAbsolutePath()
+ " does not match file found by scan "
+ (diskMetaFile == null? null: diskMetaFile.getAbsolutePath()));
}
} else {
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org