CalvinKirs commented on code in PR #50849:
URL: https://github.com/apache/doris/pull/50849#discussion_r2096787403


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/BrokerDesc.java:
##########
@@ -150,16 +171,18 @@ public void readFields(DataInput in) throws IOException {
             final String val = Text.readString(in);
             properties.put(key, val);
         }
-        StorageBackend.StorageType st = StorageBackend.StorageType.BROKER;
-        String typeStr = properties.remove(PersistentFileSystem.STORAGE_TYPE);
-        if (typeStr != null) {
+        if (MapUtils.isNotEmpty(properties)) {
             try {
-                st = StorageBackend.StorageType.valueOf(typeStr);
-            }  catch (IllegalArgumentException e) {
-                LOG.warn("set to BROKER, because of exception", e);
+                this.storageProperties = 
StorageProperties.createPrimary(properties);
+                this.storageType = 
StorageBackend.StorageType.valueOf(storageProperties.getStorageName());
+            } catch (RuntimeException e) {
+                // Currently ignored: these properties might be 
broker-specific.
+                // Support for broker properties will be added in the future.
+                LOG.warn("Failed to create storage properties for broker: {}, 
properties: {}", name, properties, e);
+                this.storageType = StorageBackend.StorageType.BROKER;

Review Comment:
   For scenarios that require persistence, when no specific type is provided, 
we default to using the "broker" type. Based on that, we then check whether 
it's actually S3, HDFS, or another supported type. If the new parameter can't 
be parsed or recognized, we fall back to the "broker" type.



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

Reply via email to