You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/09/09 02:56:51 UTC
[GitHub] [dolphinscheduler] zuston commented on a change in pull request #6130: [Tests] Fix invalid test case in ProcessUtilsTest.testCancelApplication
zuston commented on a change in pull request #6130:
URL: https://github.com/apache/dolphinscheduler/pull/6130#discussion_r704912496
##########
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:
So directly using `new HadoopUtils(false)` ? Or other approach ?
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org