Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21732

Should call toUpperCase before using Enum.valueOf in some methods for ColumnFamilyDescriptor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0, 2.2.0, 2.1.3, 2.0.5
    • Component/s: Client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Now all the Enum configs in ColumnFamilyDescriptor can accept lower case config value.

      Description

      When upgrading we faced a problem that the some regions can not be opened due to the region server can not recognize the lower case 'snappy' config. In code for branch-1, we have done this

        public Compression.Algorithm getCompression() {
          String n = getValue(COMPRESSION);
          if (n == null) {
            return Compression.Algorithm.NONE;
          }
          return Compression.Algorithm.valueOf(n.toUpperCase(Locale.ROOT));
        }
      

      But in the code of 2.0+, we just call valueOf.

        Attachments

        1. HBASE-21732.patch
          10 kB
          Duo Zhang

          Issue Links

            Activity

              People

              • Assignee:
                zhangduo Duo Zhang
                Reporter:
                zhangduo Duo Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: