You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/11/05 02:54:38 UTC

[24/31] incubator-kylin git commit: KYLIN-1121 Fix newHBaseConfiguration(url) to fail on bad URL input

KYLIN-1121 Fix newHBaseConfiguration(url) to fail on bad URL input


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

Branch: refs/heads/KYLIN-1112
Commit: 1edbf47844c41db689ba79efbb71248e5879aedd
Parents: 276dfbe
Author: Li, Yang <ya...@ebay.com>
Authored: Tue Nov 3 18:15:47 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Nov 5 09:53:17 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kylin/storage/hbase/HBaseConnection.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/1edbf478/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 abbbc01..d1a92a0 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
@@ -80,7 +80,8 @@ public class HBaseConnection {
         Configuration conf = HBaseConfiguration.create(HadoopUtil.getCurrentConfiguration());
         
         // using a hbase:xxx URL is deprecated, instead hbase config is always loaded from hbase-site.xml in classpath
-        assert (StringUtils.isEmpty(url) || "hbase".equals(url)) : "for hbase storage, pls set 'kylin.storage.url=hbase' in kylin.properties";
+        if (!(StringUtils.isEmpty(url) || "hbase".equals(url)))
+            throw new IllegalArgumentException("to use hbase storage, pls set 'kylin.storage.url=hbase' in kylin.properties");
 
         // support hbase using a different FS
         String hbaseClusterFs = KylinConfig.getInstanceFromEnv().getHBaseClusterFs();