guluo2016 commented on code in PR #6799:
URL: https://github.com/apache/hbase/pull/6799#discussion_r2084374632


##########
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:
   Based on this branch, I  found a bug: 
   When creating a table, if column family-level configurations are specified 
using CONFIGURATION => {}, they are not properly checked. 
   ```
    create 't03', 'info', { CONFIGURATION => { 
'hbase.hstore.defaultengine.compactionpolicy.class' => 'com.test.App' }}
   ```
   **The reason is that we get the configuration by using getConfiguration(), 
and cannot be accessed via getValues().**
   
   It's quite strange, but on the master branch, getValues() seems to be able 
to access configurations set via CONFIGURATION => {}."
   
   @junegunn @Apache9  Could you take another look? thanks.



-- 
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]

Reply via email to