hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HDFS-4450) Duplicate data node on the name node after formatting data node
Date Wed, 30 Jan 2013 15:07:12 GMT

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

Suresh Srinivas edited comment on HDFS-4450 at 1/30/13 3:06 PM:
----------------------------------------------------------------

bq. PATH still does not solve the Host2NodesMap.getDatanodeByHost (String ipAddr) and Host2NodesMap.add()
inconsistent.This seems to be a hidden danger.
I do not quite follow. Where getDatanodeByHost() is used, it might be okay for the purpose
it is used.

It would be good if you can you respond back to my previous comments? For convenience here
they are:

The description of this jira might not be pointing to an issue. Methods add() and getDatanodeByXferAddr()
are doing the correct thing. See for details my above comment.

What is the branch corresponding to the comment https://issues.apache.org/jira/browse/HDFS-4450?focusedCommentId=13566050&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13566050

Are you seeing duplicate datanode issue? If so, please post the logs. Per HDFS-3224, as long
as the ipaddr + xfer port remains the same, even if the storage ID changes, duplicate datanode
entry should not occur.
                
      was (Author: sureshms):
    bq. PATH still does not solve the Host2NodesMap.getDatanodeByHost (String ipAddr) and
Host2NodesMap.add() inconsistent.This seems to be a hidden danger.
I do not quite follow. Where getDatanodeByHost() is used, it might be okay for the purpose
it is used.

It would be good if you can you respond back to my previous comments? For convenience here
they are:

The description of this jira might not be pointing to an issue. Methods add() and getDatanodeByXferAddr()
are doing the correct thing. See for details my above comment.

What is the branch corresponding to the comment https://issues.apache.org/jira/browse/HDFS-4450?focusedCommentId=13566050&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13566050

Are you seeing duplicate datanode issue? If so, please post the logs.
                  
> Duplicate data node on the name node after formatting data node
> ---------------------------------------------------------------
>
>                 Key: HDFS-4450
>                 URL: https://issues.apache.org/jira/browse/HDFS-4450
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.0.2-alpha
>            Reporter: WenJin Ma
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Duplicate data node on the name node after formatting data node。
> When we registered data node,use nodeReg.getXferPort() to find DatanodeDescriptor.
> {code}
>  DatanodeDescriptor nodeN = host2DatanodeMap.getDatanodeByXferAddr(
>         nodeReg.getIpAddr(), nodeReg.getXferPort());
> {code}
> but add data node use node.getIpAddr().
> {code}
>     /** add node to the map 
>    * return true if the node is added; false otherwise.
>    */
>   boolean add(DatanodeDescriptor node) {
>     hostmapLock.writeLock().lock();
>     try {
>       if (node==null || contains(node)) {
>         return false;
>       }
>       
>       String ipAddr = node.getIpAddr();
>       DatanodeDescriptor[] nodes = map.get(ipAddr);
>       DatanodeDescriptor[] newNodes;
>       if (nodes==null) {
>         newNodes = new DatanodeDescriptor[1];
>         newNodes[0]=node;
>       } else { // rare case: more than one datanode on the host
>         newNodes = new DatanodeDescriptor[nodes.length+1];
>         System.arraycopy(nodes, 0, newNodes, 0, nodes.length);
>         newNodes[nodes.length] = node;
>       }
>       map.put(ipAddr, newNodes);
>       return true;
>     } finally {
>       hostmapLock.writeLock().unlock();
>     }
>   }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message