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 41644200C01 for ; Thu, 19 Jan 2017 11:23:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3FFF5160B57; Thu, 19 Jan 2017 10:23:33 +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 8A806160B54 for ; Thu, 19 Jan 2017 11:23:32 +0100 (CET) Received: (qmail 71441 invoked by uid 500); 19 Jan 2017 10:23:31 -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 71430 invoked by uid 99); 19 Jan 2017 10:23:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2017 10:23:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2B968C0333 for ; Thu, 19 Jan 2017 10:23:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id HfgpyRPpm5KL for ; Thu, 19 Jan 2017 10:23:30 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 993675FB79 for ; Thu, 19 Jan 2017 10:23:29 +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 5B4F2E8687 for ; Thu, 19 Jan 2017 10:23: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 9AAC225292 for ; Thu, 19 Jan 2017 10:23:26 +0000 (UTC) Date: Thu, 19 Jan 2017 10:23:26 +0000 (UTC) From: "SammiChen (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11152) Start erasure coding policy ID number from 1 instead of 0 to void potential unexpected errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 19 Jan 2017 10:23:33 -0000 [ https://issues.apache.org/jira/browse/HDFS-11152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15829676#comment-15829676 ] SammiChen commented on HDFS-11152: ---------------------------------- Hi [~andrew.wang]] I did some investigation. It seems EC policy ID is not widely used. For examples, 1. For directory, EC policy is saved as XAttr using policy name(policy name doesn't include policy ID). When directory is saved to FsImage, all its XAttrs are saved including EC policy name. 2. For file, EC policy ID is saved in head. When file is saved to FsImage, EC policy ID is saved in replication field. 3. The {{setErasureCodingPolicy}} API, user will provide a {{ErasureCodingPolicy}} parameter, currently only the schema and cell size is used to check if it's a legitimate EC policy, policy ID is not involved in parameter checking. Because currently {{setErasureCodingPolicy}} can only applies to directory. And only policy name is saved on directory. I will enforce the policy ID check in HDFS-10996 implementation which specify per-file policy when create file. 4. File read/write. Double checked {{DFSStripedInputStream}} and {{DFSStripedOutputStream}}, policy ID is not used at all. The schema and cellsize are used. So, later I plan to upload a new patch, adding Precondition checks on FsImage file loading only. Because other spaces use policy name, schema and cell size. > Start erasure coding policy ID number from 1 instead of 0 to void potential unexpected errors > --------------------------------------------------------------------------------------------- > > Key: HDFS-11152 > URL: https://issues.apache.org/jira/browse/HDFS-11152 > Project: Hadoop HDFS > Issue Type: Task > Affects Versions: 3.0.0-alpha1 > Reporter: SammiChen > Assignee: SammiChen > Labels: hdfs-ec-3.0-must-do > Attachments: HDFS-11152-v1.patch > > > This task will change erasure coding policy ID number starting from 1 instead of current 0, to avoid some potential unexpected errors in codes since 0 is default value for integer variables. -- 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