You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/04/07 01:28:24 UTC

[GitHub] [hbase] chrajeshbabu commented on a change in pull request #3124: HBASE-25711 Setting wrong data block encoding through ColumnFamilyDes…

chrajeshbabu commented on a change in pull request #3124:
URL: https://github.com/apache/hbase/pull/3124#discussion_r608279361



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java
##########
@@ -1376,5 +1404,16 @@ public ModifyableColumnFamilyDescriptor setStoragePolicy(String policy) {
       return setValue(STORAGE_POLICY_BYTES, policy);
     }
 
+    /**
+     * Validates values of HBase defined column family attributes.
+     * Throws {@link IllegalArgumentException} if the value of attribute is not proper format.
+     * @param key
+     * @param value
+     */
+    public void validateAttributeValue(Bytes key, Bytes value) {
+      if(ATTRIBUTE_VALIDATOR.containsKey(key)) {
+        ATTRIBUTE_VALIDATOR.get(key).apply(value);

Review comment:
       Printing error message what attribute failed to parse.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org