You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by su...@apache.org on 2020/03/09 12:16:17 UTC

[incubator-iotdb] branch jira_550 created (now 299865b)

This is an automated email from the ASF dual-hosted git repository.

sunzesong pushed a change to branch jira_550
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 299865b  [IOTDB-550] Fix TSMRWriteExample executes unsuccessfully

This branch includes the following new commits:

     new 299865b  [IOTDB-550] Fix TSMRWriteExample executes unsuccessfully

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: [IOTDB-550] Fix TSMRWriteExample executes unsuccessfully

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunzesong pushed a commit to branch jira_550
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 299865ba001c8f47318fa7d3faccc63a6c0a2606
Author: samperson1997 <sz...@mails.tsinghua.edu.cn>
AuthorDate: Mon Mar 9 20:15:52 2020 +0800

    [IOTDB-550] Fix TSMRWriteExample executes unsuccessfully
---
 .../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());