NihalJain commented on code in PR #6893:
URL: https://github.com/apache/hbase/pull/6893#discussion_r2035745046


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java:
##########
@@ -230,11 +235,16 @@ private static void checkCompactionPolicy(final 
Configuration conf, final TableD
       }
 
       for (ColumnFamilyDescriptor hcd : td.getColumnFamilies()) {
+        Configuration cfConf =
+          new 
CompoundConfiguration().add(conf).addStringMap(hcd.getConfiguration());
         String compactionPolicy =
-          
hcd.getConfigurationValue(DefaultStoreEngine.DEFAULT_COMPACTION_POLICY_CLASS_KEY);
-        if (compactionPolicy == null) {
-          compactionPolicy = className;
+          cfConf.get(DefaultStoreEngine.DEFAULT_COMPACTION_POLICY_CLASS_KEY, 
className);

Review Comment:
   We can modify 
[`checkClassLoading`](https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/util/TableDescriptorChecker.java#L309)
 for compaction policy as well. I prefer doing it similar to how we do for 
[`RegionSplitPolicy`](https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionSplitPolicy.java#L106)
   
   Also since this can cause issues it is okay to guard against it even in 
CreateTableProcedure or other affected places as you were doing in original 
commit. We do similar for 
[`SplitTableRegionProcedure`](https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java#L144)



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