Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1C2CF200C0F for ; Thu, 19 Jan 2017 00:11:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1A9A0160B44; Wed, 18 Jan 2017 23:11:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 63D43160B43 for ; Thu, 19 Jan 2017 00:11:30 +0100 (CET) Received: (qmail 81088 invoked by uid 500); 18 Jan 2017 23:11:29 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 81077 invoked by uid 99); 18 Jan 2017 23:11:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2017 23:11:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B3B7618066C for ; Wed, 18 Jan 2017 23:11:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id UwMtgeaefZ6W for ; Wed, 18 Jan 2017 23:11:27 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8BC715F1EF for ; Wed, 18 Jan 2017 23:11:27 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 26E3FE866F for ; Wed, 18 Jan 2017 23:11:27 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 85A3725288 for ; Wed, 18 Jan 2017 23:11:26 +0000 (UTC) Date: Wed, 18 Jan 2017 23:11:26 +0000 (UTC) From: "Andrew Wang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-8501) Erasure Coding: BlockInfoStriped.removeStorage(..) move storage with same blockIndex to front slot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 18 Jan 2017 23:11:31 -0000 [ https://issues.apache.org/jira/browse/HDFS-8501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Wang updated HDFS-8501: ------------------------------ Parent Issue: HDFS-8425 (was: HDFS-8031) > Erasure Coding: BlockInfoStriped.removeStorage(..) move storage with same blockIndex to front slot > -------------------------------------------------------------------------------------------------- > > Key: HDFS-8501 > URL: https://issues.apache.org/jira/browse/HDFS-8501 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Walter Su > Assignee: Walter Su > Attachments: HDFS-8501-HDFS-7285.01.patch > > > Erasure Coding: Improve memory efficiency of BlockInfoStriped > Assume we have a BlockInfoStriped: > {noformat} > triplets[] = {s0, s1, s2, s3} > indices[] = {0, 1, 2, 3} > {noformat} > {{s0}} means {{storage_0}} > When we run balancer/mover to re-locate replica on s2, firstly it becomes: > {noformat} > triplets[] = {s0, s1, s2, s3, s4} > indices[] = {0, 1, 2, 3, 2} > {noformat} > Then the replica on s2 is removed, finally it becomes: > {noformat} > triplets[] = {s0, s1, null, s3, s4} > indices[] = {0, 1, -1, 3, 2} > {noformat} > The worst case is: > {noformat} > triplets[] = {null, null, null, null, s4, s5, s6, s7} > indices[] = {-1, -1, -1, -1, 0, 1, 2, 3} > {noformat} > We should learn from {{BlockInfoContiguous.removeStorage(..)}}. When a storage is removed, we move the last item front. > With the improvement, the worst case become: > {noformat} > triplets[] = {s4, s5, s6, s7, null} > indices[] = {0, 1, 2, 3, -1} > {noformat} > We have an empty slot. > Notes: > Assume we copy 4 storage first, then delete 4. Even with the improvement, the worst case could be: > {noformat} > triplets[] = {s4, s5, s6, s7, null, null, null, null} > indices[] = {0, 1, 2, 3, -1, -1, -1, -1} > {noformat} > But the Balancer uses {{delHint}}. So when add one will always delete one. So this case won't happen for striped and contiguous blocks. > *idx_i must be moved to slot_i.* So slot_i will have idx_i. So we can do further improvement in HDFS-8032. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org