From 966201af8648031c19246824e69b0f0b847adf33 Mon Sep 17 00:00:00 2001 From: Aaron Wang Date: Sat, 11 Feb 2023 13:12:44 +0800 Subject: [PATCH] [BUG][Resource Center] NPE caused by uninitialized hdfsProperties (#13540) * [BUG][Resource Center] NPE caused by uninitialized hdfsProperties * [BUG][Resource Center] NPE caused by uninitialized hdfsProperties --- .../plugin/storage/hdfs/HdfsStorageOperator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-storage-plugin/dolphinscheduler-storage-hdfs/src/main/java/org/apache/dolphinscheduler/plugin/storage/hdfs/HdfsStorageOperator.java b/dolphinscheduler-storage-plugin/dolphinscheduler-storage-hdfs/src/main/java/org/apache/dolphinscheduler/plugin/storage/hdfs/HdfsStorageOperator.java index 80edb15455..a416cd07d6 100644 --- a/dolphinscheduler-storage-plugin/dolphinscheduler-storage-hdfs/src/main/java/org/apache/dolphinscheduler/plugin/storage/hdfs/HdfsStorageOperator.java +++ b/dolphinscheduler-storage-plugin/dolphinscheduler-storage-hdfs/src/main/java/org/apache/dolphinscheduler/plugin/storage/hdfs/HdfsStorageOperator.java @@ -76,7 +76,7 @@ import com.google.common.cache.LoadingCache; @Slf4j public class HdfsStorageOperator implements Closeable, StorageOperate { - private static HdfsStorageProperties hdfsProperties; + private static HdfsStorageProperties hdfsProperties = new HdfsStorageProperties(); private static final String HADOOP_UTILS_KEY = "HADOOP_UTILS_KEY"; private static final LoadingCache cache = CacheBuilder @@ -85,7 +85,7 @@ public class HdfsStorageOperator implements Closeable, StorageOperate { .build(new CacheLoader() { @Override - public HdfsStorageOperator load(String key) throws Exception { + public HdfsStorageOperator load(String key) { return new HdfsStorageOperator(hdfsProperties); } });