hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Created: (HADOOP-3254) FSNamesystem.gotHeartbeat(..., Object[] xferResults, Object[] deleteList) should not use Object[] as pass-by-reference parameters
Date Mon, 14 Apr 2008 23:57:04 GMT
FSNamesystem.gotHeartbeat(..., Object[] xferResults, Object[] deleteList) should not use Object[]
as pass-by-reference parameters
---------------------------------------------------------------------------------------------------------------------------------

                 Key: HADOOP-3254
                 URL: https://issues.apache.org/jira/browse/HADOOP-3254
             Project: Hadoop Core
          Issue Type: Improvement
          Components: dfs
            Reporter: Tsz Wo (Nicholas), SZE
            Assignee: Tsz Wo (Nicholas), SZE


In FSNamesystem.gotHeartbeat(..., Object[] xferResults, Object[] deleteList), xferResults
initially equals to Object[] { null, null}.  If there are blocks to be replicated, xferResults[0]
and xferResults[1] will be set to a Block[] and DatanodeInfo[][], respectively.  The caller
of gotHeartbeat will cast these object to the original classes.  For example, in NameNode.sendHeartbeat(...),
{code}
    if (xferResults[0] != null) {
      assert(deleteList[0] == null);
      return new BlockCommand((Block[]) xferResults[0], (DatanodeInfo[][]) xferResults[1]);
    }
{code}
The use of deleteList is similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message