Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10759

Change fsimage bool isStriped from boolean to an enum

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1, 3.0.0-beta1, 3.0.0-alpha2
    • Fix Version/s: 3.0.0-alpha2
    • Component/s: hdfs

      Description

      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 {
        CONTIGUOUS = 0,
        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 for more discussion.

      enum BlockType {
        UNKNOWN_BLOCK_TYPE = 0,
        CONTIGUOUS = 1,
        STRIPED = 2,
      }
      

      But I'm not convinced this is necessary since there are other enums that don't use this approach.

        Attachments

        1. HDFS-10759.0004.patch
          72 kB
          Ewan Higgs
        2. HDFS-10759.0003.patch
          68 kB
          Ewan Higgs
        3. HDFS-10759.0002.patch
          69 kB
          Ewan Higgs
        4. HDFS-10759.0001.patch
          69 kB
          Ewan Higgs

          Issue Links

            Activity

              People

              • Assignee:
                ehiggs Ewan Higgs
                Reporter:
                ehiggs Ewan Higgs
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: