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 B7E297499 for ; Sat, 22 Oct 2011 08:14:58 +0000 (UTC) Received: (qmail 70164 invoked by uid 500); 22 Oct 2011 08:14:58 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 70112 invoked by uid 500); 22 Oct 2011 08:14:57 -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 69921 invoked by uid 99); 22 Oct 2011 08:14:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2011 08:14:56 +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; Sat, 22 Oct 2011 08:14:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BAA68316BC1 for ; Sat, 22 Oct 2011 08:12:33 +0000 (UTC) Date: Sat, 22 Oct 2011 08:12:33 +0000 (UTC) From: "Tomasz Nykiel (Commented) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1946182421.4725.1319271153765.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1236529694.13830.1319078412821.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-2476) More CPU efficient data structure for under-replicated/over-replicated/invalidate blocks 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-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133309#comment-13133309 ] Tomasz Nykiel commented on HDFS-2476: ------------------------------------- Todd, thanks for your comments. I applied your suggestions, and fixed some bugs. The code is essentially what we are using in production. Although, our branch is quite off the trunk, so it's not really one-to-one mapping. There is still some JUnit tests failing, although they seem to be older. The rest of them should pass with the latest patch. > More CPU efficient data structure for under-replicated/over-replicated/invalidate blocks > ---------------------------------------------------------------------------------------- > > Key: HDFS-2476 > URL: https://issues.apache.org/jira/browse/HDFS-2476 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: name-node > Reporter: Tomasz Nykiel > Assignee: Tomasz Nykiel > Attachments: hashStructures.patch, hashStructures.patch-2, hashStructures.patch-3, hashStructures.patch-4, hashStructures.patch-5 > > > This patch introduces two hash data structures for storing under-replicated, over-replicated and invalidated blocks. > 1. LightWeightHashSet > 2. LightWeightLinkedSet > Currently in all these cases we are using java.util.TreeSet which adds unnecessary overhead. > The main bottlenecks addressed by this patch are: > -cluster instability times, when these queues (especially under-replicated) tend to grow quite drastically, > -initial cluster startup, when the queues are initialized, after leaving safemode, > -block reports, > -explicit acks for block addition and deletion > 1. The introduced structures are CPU-optimized. > 2. They shrink and expand according to current capacity. > 3. Add/contains/delete ops are performed in O(1) time (unlike current log n for TreeSet). > 4. The sets are equipped with fast access methods for polling a number of elements (get+remove), which are used for handling the queues. -- 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