hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpit Agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-5401) Fix NPE in Directory Scanner
Date Wed, 23 Oct 2013 19:39:42 GMT

     [ https://issues.apache.org/jira/browse/HDFS-5401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Arpit Agarwal updated HDFS-5401:
--------------------------------

    Attachment: h5401.01.patch

Patch to fix the NPE. Fixes TestDirectoryScanner.

The NPE was hit while serializing LocatedBlock in a {{reportBadBlock}} call since the storage
IDs of the block was not initialized.

The patch includes a related change to the type of perVolumeReplicaMap. It is more efficient
to just use storage ID as the key.
{code}
-    perVolumeReplicaMap = new HashMap<FsVolumeImpl, ReplicaMap>();
+    perVolumeReplicaMap = new HashMap<String, ReplicaMap>();
{code}

> Fix NPE in Directory Scanner
> ----------------------------
>
>                 Key: HDFS-5401
>                 URL: https://issues.apache.org/jira/browse/HDFS-5401
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode
>    Affects Versions: Heterogeneous Storage (HDFS-2832)
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>         Attachments: h5401.01.patch
>
>
> Directory scanner is broken by previous changes, NPE exposed by TestDirectoryScanner
> {code}
> testDirectoryScanner(org.apache.hadoop.hdfs.server.datanode.TestDirectoryScanner)  Time
elapsed: 27.417 sec  <<< ERROR!
> java.lang.NullPointerException: null
>         at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.checkAndUpdate(FsDatasetImpl.java:1419)
>         at org.apache.hadoop.hdfs.server.datanode.DirectoryScanner.reconcile(DirectoryScanner.java:405)
>         at org.apache.hadoop.hdfs.server.datanode.TestDirectoryScanner.scan(TestDirectoryScanner.java:212)
>         at org.apache.hadoop.hdfs.server.datanode.TestDirectoryScanner.runTest(TestDirectoryScanner.java:270)
>         at org.ap
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message