carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [1/2] incubator-carbondata git commit: [CARBONDATA-716] fix invalid hdfs lock path if config viewfs
Date Tue, 21 Feb 2017 15:44:50 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master b4db25164 -> 1bce0bc0d


[CARBONDATA-716] fix invalid hdfs lock path if config viewfs


Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/d024b9fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/d024b9fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/d024b9fc

Branch: refs/heads/master
Commit: d024b9fc05c76255f3cc1f343783d528c36eccd4
Parents: b4db251
Author: hexiaoqiao <hexiaoqiao@meituan.com>
Authored: Tue Feb 21 18:42:42 2017 +0800
Committer: hexiaoqiao <hexiaoqiao@meituan.com>
Committed: Tue Feb 21 18:42:42 2017 +0800

----------------------------------------------------------------------
 .../apache/carbondata/core/constants/CarbonCommonConstants.java  | 4 ++++
 .../main/java/org/apache/carbondata/core/locks/HdfsFileLock.java | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d024b9fc/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
index f1faa57..d4347f1 100644
--- a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
+++ b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
@@ -135,6 +135,10 @@ public final class CarbonCommonConstants {
    */
   public static final String HDFSURL_PREFIX = "hdfs://";
   /**
+   * VIEWFSURL_PREFIX
+   */
+  public static final String VIEWFSURL_PREFIX = "viewfs://";
+  /**
    * FS_DEFAULT_FS
    */
   public static final String FS_DEFAULT_FS = "fs.defaultFS";

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/d024b9fc/core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java b/core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java
index 3c8a1fd..b3d79e9 100644
--- a/core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java
+++ b/core/src/main/java/org/apache/carbondata/core/locks/HdfsFileLock.java
@@ -54,7 +54,8 @@ public class HdfsFileLock extends AbstractCarbonLock {
     // If can not get the STORE_LOCATION, then use hadoop.tmp.dir .
     tmpPath = CarbonProperties.getInstance().getProperty(CarbonCommonConstants.STORE_LOCATION,
                System.getProperty(CarbonCommonConstants.HDFS_TEMP_LOCATION));
-    if (!tmpPath.startsWith(CarbonCommonConstants.HDFSURL_PREFIX)) {
+    if (!tmpPath.startsWith(CarbonCommonConstants.HDFSURL_PREFIX)
+          && !tmpPath.startsWith(CarbonCommonConstants.VIEWFSURL_PREFIX)) {
       tmpPath = hdfsPath + tmpPath;
     }
   }


Mime
View raw message