Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 99504 invoked from network); 15 Apr 2008 00:28:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Apr 2008 00:28:07 -0000 Received: (qmail 92002 invoked by uid 500); 15 Apr 2008 00:28:06 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 91992 invoked by uid 500); 15 Apr 2008 00:28:06 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 91983 invoked by uid 99); 15 Apr 2008 00:28:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2008 17:28:06 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2008 00:27:32 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E202D234C0D5 for ; Mon, 14 Apr 2008 17:25:04 -0700 (PDT) Message-ID: <282944356.1208219104924.JavaMail.jira@brutus> Date: Mon, 14 Apr 2008 17:25:04 -0700 (PDT) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-3254) FSNamesystem.gotHeartbeat(..., Object[] xferResults, Object[] deleteList) should not use Object[] as pass-by-reference parameters In-Reply-To: <1643499367.1208217424809.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tsz Wo (Nicholas), SZE updated HADOOP-3254: ------------------------------------------- Status: Patch Available (was: Open) > 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 > Attachments: 3254_20080414.patch > > > 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.