junegunn commented on code in PR #6799:
URL: https://github.com/apache/hbase/pull/6799#discussion_r2085853527
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java:
##########
@@ -79,6 +80,14 @@ public static void sanityCheck(final Configuration c, final
TableDescriptor td)
// Setting logs to warning instead of throwing exception if sanityChecks
are disabled
boolean logWarn = !shouldSanityCheck(conf);
+ // Check value types
+ warnOrThrowExceptionForFailure(logWarn, () -> ConfigKey.validate(conf));
+ warnOrThrowExceptionForFailure(logWarn, () -> {
+ for (ColumnFamilyDescriptor cfd : td.getColumnFamilies()) {
+ ConfigKey.validate(new
CompoundConfiguration().addBytesMap(cfd.getValues()));
Review Comment:
> **The reason is that we get the configuration by using getConfiguration(),
and cannot get it via getValues().**
>
> It's quite strange, but on the master branch, getValues() seems to be able
to access configurations set via CONFIGURATION => {}."
The implementation of the alter command changed in
https://github.com/apache/hbase/pull/1959. It is no longer using
`setConfiguration`, but `setValue`.
```diff
@@ -1381,7 +1437,7 @@ module Hbase
raise(ArgumentError, "#{CONFIGURATION} must be a Hash type") unless
config.is_a?(Hash)
for k, v in config
v = v.to_s unless v.nil?
- descriptor.setConfiguration(k, v)
+ descriptor.setValue(k, v)
end
end
```
Let me open a PR to fix this.
--
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]