hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "He Xiaoqiao (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-8992) Balancer throws NPE
Date Sat, 29 Aug 2015 08:42:45 GMT

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

He Xiaoqiao updated HDFS-8992:
------------------------------
    Description: 
Balancer may throw NPE because the following {{if Statements}} at line 709 of Balancer.java
{code:java|firstline=705}
          synchronized (block) {
            // update locations
            for (String datanodeUuid : blk.getDatanodeUuids()) {
              final BalancerDatanode d = datanodeMap.get(datanodeUuid);
              if (datanode != null) { // not an unknown datanode
                block.addLocation(d);
              }
            }
          }
{code}
Before moving block, Balancer divides into two step to get all DNs info & some blocks
of DN from NN. Regarding one DN commission after {{getDatanodeReport}} then {{getBlockList}}
and one block's target is above DN just right, It will throw NPE when dispatcher.

  was:
Balancer may throw NPE because the following {{if Statements}}
{code:java|firstline=705}
          synchronized (block) {
            // update locations
            for (String datanodeUuid : blk.getDatanodeUuids()) {
              final BalancerDatanode d = datanodeMap.get(datanodeUuid);
              if (datanode != null) { // not an unknown datanode
                block.addLocation(d);
              }
            }
          }
{code}
Before moving block, Balancer divides into two step to get all DNs info & some blocks
of DN from NN. Regarding one DN commission after {{getDatanodeReport}} then {{getBlockList}}
and one block's target is above DN just right, It will throw NPE when dispatcher.


> Balancer throws NPE
> -------------------
>
>                 Key: HDFS-8992
>                 URL: https://issues.apache.org/jira/browse/HDFS-8992
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: balancer & mover
>    Affects Versions: 2.4.1
>            Reporter: He Xiaoqiao
>
> Balancer may throw NPE because the following {{if Statements}} at line 709 of Balancer.java
> {code:java|firstline=705}
>           synchronized (block) {
>             // update locations
>             for (String datanodeUuid : blk.getDatanodeUuids()) {
>               final BalancerDatanode d = datanodeMap.get(datanodeUuid);
>               if (datanode != null) { // not an unknown datanode
>                 block.addLocation(d);
>               }
>             }
>           }
> {code}
> Before moving block, Balancer divides into two step to get all DNs info & some blocks
of DN from NN. Regarding one DN commission after {{getDatanodeReport}} then {{getBlockList}}
and one block's target is above DN just right, It will throw NPE when dispatcher.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message