[ 
https://issues.apache.org/jira/browse/HBASE-30117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079738#comment-18079738
 ] 

Hudson commented on HBASE-30117:
--------------------------------

Results for branch master
        [build #31 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/master/31/]:
 (/) *{color:green}+1 overall{color}*
----
Backwards compatibility checks:
(/) {color:green}+1 jdk17 hadoop 3.3.5 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/master/31/console]


(/) {color:green}+1 jdk17 hadoop 3.3.6 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/master/31/console]


(/) {color:green}+1 jdk17 hadoop 3.4.0 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/master/31/console]


(/) {color:green}+1 jdk17 hadoop 3.4.1 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/master/31/console]


(/) {color:green}+1 jdk17 hadoop 3.4.2 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/master/31/console]


> TableDescriptorChecker should verify CF date-tiered and bloom filter 
> configuration set via setValue
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-30117
>                 URL: https://issues.apache.org/jira/browse/HBASE-30117
>             Project: HBase
>          Issue Type: Bug
>          Components: shell
>            Reporter: JinHyuk Kim
>            Assignee: JinHyuk Kim
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.0.0-beta-2
>
>
> h2. Summary
> The HBase shell {{create}} and {{alter}} commands put {{CONFIGURATION}} 
> entries into the wrong map for column family descriptors. This causes 
> features like {{ROWPREFIX_FIXED_LENGTH}} bloom filter to fail when configured 
> via the shell.
> h2. Problem
> In HBASE-20819, {{set_descriptor_config}} in {{admin.rb}} was changed from 
> {{descriptor.setConfiguration(k, v)}} to {{descriptor.setValue(k, v)}} to 
> support {{TableDescriptorBuilder}} which does not have a {{setConfiguration}} 
> method. However, this change also affects 
> {{{}ColumnFamilyDescriptorBuilder{}}}, where {{setValue}} and 
> {{setConfiguration}} put values into different maps ({{{}values{}}} vs 
> {{{}configuration{}}}).
> When we run:
> {code:java}
> create 'mytable', {NAME => 'f', BLOOMFILTER => 'ROWPREFIX_FIXED_LENGTH',
>   CONFIGURATION => {'RowPrefixBloomFilter.prefix_length' => '4'}}
> {code}
> The {{prefix_length}} is stored in the {{values}} map instead of the 
> {{configuration}} map. {{TableDescriptorChecker.checkBloomFilterType}} reads 
> from {{{}cfd.getConfiguration(){}}}, so it fails with...
> {code:java}
> Caused by: java.lang.IllegalArgumentException: Bloom filter type is 
> ROWPREFIX_FIXED_LENGTH, RowPrefixBloomFilter.prefix_length not specified.
>         at 
> org.apache.hadoop.hbase.util.BloomFilterUtil.getBloomFilterParam(BloomFilterUtil.java:262)
>         at 
> org.apache.hadoop.hbase.util.TableDescriptorChecker.lambda$checkBloomFilterType$6(TableDescriptorChecker.java:323)
>         ... 11 more
> {code}
> The same gap exists in {{checkDateTieredCompactionForTimeRangeDataTiering}}: 
> an invalid combination of {{hbase.hstore.datatiering.type=TIME_RANGE}} with a 
> non-Date-Tiered store engine silently passes validation when set via the 
> shell's {{CONFIGURATION =>}}, because that check also reads only from 
> {{cfd.getConfiguration()}}.
> {code:java}
> # This should fail but succeed
> create 'mytable2', {NAME => 'f', CONFIGURATION => 
> {'hbase.hstore.datatiering.type'  => 'TIME_RANGE', 
> 'hbase.hstore.engine.class' => 
> 'org.apache.hadoop.hbase.regionserver.DefaultStoreEngine'}}
> {code}
> h2. Fix
> Follow the pattern from HBASE-29314 and extend it to the two CF-level 
> validators that were missed. Stack the values map alongside the configuration 
> map via {{CompoundConfiguration}}:                                            
>                                                                            
> {code:java}
> new CompoundConfiguration()
>     .addStringMap(cfd.getConfiguration())]
>     .addBytesMap(cfd.getValues());
> {code}
> Two call sites are updated. {{checkBloomFilterType}} and 
> {{checkDateTieredCompactionForTimeRangeDataTiering}}. No shell or DDL change 
> required; existing user DDL works unchanged.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to