[
https://issues.apache.org/jira/browse/HBASE-21732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16743844#comment-16743844
]
Duo Zhang commented on HBASE-21732:
-----------------------------------
Ping [~zghaobac] for reviewing.
The fix is simple, just call toUpperCase before calling valueOf for all enum
values in ColumnFamilyDescriptorBuilder. And add a UT to confirm that all enum
values can accept lower case values.
> Should call toUpperCase before using Enum.valueOf in some methods for
> ColumnFamilyDescriptor
> --------------------------------------------------------------------------------------------
>
> Key: HBASE-21732
> URL: https://issues.apache.org/jira/browse/HBASE-21732
> Project: HBase
> Issue Type: Bug
> Components: Client
> Reporter: Duo Zhang
> Assignee: Duo Zhang
> Priority: Critical
> Fix For: 3.0.0, 2.2.0, 2.1.3, 2.0.5
>
> Attachments: HBASE-21732.patch
>
>
> 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
> {code}
> public Compression.Algorithm getCompression() {
> String n = getValue(COMPRESSION);
> if (n == null) {
> return Compression.Algorithm.NONE;
> }
> return Compression.Algorithm.valueOf(n.toUpperCase(Locale.ROOT));
> }
> {code}
> But in the code of 2.0+, we just call valueOf.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)