EricGao888 commented on code in PR #11708:
URL: https://github.com/apache/dolphinscheduler/pull/11708#discussion_r962432274
##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/config/StoreConfiguration.java:
##########
@@ -41,6 +43,10 @@ public class StoreConfiguration {
@Bean
public StorageOperate storageOperate() {
switch (PropertyUtils.getString(RESOURCE_STORAGE_TYPE)) {
+ case STORAGE_OSS:
+ OssOperator ossOperator = OssOperator.getInstance();
+ ossOperator.init();
Review Comment:
This is also for code-decoupling and testing purpose. If we put this in the
constructor, `oss client` will get instantiated in the constructor. As a
result, we lose control of the instantiation of the external class and could
not inject the corresponding mock during testing.
--
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]