jinhyukify commented on code in PR #8144:
URL: https://github.com/apache/hbase/pull/8144#discussion_r3180699873
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java:
##########
@@ -233,8 +233,8 @@ private static void
checkDateTieredCompactionForTimeRangeDataTiering(final Confi
checkDateTieredCompactionForTimeRangeDataTiering(conf);
for (ColumnFamilyDescriptor cfd : td.getColumnFamilies()) {
// Column family level configurations
- Configuration cfdConf =
- new
CompoundConfiguration().add(conf).addStringMap(cfd.getConfiguration());
+ Configuration cfdConf = new CompoundConfiguration().add(conf)
+ .addStringMap(cfd.getConfiguration()).addBytesMap(cfd.getValues());
Review Comment:
This will fix this bug:
### Before
```
# 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'}}
```
### After
```
# This fails
create 'mytable2', {NAME => 'f', CONFIGURATION =>
{'hbase.hstore.datatiering.type' => 'TIME_RANGE', 'hbase.hstore.engine.class'
=> 'org.apache.hadoop.hbase.regionserver.DefaultStoreEngine'}}
ERROR: org.apache.hadoop.hbase.DoNotRetryIOException: Time Range Data
Tiering should be enabled with Date Tiered Compaction. Set
hbase.table.sanity.checks to false at conf or table descriptor if you want to
bypass sanity checks
at
org.apache.hadoop.hbase.util.TableDescriptorChecker.warnOrThrowExceptionForFailure(TableDescriptorChecker.java:365)
at
org.apache.hadoop.hbase.util.TableDescriptorChecker.warnOrThrowExceptionForFailure(TableDescriptorChecker.java:382)
at
org.apache.hadoop.hbase.util.TableDescriptorChecker.checkDateTieredCompactionForTimeRangeDataTiering(TableDescriptorChecker.java:247)
at
org.apache.hadoop.hbase.util.TableDescriptorChecker.checkDateTieredCompactionForTimeRangeDataTiering(TableDescriptorChecker.java:238)
at
org.apache.hadoop.hbase.util.TableDescriptorChecker.sanityCheck(TableDescriptorChecker.java:210)
at
org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:2494)
at
org.apache.hadoop.hbase.master.MasterRpcServices.createTable(MasterRpcServices.java:792)
at
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:461)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124)
at org.apache.hadoop.hbase.ipc.RpcHandler.run(RpcHandler.java:102)
at org.apache.hadoop.hbase.ipc.RpcHandler.run(RpcHandler.java:82)
Caused by: java.lang.IllegalArgumentException: Time Range Data Tiering
should be enabled with Date Tiered Compaction.
at
org.apache.hadoop.hbase.util.TableDescriptorChecker.lambda$checkDateTieredCompactionForTimeRangeDataTiering$4(TableDescriptorChecker.java:253)
at
org.apache.hadoop.hbase.util.TableDescriptorChecker.warnOrThrowExceptionForFailure(TableDescriptorChecker.java:380)
... 10 more
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]