Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE2499403 for ; Fri, 21 Oct 2011 15:14:53 +0000 (UTC) Received: (qmail 5163 invoked by uid 500); 21 Oct 2011 15:14:53 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 5134 invoked by uid 500); 21 Oct 2011 15:14:53 -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 5125 invoked by uid 99); 21 Oct 2011 15:14:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 15:14:53 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 15:14:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 623C7315484 for ; Fri, 21 Oct 2011 15:12:33 +0000 (UTC) Date: Fri, 21 Oct 2011 15:12:33 +0000 (UTC) From: "Steve Loughran (Created) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <836679162.1323.1319209953403.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (HDFS-2486) Review issues with UnderReplicatedBlocks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Review issues with UnderReplicatedBlocks ---------------------------------------- Key: HDFS-2486 URL: https://issues.apache.org/jira/browse/HDFS-2486 Project: Hadoop HDFS Issue Type: Task Components: name-node Affects Versions: 0.23.0 Reporter: Steve Loughran Priority: Minor Here are some things I've noted in the UnderReplicatedBlocks class that someone else should review and consider if the code is correct. If not, they are easy to fix. remove(Block block, int priLevel) is not synchronized, and as the inner classes are not, there is a risk of race conditions there. some of the code assumes that getPriority can return the value LEVEL, and if so does not attempt to queue the blocks. As this return value is not currently possible, those checks can be removed. The queue gives priority to blocks whose replication count is less than a third of its expected count over those that are "normally under replicated". While this is good for ensuring that files scheduled for large replication are replicated fast, it may not be the best strategy for maintaining data integrity. For that it may be better to give whichever blocks have only two replicas priority over blocks that may, for example, already have 3 out of 10 copies in the filesystem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira