Repository: kylin
Updated Branches:
  refs/heads/KYLIN-2537 [created] be10e237b


KYLIN-2537 hbase r/w bug fix


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

Branch: refs/heads/KYLIN-2537
Commit: be10e237bcd3b8b675264d212125c4a638525d4a
Parents: 2e87fb4
Author: Li Yang <liy...@apache.org>
Authored: Mon Apr 10 14:12:18 2017 +0800
Committer: Li Yang <liy...@apache.org>
Committed: Mon Apr 10 14:12:18 2017 +0800

----------------------------------------------------------------------
 .../apache/kylin/storage/hbase/HBaseConnection.java   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/be10e237/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 73f31c5..9e4238d 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
@@ -196,7 +196,19 @@ public class HBaseConnection {
         conf.setStrings(JOB_NAMENODES_TOKEN_RENEWAL_EXCLUDE, 
nameServices.toArray(new String[0]));
     }
 
-    public static String makeQualifiedPathInHBaseCluster(String path) {
+    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);
+        
         try {
             FileSystem fs = FileSystem.get(getCurrentHBaseConfiguration());
             return fs.makeQualified(new Path(path)).toString();

Reply via email to