hangc0276 commented on code in PR #20736:
URL: https://github.com/apache/pulsar/pull/20736#discussion_r1255164974


##########
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/OffloadPoliciesImpl.java:
##########
@@ -61,12 +61,23 @@ public class OffloadPoliciesImpl implements Serializable, 
OffloadPolicies {
         CONFIGURATION_FIELDS = Collections.unmodifiableList(temp);
     }
 
+    public static final ImmutableList<String> INTERNAL_SUPPORTED_DRIVER = 
ImmutableList.of("S3",
+        "aws-s3", "google-cloud-storage", "filesystem", "azureblob", 
"aliyun-oss");
+    public static final ImmutableList<String> DRIVER_NAMES;
+    static {
+        String extraDrivers = 
System.getProperty("pulsar.extra.offload.drivers", "");
+        if (extraDrivers.trim().isEmpty()) {
+            DRIVER_NAMES = INTERNAL_SUPPORTED_DRIVER;
+        } else {
+            DRIVER_NAMES = 
ImmutableList.<String>builder().addAll(INTERNAL_SUPPORTED_DRIVER)
+                    .addAll(Arrays.asList(StringUtils.split(extraDrivers, 
','))).build();

Review Comment:
   We need to trim the string for each driver's name after the split.



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

Reply via email to