[
https://issues.apache.org/jira/browse/HBASE-30117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079886#comment-18079886
]
Hudson commented on HBASE-30117:
--------------------------------
Results for branch branch-3
[build #564 on
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/564/]:
(/) *{color:green}+1 overall{color}*
----
details (if available):
(/) {color:green}+1 general checks{color}
-- For more information [see general
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/564/General_20Nightly_20Build_20Report/]
(/) {color:green}+1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/564/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
> 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)