zuston commented on a change in pull request #6130:
URL: https://github.com/apache/dolphinscheduler/pull/6130#discussion_r705947023
##########
File path:
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
##########
@@ -90,16 +90,27 @@ public HadoopUtils load(String key) throws Exception {
private Configuration configuration;
private FileSystem fs;
- private HadoopUtils() {
+ private HadoopUtils(boolean initial) {
+ if (!initial) {
+ return;
+ }
init();
initHdfsPath();
}
+ private HadoopUtils() {
+ this(true);
+ }
+
public static HadoopUtils getInstance() {
return cache.getUnchecked(HADOOP_UTILS_KEY);
}
+ public static HadoopUtils getInstanceForTest() {
+ return new HadoopUtils(false);
+ }
+
Review comment:
Could you help give me some suggestions? Have no ideas on it. Thanks~
--
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]