hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2228) Move block and datanode code from FSNamesystem to BlockManager and DatanodeManager
Date Mon, 08 Aug 2011 06:58:27 GMT

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

Uma Maheswara Rao G commented on HDFS-2228:

Hi Nicholas,
I have gone through the changes.
Please check my comments below.

1)*DatanodeManager.java* :

 can we check method name and correct it? 
  Not related to this patch changes, but as part of this refactoring can we correct this typo.

  // we need to call DFSNodeStatus to filter out the dead data nodes
    blockManager.getDatanodeManager().fetchDatanodess(null, dead, true);
    for (DatanodeDescriptor node : dead) {

can you please update the comment.

3) can't we move blockrecieved method logic to BlockManager and just delegete the call from

4) can't we move below validations also to blockManager.processReport?


   final DatanodeDescriptor node = blockManager.getDatanodeManager(
      if (node == null || !node.isAlive) {
        throw new IOException("ProcessReport from dead or unregistered node: "
                              + nodeID.getName());
      // To minimize startup time, we discard any second (or later) block reports
      // that we receive while still in startup phase.
      if (isInStartupSafeMode() && node.numBlocks() > 0) {
        NameNode.stateChangeLog.info("BLOCK* NameSystem.processReport: "
            + "discarded non-initial block report from " + nodeID.getName()
            + " because namenode still in startup phase");

  5) I think getAdditionalBlock logic also should move to blockManager. no?

  6) Similar to above, getAdditionalDatanode logic also to DatanodeManager.

  7) Same as above, abandonBlock also may be blockManager's responsibility. No?
     But here i have one cocenrn, if we just move code from FSNameSystem to BlockManager,
     to romove the block we may need to contact FSNameSystem back.
     Because FSNameSystem is holding the FSDirectory. This looks may be a kind cycle. So,
can we check some better option? 

     allocateBlock also same.

   8) can we move datanodeReport also to DatanodeManager?


> Move block and datanode code from FSNamesystem to BlockManager and DatanodeManager
> ----------------------------------------------------------------------------------
>                 Key: HDFS-2228
>                 URL: https://issues.apache.org/jira/browse/HDFS-2228
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h2228_20110805.patch, h2228_20110805b.patch, h2228_20110805c.patch

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message