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 2A01F200BF3 for ; Thu, 5 Jan 2017 10:53:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 28767160B27; Thu, 5 Jan 2017 09:53:00 +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 72F1F160B26 for ; Thu, 5 Jan 2017 10:52:59 +0100 (CET) Received: (qmail 38419 invoked by uid 500); 5 Jan 2017 09:52:58 -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 38405 invoked by uid 99); 5 Jan 2017 09:52:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2017 09:52:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6BF602C2A68 for ; Thu, 5 Jan 2017 09:52:58 +0000 (UTC) Date: Thu, 5 Jan 2017 09:52:58 +0000 (UTC) From: "Ewan Higgs (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10759) Change fsimage bool isStriped from boolean to an enum MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 05 Jan 2017 09:53:00 -0000 [ https://issues.apache.org/jira/browse/HDFS-10759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15800934#comment-15800934 ] Ewan Higgs commented on HDFS-10759: ----------------------------------- The TestWebHDFS* test failues appear to have been impacted by HDFS-11280. A patch was committed and then reverted and has since been fixed. > Change fsimage bool isStriped from boolean to an enum > ----------------------------------------------------- > > Key: HDFS-10759 > URL: https://issues.apache.org/jira/browse/HDFS-10759 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs > Affects Versions: 3.0.0-alpha1, 3.0.0-beta1, 3.0.0-alpha2 > Reporter: Ewan Higgs > Labels: hdfs-ec-3.0-must-do > Attachments: HDFS-10759.0001.patch, HDFS-10759.0002.patch, HDFS-10759.0003.patch > > > The new erasure coding project has updated the protocol for fsimage such that the {{INodeFile}} has a boolean '{{isStriped}}'. I think this is better as an enum or integer since a boolean precludes any future block types. > For example: > {code} > enum BlockType { > CONTIGUOUS = 0, > STRIPED = 1, > } > {code} > We can also make this more robust to future changes where there are different block types supported in a staged rollout. Here, we would use {{UNKNOWN_BLOCK_TYPE}} as the first value since this is the default value. See [here|http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/] for more discussion. > {code} > enum BlockType { > UNKNOWN_BLOCK_TYPE = 0, > CONTIGUOUS = 1, > STRIPED = 2, > } > {code} > But I'm not convinced this is necessary since there are other enums that don't use this approach. -- 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