[CARBONDATA-1236] Support absolute path without scheme in loading - hdfs path issue fix
Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/82ef875e Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/82ef875e Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/82ef875e Branch: refs/heads/streaming_ingest Commit: 82ef875ef2163d4fdc7f0d0a098d24c3a539eb55 Parents: 95bd82c Author: dhatchayani <[email protected]> Authored: Wed Jun 28 14:44:54 2017 +0530 Committer: dhatchayani <[email protected]> Committed: Wed Jun 28 14:45:38 2017 +0530 ---------------------------------------------------------------------- .../main/java/org/apache/carbondata/core/util/CarbonUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/carbondata/blob/82ef875e/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java index 2cd3114..6e0348b 100644 --- a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java +++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java @@ -696,13 +696,13 @@ public final class CarbonUtil { * @param filePath */ public static String checkAndAppendHDFSUrl(String filePath) { - if (!filePath.startsWith("/")) { - filePath = "/" + filePath; - } String currentPath = filePath; if (null != filePath && filePath.length() != 0 && FileFactory.getFileType(filePath) != FileFactory.FileType.HDFS && FileFactory.getFileType(filePath) != FileFactory.FileType.VIEWFS) { + if (!filePath.startsWith("/")) { + filePath = "/" + filePath; + } String baseDFSUrl = CarbonProperties.getInstance() .getProperty(CarbonCommonConstants.CARBON_DDL_BASE_HDFS_URL); String dfsUrl = conf.get(FS_DEFAULT_FS);
