This is an automated email from the ASF dual-hosted git repository.
sunzesong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new fb4a0af [IOTDB-550] Fix TSMRWriteExample executes unsuccessfully
(#895)
new 66eb044 Merge remote-tracking branch 'upstream/master' into master1
fb4a0af is described below
commit fb4a0af9d286f2dd5e347b19987380d820e698fd
Author: Zesong Sun <[email protected]>
AuthorDate: Mon Mar 9 20:22:33 2020 +0800
[IOTDB-550] Fix TSMRWriteExample executes unsuccessfully (#895)
---
.../main/java/org/apache/iotdb/hadoop/fileSystem/HDFSConfUtil.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/hadoop/src/main/java/org/apache/iotdb/hadoop/fileSystem/HDFSConfUtil.java
b/hadoop/src/main/java/org/apache/iotdb/hadoop/fileSystem/HDFSConfUtil.java
index df0189b..bddf1f6 100644
--- a/hadoop/src/main/java/org/apache/iotdb/hadoop/fileSystem/HDFSConfUtil.java
+++ b/hadoop/src/main/java/org/apache/iotdb/hadoop/fileSystem/HDFSConfUtil.java
@@ -19,7 +19,6 @@
package org.apache.iotdb.hadoop.fileSystem;
-
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -27,6 +26,7 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.iotdb.tsfile.common.conf.TSFileConfig;
import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
+import org.apache.iotdb.tsfile.fileSystem.FSType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -36,6 +36,9 @@ class HDFSConfUtil {
private static final Logger logger =
LoggerFactory.getLogger(HDFSConfUtil.class);
static Configuration setConf(Configuration conf) {
+ if (!tsFileConfig.getTSFileStorageFs().equals(FSType.HDFS)) {
+ return conf;
+ }
try {
conf.addResource(new
File(tsFileConfig.getCoreSitePath()).toURI().toURL());
conf.addResource(new
File(tsFileConfig.getHdfsSitePath()).toURI().toURL());