github-actions[bot] commented on code in PR #68585:
URL: https://github.com/apache/doris/pull/68585#discussion_r4140707556
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/plugin/PluginDrivenExternalCatalog.java:
##########
@@ -253,11 +256,33 @@ public boolean validatePropertiesBeforeUpdate(
} catch (IllegalArgumentException e) {
throw new DdlException(e.getMessage(), e);
}
+ validateStorageProperties(candidateProperty);
checkDriverUrlsAgainstOperatorGate(candidate, updatedProperties);
ExternalFunctionRules.check(candidateProperty.getOrDefault("function_rules",
null));
return true;
}
+ /**
+ * Bind Hive catalog storage properties during DDL validation so HDFS
configuration errors are
+ * reported by CREATE/ALTER instead of being deferred until the first
table access.
+ */
+ private void validateStorageProperties(CatalogProperty property) throws
DdlException {
+ if (!"hms".equalsIgnoreCase(getType())) {
+ return;
+ }
+ String nameservices = property.getProperties().get("dfs.nameservices");
+ if (nameservices != null
+ && java.util.Arrays.stream(nameservices.split(","))
+ .map(String::trim).noneMatch(value -> !value.isEmpty())) {
+ throw new DdlException("Property dfs.nameservices must contain a
nameservice");
Review Comment:
[P2] Check empty nameservices only when the ALTER supplies them. A
previously stored HMS catalog with `dfs.nameservices=,` replays and binds
successfully because runtime HA parsing now tolerates an empty service list.
But `validatePropertiesBeforeUpdate` passes the merged candidate here, so
`ALTER CATALOG ... SET PROPERTIES ("test_connection"="false")` fails with this
error despite not changing HDFS settings. The earlier inline thread addressed
runtime readability; this is a separate ALTER regression. Apply this
statement-time rejection to an explicitly submitted `dfs.nameservices` value,
while letting untouched legacy values pass the runtime-compatible bind.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]