hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "WenJin Ma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4450) Duplicate data node on the name node after formatting data node
Date Fri, 01 Feb 2013 03:05:13 GMT

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

WenJin Ma commented on HDFS-4450:
---------------------------------

{quote}
Thank you for more details. Can you post the lines from the logs that corresponds to datanode
dn0 registration corresponding to before format and after format?
{quote}

1.shutdown dataonode dn0
2013-02-01 10:56:49,667 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down DataNode at dn0/10.28.176.234
************************************************************/

2.remove data files of datanode.

3.restart datganode

2013-02-01 10:59:46,123 INFO org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl:
Added volume - /home/data/geminifs_datanode/current
2013-02-01 10:59:46,131 INFO org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl:
Registered FSDatasetState MBean
2013-02-01 10:59:46,135 INFO org.apache.hadoop.hdfs.server.datanode.DirectoryScanner: Periodic
Directory Tree Verification scan starting at 1359687909135 with interval 21600000
2013-02-01 10:59:46,137 INFO org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl:
Adding block pool BP-1769818311-192.168.0.2-1359357823687
2013-02-01 10:59:46,144 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool BP-1769818311-192.168.0.2-1359357823687
(storage id DS-685519412-10.28.176.234-50010-1359684666375) service to nnmaster/192.168.0.1:9000
beginning handshake with NN
2013-02-01 10:59:46,151 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool Block
pool BP-1769818311-192.168.0.2-1359357823687 (storage id DS-685519412-10.28.176.234-50010-1359684666375)
service to nnmaster/192.168.0.1:9000 successfully registered with NN
2013-02-01 10:59:46,151 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: For namenode
nnmaster/192.168.0.1:9000 using DELETEREPORT_INTERVAL of 300000 msec  BLOCKREPORT_INTERVAL
of 21600000msec Initial delay: 0msec; heartBeatInterval=3000
2013-02-01 10:59:46,176 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Namenode Block
pool BP-1769818311-192.168.0.2-1359357823687 (storage id DS-685519412-10.28.176.234-50010-1359684666375)
service to nnmaster/192.168.0.1:9000 trying to claim ACTIVE state with txid=3142
2013-02-01 10:59:46,176 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Acknowledging
ACTIVE Namenode Block pool BP-1769818311-192.168.0.2-1359357823687 (storage id DS-685519412-10.28.176.234-50010-1359684666375)
service to nnmaster/192.168.0.1:9000
                
> 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
>         Attachments: exception.bmp, normal.bmp
>
>   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