Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 16417 invoked from network); 28 Jul 2006 12:03:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jul 2006 12:03:41 -0000 Received: (qmail 28356 invoked by uid 500); 28 Jul 2006 12:03:40 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 28196 invoked by uid 500); 28 Jul 2006 12:03:40 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 28187 invoked by uid 99); 28 Jul 2006 12:03:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 05:03:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 05:03:39 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 413DA41000A for ; Fri, 28 Jul 2006 12:01:15 +0000 (GMT) Message-ID: <3202850.1154088075264.JavaMail.jira@brutus> Date: Fri, 28 Jul 2006 05:01:15 -0700 (PDT) From: "Devaraj Das (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Commented: (HADOOP-395) infoPort field should be a DatanodeID member In-Reply-To: <20953780.1154040013956.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HADOOP-395?page=comments#action_12424076 ] Devaraj Das commented on HADOOP-395: ------------------------------------ Noticed now that Konstantin's patch for Hadoop-396 will make this patch go stale. So I will submit another patch after Konstantin's patch is committed. Please don't commit this patch for now. > infoPort field should be a DatanodeID member > -------------------------------------------- > > Key: HADOOP-395 > URL: http://issues.apache.org/jira/browse/HADOOP-395 > Project: Hadoop > Issue Type: Improvement > Affects Versions: 0.4.0 > Reporter: Konstantin Shvachko > Assigned To: Devaraj Das > Fix For: 0.5.0 > > Attachments: refactor_infoport.patch > > > I have a couple of comments on HADOOP-375. Sorry missed that discussion when the patch was under construction. > 1) As it is done now infoPort is a member of two classes DatanodeInfo and DatanodeRegistration, which in fact have a > common base DatanodeID. It seems more logical to place infoPort into DatanodeID. This will let us handle the port > assignments inside the constructors rather than outside, and will prevent from unsafe "dynamic casts" like the one > found in FSNamesystem.gotHeartbeat( DatanodeID nodeID, ... ) > nodeinfo.infoPort = ((DatanodeRegistration)nodeID).infoPort; > 2) Also, should we make infoPort short rather than integer? > Since it is a part of a heartbeat message we might want keeping it small. > 3) Member getters should start with get > - public int infoPort() { return infoPort; } > + public int getInfoPort() { return infoPort; } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira