You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/04/10 07:19:45 UTC

kylin git commit: KYLIN-2537 further bug fix

Repository: kylin
Updated Branches:
  refs/heads/KYLIN-2537 be10e237b -> 04e324f5c


KYLIN-2537 further bug fix


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

Branch: refs/heads/KYLIN-2537
Commit: 04e324f5c7d93cb8adf66bac715d658f0cc32146
Parents: be10e23
Author: Li Yang <li...@apache.org>
Authored: Mon Apr 10 15:19:40 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Mon Apr 10 15:19:40 2017 +0800

----------------------------------------------------------------------
 .../apache/kylin/storage/hbase/HBaseConnection.java  | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/04e324f5/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 9e4238d..7e2cefc 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
@@ -197,21 +197,12 @@ public class HBaseConnection {
     }
 
     public static String makeQualifiedPathInHBaseCluster(String inPath) {
-        String path = inPath;
-        
-        // chop off schema
-        int schemaCut = path.indexOf("://");
-        if (schemaCut > 0) {
-            path = path.substring(schemaCut + "://".length());
-        }
-        
-        // assert absolute path
-        if (path.startsWith("/") == false)
-            throw new IllegalArgumentException("Expect an absolute path but got: " + inPath);
+        Path path = new Path(inPath);
+        path = Path.getPathWithoutSchemeAndAuthority(path);
         
         try {
             FileSystem fs = FileSystem.get(getCurrentHBaseConfiguration());
-            return fs.makeQualified(new Path(path)).toString();
+            return fs.makeQualified(path).toString();
         } catch (IOException e) {
             throw new IllegalArgumentException("Cannot create FileSystem from current hbase cluster conf", e);
         }