NihalJain commented on code in PR #6893:
URL: https://github.com/apache/hbase/pull/6893#discussion_r2046120008
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java:
##########
@@ -292,6 +295,18 @@ private boolean prepareCreate(final MasterProcedureEnv
env) throws IOException {
return false;
}
+ // throw exception if invalid configuration is specified
+ try {
+ ConfigKey.validate(new
CompoundConfiguration().addBytesMap(tableDescriptor.getValues()));
+ for (ColumnFamilyDescriptor cfDesc :
tableDescriptor.getColumnFamilies()) {
+ ConfigKey.validate(new
CompoundConfiguration().addStringMap(cfDesc.getConfiguration())
+ .addBytesMap(cfDesc.getValues()));
+ }
+ } catch (Exception e) {
+ setFailure("master-create-table", e);
Review Comment:
maybe pass a new IllegalArgumentException wrapping the exception `e`?
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CreateTableProcedure.java:
##########
@@ -292,6 +295,18 @@ private boolean prepareCreate(final MasterProcedureEnv
env) throws IOException {
return false;
}
+ // throw exception if invalid configuration is specified
+ try {
+ ConfigKey.validate(new
CompoundConfiguration().addBytesMap(tableDescriptor.getValues()));
+ for (ColumnFamilyDescriptor cfDesc :
tableDescriptor.getColumnFamilies()) {
+ ConfigKey.validate(new
CompoundConfiguration().addStringMap(cfDesc.getConfiguration())
+ .addBytesMap(cfDesc.getValues()));
+ }
+ } catch (Exception e) {
+ setFailure("master-create-table", e);
Review Comment:
nit: maybe pass a new IllegalArgumentException wrapping the exception `e`?
--
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]