Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 42338 invoked from network); 28 Sep 2010 21:05:04 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 21:05:04 -0000 Received: (qmail 1559 invoked by uid 500); 28 Sep 2010 21:05:04 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 1378 invoked by uid 500); 28 Sep 2010 21:05:03 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 1273 invoked by uid 99); 28 Sep 2010 21:05:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 21:05:03 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 21:05:01 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8SL4dtR004338 for ; Tue, 28 Sep 2010 21:04:39 GMT Message-ID: <16641401.451131285707879455.JavaMail.jira@thor> Date: Tue, 28 Sep 2010 17:04:39 -0400 (EDT) From: "Hairong Kuang (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Commented: (HDFS-1368) Add a block counter to DatanodeDescriptor In-Reply-To: <33473523.2431283468674078.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HDFS-1368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915923#action_12915923 ] Hairong Kuang commented on HDFS-1368: ------------------------------------- Yes, you are right. It's BlockInfo defined in BlocksMap. I will create a patch to remove this method. > Add a block counter to DatanodeDescriptor > ----------------------------------------- > > Key: HDFS-1368 > URL: https://issues.apache.org/jira/browse/HDFS-1368 > Project: Hadoop HDFS > Issue Type: Improvement > Components: name-node > Reporter: Hairong Kuang > Assignee: Hairong Kuang > Fix For: 0.22.0 > > Attachments: blockCounter.patch > > > Many of time, we need to count the total number of blocks in a datanode by calling DatanodeDescriptor#numBlocks(). It has to traverse the block list to get the counter, which may not be trivial if there are millions of blocks. Adding a counter for each datanode does not cost much space but help save CPU processing time. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.