OIiveirra commented on code in PR #68585:
URL: https://github.com/apache/doris/pull/68585#discussion_r4140348406
##########
fe/fe-filesystem/fe-filesystem-hdfs-base/src/main/java/org/apache/doris/filesystem/hdfs/properties/HdfsPropertiesUtils.java:
##########
@@ -218,10 +218,14 @@ public static void checkHaConfig(Map<String, String>
hdfsProperties) {
// No nameservice configured => HA is not enabled, nothing to
validate
return;
}
- for (String dfsservice : splitAndTrim(dfsNameservices)) {
- if (dfsservice.isEmpty()) {
- continue;
- }
+ if (Arrays.stream(dfsNameservices.split(",",
-1)).anyMatch(StringUtils::isBlank)) {
Review Comment:
Addressed in `a96f797dec1`. Runtime binding now tolerates the historical
trailing empty token in `dfs.nameservices=ns1,`, while DDL validation still
rejects an empty nameservice list. HDFS unit and regression coverage pass.
##########
fe/fe-core/src/main/java/org/apache/doris/fs/FileSystemFactory.java:
##########
@@ -137,14 +137,14 @@ public static
List<org.apache.doris.filesystem.properties.StorageProperties> bin
System.setProperty("doris.hadoop.config.dir",
Config.hadoop_config_dir);
FileSystemPluginManager mgr = pluginManager;
if (mgr != null) {
- return new ArrayList<>(mgr.bindAll(properties));
+ return new
ArrayList<>(mgr.bindAll(StorageAdapter.withHadoopConfigDir(properties)));
Review Comment:
Addressed in `7a774b54d1b` and `734acab1629`. Absolute Hadoop resource paths
are preserved when a default config directory is present, and the HDFS unit
test covers this case.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/plugin/PluginDrivenExternalCatalog.java:
##########
@@ -253,11 +256,27 @@ 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;
+ }
+ try {
+
FileSystemFactory.bindAllStorageProperties(property.getProperties());
Review Comment:
Addressed in `ccd6c398ee1`. CREATE and ALTER validate detached catalog
snapshots outside the global write lock, then recheck catalog identity and
properties before publishing. Concurrent changes retry safely.
--
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]