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 2015/11/03 11:14:14 UTC

incubator-kylin git commit: KYLIN-1121 Fix newHBaseConfiguration(url) to fail on bad URL input

Repository: incubator-kylin
Updated Branches:
  refs/heads/1.x-staging ce3a36232 -> 41ad16ee0


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/41ad16ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/41ad16ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/41ad16ee

Branch: refs/heads/1.x-staging
Commit: 41ad16ee05a1209f421cbbc5345992dcae1b7a65
Parents: ce3a362
Author: Li, Yang <ya...@ebay.com>
Authored: Tue Nov 3 18:14:02 2015 +0800
Committer: Li, Yang <ya...@ebay.com>
Committed: Tue Nov 3 18:14:02 2015 +0800

----------------------------------------------------------------------
 common/src/main/java/org/apache/kylin/common/util/HadoopUtil.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/41ad16ee/common/src/main/java/org/apache/kylin/common/util/HadoopUtil.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/util/HadoopUtil.java b/common/src/main/java/org/apache/kylin/common/util/HadoopUtil.java
index b815969..3255b32 100644
--- a/common/src/main/java/org/apache/kylin/common/util/HadoopUtil.java
+++ b/common/src/main/java/org/apache/kylin/common/util/HadoopUtil.java
@@ -98,7 +98,8 @@ public class HadoopUtil {
         Configuration conf = HBaseConfiguration.create(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();