kylin git commit: KYLIN-1268 Take better care of DebugTomcat's log

2016-01-22 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 827a995da -> 5e0e8e09e


KYLIN-1268 Take better care of DebugTomcat's log


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

Branch: refs/heads/2.0-rc
Commit: 5e0e8e09e98269250105336fea4eee523873f943
Parents: 827a995
Author: Li, Yang 
Authored: Fri Jan 22 17:19:24 2016 +0800
Committer: Li, Yang 
Committed: Fri Jan 22 17:20:04 2016 +0800

--
 .../apache/kylin/rest/util/Log4jConfigListener.java| 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5e0e8e09/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java 
b/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java
index 19c76ea..23b327a 100644
--- a/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java
+++ b/server/src/main/java/org/apache/kylin/rest/util/Log4jConfigListener.java
@@ -20,25 +20,28 @@ package org.apache.kylin.rest.util;
 
 import javax.servlet.ServletContextEvent;
 
+import org.apache.kylin.common.KylinConfig;
+
 public class Log4jConfigListener extends 
org.springframework.web.util.Log4jConfigListener {
 
-private boolean isTesting;
+private boolean isDebugTomcat;
 
 public Log4jConfigListener() {
-// set by DebugTomcat
-this.isTesting = 
"testing".equals(System.getProperty("spring.profiles.active"));
+// check if is DebugTomcat
+String property = System.getProperty(KylinConfig.KYLIN_CONF);
+this.isDebugTomcat = property != null && 
property.contains("examples/test_case_data/sandbox");
 }
 
 @Override
 public void contextInitialized(ServletContextEvent event) {
-if (!isTesting) {
+if (!isDebugTomcat) {
 super.contextInitialized(event);
 }
 }
 
 @Override
 public void contextDestroyed(ServletContextEvent event) {
-if (!isTesting) {
+if (!isDebugTomcat) {
 super.contextDestroyed(event);
 }
 }



[1/3] kylin git commit: KYLIN-1340

2016-01-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/KYLIN-1356 5f5bc29d5 -> 16dd4070a


KYLIN-1340


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

Branch: refs/heads/KYLIN-1356
Commit: c7b2adb5beaa2697cfa2521a3c817d007b15a930
Parents: 5f5bc29
Author: honma 
Authored: Fri Jan 22 15:31:44 2016 +0800
Committer: honma 
Committed: Fri Jan 22 15:31:44 2016 +0800

--
 .../kylin/common/persistence/ResourceTool.java  |  11 +
 .../org/apache/kylin/cube/CubeDescManager.java  |   2 +-
 .../org/apache/kylin/cube/model/CubeDesc.java   |   4 +-
 .../org/apache/kylin/job/dao/ExecutableDao.java |   4 +-
 .../storage/hbase/util/CubeMetaExtractor.java   | 284 +++
 5 files changed, 300 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/c7b2adb5/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
 
b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
index 4a23ba3..8faeadf 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/persistence/ResourceTool.java
@@ -20,7 +20,10 @@ package org.apache.kylin.common.persistence;
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Callable;
 
+import com.google.common.base.Function;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.StringUtil;
 
@@ -76,6 +79,14 @@ public class ResourceTool {
 System.out.println("" + result);
 }
 
+public static void copy(KylinConfig srcConfig, KylinConfig dstConfig, 
List paths) throws IOException {
+ResourceStore src = ResourceStore.getStore(srcConfig);
+ResourceStore dst = ResourceStore.getStore(dstConfig);
+for (String path : paths) {
+copyR(src, dst, path);
+}
+}
+
 public static void copy(KylinConfig srcConfig, KylinConfig dstConfig) 
throws IOException {
 
 ResourceStore src = ResourceStore.getStore(srcConfig);

http://git-wip-us.apache.org/repos/asf/kylin/blob/c7b2adb5/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
index 53cd00f..424fd80 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java
@@ -112,7 +112,7 @@ public class CubeDescManager {
 public CubeDesc reloadCubeDescLocal(String name) throws IOException {
 
 // Save Source
-String path = CubeDesc.getCubeDescResourcePath(name);
+String path = CubeDesc.concatResourcePath(name);
 
 // Reload the CubeDesc
 CubeDesc ndesc = loadCubeDesc(path);

http://git-wip-us.apache.org/repos/asf/kylin/blob/c7b2adb5/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java 
b/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java
index bbc9f90..db05d7e 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java
@@ -267,10 +267,10 @@ public class CubeDesc extends RootPersistentEntity {
 }
 
 public String getResourcePath() {
-return getCubeDescResourcePath(name);
+return concatResourcePath(name);
 }
 
-public static String getCubeDescResourcePath(String descName) {
+public static String concatResourcePath(String descName) {
 return ResourceStore.CUBE_DESC_RESOURCE_ROOT + "/" + descName + 
MetadataConstants.FILE_SURFIX;
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/c7b2adb5/core-job/src/main/java/org/apache/kylin/job/dao/ExecutableDao.java
--
diff --git a/core-job/src/main/java/org/apache/kylin/job/dao/ExecutableDao.java 
b/core-job/src/main/java/org/apache/kylin/job/dao/ExecutableDao.java
index 18e36b4..d479dfe 100644
--- a/core-job/src/main/java/org/apache/kylin/job/dao/ExecutableDao.java
+++ 

[2/3] kylin git commit: fix license

2016-01-22 Thread mahongbin
fix license


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

Branch: refs/heads/KYLIN-1356
Commit: 1bb69a9335512e0cbed3ec8a0c756cdffd3f104d
Parents: c7b2adb
Author: honma 
Authored: Fri Jan 22 16:09:48 2016 +0800
Committer: honma 
Committed: Fri Jan 22 16:09:48 2016 +0800

--
 kylin-it/pom.xml | 37 +++--
 1 file changed, 19 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/1bb69a93/kylin-it/pom.xml
--
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index 7112f21..6813f34 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -1,21 +1,22 @@
 
 
+ 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.
+-->
+
 
 http://maven.apache.org/POM/4.0.0;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
@@ -32,8 +33,8 @@
 
 
 
-
-
+
+
 
 
 



kylin git commit: KYLIN-1186 Enhance javadoc in DataTypeSerializer

2016-01-22 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 504cc9827 -> da96c8f23


KYLIN-1186 Enhance javadoc in DataTypeSerializer


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

Branch: refs/heads/2.x-staging
Commit: da96c8f23bf107ec28410e45b49a2001ce4e60e2
Parents: 504cc98
Author: Li, Yang 
Authored: Fri Jan 22 16:47:35 2016 +0800
Committer: Li, Yang 
Committed: Fri Jan 22 16:47:35 2016 +0800

--
 .../org/apache/kylin/metadata/datatype/DataTypeSerializer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/da96c8f2/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/DataTypeSerializer.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/DataTypeSerializer.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/DataTypeSerializer.java
index d70562b..1b18a34 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/DataTypeSerializer.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/datatype/DataTypeSerializer.java
@@ -76,7 +76,7 @@ abstract public class DataTypeSerializer implements 
BytesSerializer {
 /** Return the max number of bytes to the longest possible serialization */
 abstract public int maxLength();
 
-/** Get an estimate of size in bytes of the serialized data */
+/** Get an estimate of the average size in bytes of this kind of 
serialized data */
 abstract public int getStorageBytesEstimate();
 
 /** An optional convenient method that converts a string to this data type 
(for dimensions) */



kylin git commit: KYLIN-1344 Bitmap measure defined after TopN measure can cause merge to fail

2016-01-22 Thread shaofengshi
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging b6da9ed18 -> 95918af70


KYLIN-1344 Bitmap measure defined after TopN measure can cause merge to fail


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

Branch: refs/heads/2.x-staging
Commit: 95918af703f967683c05d57fcf6e3929ad5647b4
Parents: b6da9ed
Author: shaofengshi 
Authored: Fri Jan 22 17:30:24 2016 +0800
Committer: shaofengshi 
Committed: Fri Jan 22 17:42:30 2016 +0800

--
 .../apache/kylin/measure/topn/TopNCounterSerializer.java | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/95918af7/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNCounterSerializer.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNCounterSerializer.java
 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNCounterSerializer.java
index b422316..777b47f 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNCounterSerializer.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNCounterSerializer.java
@@ -75,8 +75,10 @@ public class TopNCounterSerializer extends 
DataTypeSerializer iterator = value.iterator();
+ByteArray item;
 while (iterator.hasNext()) {
-out.put(iterator.next().getItem().array());
+item = iterator.next().getItem();
+out.put(item.array(), item.offset(), item.length());
 }
 }
 
@@ -89,10 +91,13 @@ public class TopNCounterSerializer extends 
DataTypeSerializer

kylin git commit: document, amend How to Contribute

2016-01-22 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 21a0003d5 -> 714bb4ab6


document, amend How to Contribute


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

Branch: refs/heads/1.x-staging
Commit: 714bb4ab67a887c63c8181b66719f8496690d798
Parents: 21a0003
Author: Li, Yang 
Authored: Fri Jan 22 16:28:43 2016 +0800
Committer: Li, Yang 
Committed: Fri Jan 22 16:28:43 2016 +0800

--
 website/_dev/howto_contribute.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/714bb4ab/website/_dev/howto_contribute.md
--
diff --git a/website/_dev/howto_contribute.md b/website/_dev/howto_contribute.md
index f0efbd0..c5d0e29 100644
--- a/website/_dev/howto_contribute.md
+++ b/website/_dev/howto_contribute.md
@@ -25,4 +25,4 @@ permalink: /development/howto_contribute.html
 * Committer will review in terms of correctness, performance, design, coding 
style, test coverage
 * Discuss and revise if necessary
 * Finally committer merge code into target branch
-
+   * We use `git rebase` to ensure the merged result is a streamline of 
commits.



kylin git commit: fix war

2016-01-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/KYLIN-1356 1918704d1 -> 53eb5cd94


fix war


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

Branch: refs/heads/KYLIN-1356
Commit: 53eb5cd94e6fbddaaaffd59364c8de6b19447a9f
Parents: 1918704
Author: honma 
Authored: Fri Jan 22 19:42:45 2016 +0800
Committer: honma 
Committed: Fri Jan 22 19:42:45 2016 +0800

--
 kylin-it/pom.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/53eb5cd9/kylin-it/pom.xml
--
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index c8ec8bc..8322a1f 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -47,6 +47,7 @@
 
 org.apache.kylin
 kylin-server
+war
 ${project.parent.version}
 
 



[3/3] kylin git commit: KYLIN-1343 Compile pass, pending IT

2016-01-22 Thread liyang
KYLIN-1343 Compile pass, pending IT


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

Branch: refs/heads/1.x-staging
Commit: df7ae17a7d90c0c37987f52a2cff4f42a46a1e66
Parents: 714bb4a
Author: Yang Li 
Authored: Sat Jan 23 13:24:32 2016 +0800
Committer: Yang Li 
Committed: Sat Jan 23 13:24:32 2016 +0800

--
 .../calcite/sql2rel/SqlToRelConverter.java  | 8126 ++
 .../org/apache/kylin/jdbc/KylinConnection.java  |2 +-
 .../org/apache/kylin/jdbc/KylinJdbcFactory.java |5 +-
 .../java/org/apache/kylin/jdbc/KylinMeta.java   |   47 +-
 .../kylin/jdbc/KylinPreparedStatement.java  |2 +
 .../org/apache/kylin/jdbc/KylinResultSet.java   |5 +-
 pom.xml |2 +-
 .../kylin/query/optrule/OLAPJoinRule.java   |2 +-
 .../kylin/query/relnode/OLAPAggregateRel.java   |6 +-
 .../kylin/query/relnode/OLAPFilterRel.java  |6 +-
 .../apache/kylin/query/relnode/OLAPJoinRel.java |   22 +-
 .../kylin/query/relnode/OLAPLimitRel.java   |5 +-
 .../kylin/query/relnode/OLAPProjectRel.java |5 +-
 .../apache/kylin/query/relnode/OLAPSortRel.java |7 +-
 .../kylin/query/relnode/OLAPTableScan.java  |5 +-
 .../relnode/OLAPToEnumerableConverter.java  |5 +-
 16 files changed, 4644 insertions(+), 3608 deletions(-)
--




kylin git commit: attachclass

2016-01-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/KYLIN-1356 53eb5cd94 -> 3e51b9a33


attachclass


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

Branch: refs/heads/KYLIN-1356
Commit: 3e51b9a3368eb2126ef72dc2a08190ed97debea9
Parents: 53eb5cd
Author: honma 
Authored: Fri Jan 22 22:46:35 2016 +0800
Committer: honma 
Committed: Fri Jan 22 22:46:35 2016 +0800

--
 kylin-it/pom.xml |  2 +-
 server/pom.xml   | 19 ++-
 2 files changed, 15 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3e51b9a3/kylin-it/pom.xml
--
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index 8322a1f..a855fa0 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -47,8 +47,8 @@
 
 org.apache.kylin
 kylin-server
-war
 ${project.parent.version}
+classes
 
 
 org.apache.kylin

http://git-wip-us.apache.org/repos/asf/kylin/blob/3e51b9a3/server/pom.xml
--
diff --git a/server/pom.xml b/server/pom.xml
index fb20d49..5e0a813 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -17,7 +17,8 @@
  limitations under the License.
 -->
 
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
 4.0.0
 
 kylin-server
@@ -81,7 +82,7 @@
 test
 ${project.parent.version}
 
-
+
 
 
 org.apache.kylin
@@ -257,7 +258,7 @@
 super-csv
 2.1.0
 
-   
+
 
 
 org.aspectj
@@ -384,7 +385,7 @@
 
 
 
- 
+
 org.apache.hive.hcatalog
 hive-hcatalog-core
 ${hive-hcatalog.version}
@@ -399,7 +400,7 @@
 jsp-api
 
 
-  
+
 
 
 org.apache.tomcat
@@ -468,6 +469,14 @@
 
 
 
+maven-war-plugin
+2.1.1
+
+true
+classes
+
+
+
 maven-compiler-plugin