[ 
https://issues.apache.org/jira/browse/HDFS-11476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16450567#comment-16450567
 ] 

Hudson commented on HDFS-11476:
-------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #14057 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/14057/])
HDFS-11476. Fix NPE in FsDatasetImpl#checkAndUpdate. Contributed by (aengineer: 
rev 09cfa79dbdf2fc06d70f5219ff2ce621be0092a8)
* (edit) 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java


> Fix NPE in FsDatasetImpl#checkAndUpdate
> ---------------------------------------
>
>                 Key: HDFS-11476
>                 URL: https://issues.apache.org/jira/browse/HDFS-11476
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>            Priority: Major
>             Fix For: 2.9.0, 3.0.0-alpha4
>
>         Attachments: HDFS-11476.000.patch, HDFS-11476.001.patch, 
> HDFS-11476.002.patch, HDFS-11476.003.patch
>
>
> 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to