Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 51559 invoked from network); 5 Aug 2009 00:02:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 00:02:34 -0000 Received: (qmail 27081 invoked by uid 500); 5 Aug 2009 00:02:39 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 27031 invoked by uid 500); 5 Aug 2009 00:02:39 -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 27017 invoked by uid 99); 5 Aug 2009 00:02:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 00:02:39 +0000 X-ASF-Spam-Status: No, hits=-1998.8 required=10.0 tests=ALL_TRUSTED,FS_REPLICA 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; Wed, 05 Aug 2009 00:02:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 06E9929A0013 for ; Tue, 4 Aug 2009 17:02:15 -0700 (PDT) Message-ID: <1221777810.1249430535013.JavaMail.jira@brutus> Date: Tue, 4 Aug 2009 17:02:15 -0700 (PDT) From: "Bill Zeller (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Commented: (HDFS-492) Expose corrupt replica/block information In-Reply-To: <1200608450.1247682734953.JavaMail.jira@brutus> 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-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739258#action_12739258 ] Bill Zeller commented on HDFS-492: ---------------------------------- The second argument is the startingBlockId, not the starting block offset. Passing 0 indicates a block id of 0. This function could be special cased to treat 0 to mean to start from the beginning and assume that no real block id would ever have the value 0, but this seems to be dirtier than just using {{null}}. > Expose corrupt replica/block information > ---------------------------------------- > > Key: HDFS-492 > URL: https://issues.apache.org/jira/browse/HDFS-492 > Project: Hadoop HDFS > Issue Type: New Feature > Components: data-node, name-node > Affects Versions: 0.21.0 > Reporter: Bill Zeller > Assignee: Bill Zeller > Priority: Minor > Fix For: 0.21.0 > > Attachments: hdfs-492-4.patch, hdfs-492-5.patch > > Original Estimate: 48h > Remaining Estimate: 48h > > This adds two additional functions to FSNamesystem to provide more information about corrupt replicas. It also adds two servlets to the namenode that provide information (in JSON) about all blocks with corrupt replicas as well as information about a specific block. It also changes the file browsing servlet by adding a link from block ids to the above mentioned block information page. > These JSON pages are designed to be used by client side tools which wish to analyze corrupt block/replicas. The only change to an existing (non-servlet) class is described below. > Currently, CorruptReplicasMap stores a map of corrupt replica information and allows insertion and deletion. It also gives information about the corrupt replicas for a specific block. It does not allow iteration over all corrupt blocks. Two additional functions will be added to FSNamesystem (which will call BlockManager which will call CorruptReplicasMap). The first will return the size of the corrupt replicas map, which represents the number of blocks that have corrupt replicas (but less than the number of corrupt replicas if a block has multiple corrupt replicas). The second will allow "paging" through a list of block ids that contain corrupt replicas: > {{public synchronized List getCorruptReplicaBlockIds(int n, Long startingBlockId)}} > {{n}} is the number of block ids to return and {{startingBlockId}} is the block id offset. To prevent a large number of items being returned at one time, n is constrained to 0 <= {{n}} <= 100. If {{startingBlockId}} is null, up to {{n}} items are returned starting at the beginning of the list. Ordering is enforced through the internal use of TreeMap in CorruptReplicasMap. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.