hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ewan Higgs (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-10759) Change fsimage bool isStriped from boolean to an enum
Date Fri, 12 Aug 2016 15:28:20 GMT
Ewan Higgs created HDFS-10759:

             Summary: 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

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:

enum BlockType {
  STRIPED = 1,
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.

enum BlockType {
  STRIPED = 2,

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

To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org

View raw message