kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [15/23] kylin git commit: KYLIN-2865 fix “wrong fs error” when use two cluster
Date Mon, 18 Sep 2017 03:36:13 GMT
KYLIN-2865 fix “wrong fs error” when use two cluster


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

Branch: refs/heads/master
Commit: a3b339d2665ca9e2fb58990a3bbdffc0f200a469
Parents: 46c3e25
Author: shaofengshi <shaofengshi@apache.org>
Authored: Thu Sep 14 21:43:50 2017 +0800
Committer: liyang-gmt8 <liyang@apache.org>
Committed: Sat Sep 16 10:10:16 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/storage/hbase/HBaseConnection.java | 8 ++------
 .../org/apache/kylin/storage/hbase/HBaseResourceStore.java   | 1 +
 2 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/a3b339d2/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
index 49fc6fa..ef26334 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
@@ -206,12 +206,8 @@ public class HBaseConnection {
         Path path = new Path(inPath);
         path = Path.getPathWithoutSchemeAndAuthority(path);
 
-        try {
-            FileSystem fs = HadoopUtil.getWorkingFileSystem(getCurrentHBaseConfiguration());
-            return fs.makeQualified(path).toString();
-        } catch (IOException e) {
-            throw new IllegalArgumentException("Cannot create FileSystem from current hbase
cluster conf", e);
-        }
+        FileSystem fs = HadoopUtil.getFileSystem(path, getCurrentHBaseConfiguration()); //
Must be HBase's FS, not working FS
+        return fs.makeQualified(path).toString();
     }
 
     // ============================================================================

http://git-wip-us.apache.org/repos/asf/kylin/blob/a3b339d2/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java
index 710440e..bcdb06a 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseResourceStore.java
@@ -409,6 +409,7 @@ public class HBaseResourceStore extends ResourceStore {
     public Path bigCellHDFSPath(String resPath) {
         String hdfsWorkingDirectory = this.kylinConfig.getHdfsWorkingDirectory();
         Path redirectPath = new Path(hdfsWorkingDirectory, "resources" + resPath);
+        redirectPath =  Path.getPathWithoutSchemeAndAuthority(redirectPath);
         return redirectPath;
     }
 


Mime
View raw message