You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by qh...@apache.org on 2015/09/23 05:29:20 UTC

[06/11] incubator-kylin git commit: KYLIN-1039 Add test case to verify if the problem exists

KYLIN-1039 Add test case to verify if the problem exists


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

Branch: refs/heads/KYLIN-1011
Commit: 10febfa0d2c555d958122178466e35823106552f
Parents: 985e1fb
Author: Li, Yang <ya...@ebay.com>
Authored: Tue Sep 22 14:59:25 2015 +0800
Committer: Li, Yang <ya...@ebay.com>
Committed: Tue Sep 22 15:00:02 2015 +0800

----------------------------------------------------------------------
 query/src/test/resources/query/sql/query81.sql  | 23 ++++++++++++++++++++
 .../coprocessor/observer/ObserverEnabler.java   |  8 +++++--
 2 files changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/10febfa0/query/src/test/resources/query/sql/query81.sql
----------------------------------------------------------------------
diff --git a/query/src/test/resources/query/sql/query81.sql b/query/src/test/resources/query/sql/query81.sql
new file mode 100644
index 0000000..7302a7d
--- /dev/null
+++ b/query/src/test/resources/query/sql/query81.sql
@@ -0,0 +1,23 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+select test_cal_dt.week_beg_dt, sum(price) as GMV
+ from test_kylin_fact 
+ inner JOIN edw.test_cal_dt as test_cal_dt  ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt 
+ where test_cal_dt.week_beg_dt between DATE '2013-09-01' and DATE '2013-10-01' and (lstg_format_name='FP-GTC' or 'a' = 'b')
+ group by test_cal_dt.week_beg_dt
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/10febfa0/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/ObserverEnabler.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/ObserverEnabler.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/ObserverEnabler.java
index e22cc00..7db2416 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/ObserverEnabler.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/ObserverEnabler.java
@@ -106,12 +106,16 @@ public class ObserverEnabler {
 
         String forceFlag = System.getProperty(FORCE_COPROCESSOR);
         if (forceFlag != null) {
-            return Boolean.parseBoolean(forceFlag);
+            boolean r = Boolean.parseBoolean(forceFlag);
+            logger.info("Coprocessor is " + (r ? "enabled" : "disabled") + " according to sys prop " + FORCE_COPROCESSOR);
+            return r;
         }
 
         Boolean cubeOverride = CUBE_OVERRIDES.get(cube.getName());
         if (cubeOverride != null) {
-            return cubeOverride.booleanValue();
+            boolean r = cubeOverride.booleanValue();
+            logger.info("Coprocessor is " + (r ? "enabled" : "disabled") + " according to cube overrides");
+            return r;
         }
 
         //        if (RowValueDecoder.hasMemHungryCountDistinct(rowValueDecoders)) {