[08/10] kylin git commit: KYLIN-919 fix ui show dimension error

2015-12-04 Thread mahongbin
KYLIN-919 fix ui show dimension error

Signed-off-by: honma 


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

Branch: refs/heads/2.x-staging
Commit: 24d3825bc4652f2f449dde68223788aa3b51fefe
Parents: 5216fad
Author: jian 
Authored: Fri Dec 4 12:29:09 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:29:07 2015 +0800

--
 webapp/app/js/controllers/cubeEdit.js | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/24d3825b/webapp/app/js/controllers/cubeEdit.js
--
diff --git a/webapp/app/js/controllers/cubeEdit.js 
b/webapp/app/js/controllers/cubeEdit.js
index 2920458..ae4a0f1 100755
--- a/webapp/app/js/controllers/cubeEdit.js
+++ b/webapp/app/js/controllers/cubeEdit.js
@@ -47,6 +47,7 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, 
$routeParams, $locatio
 return temp;
   };
 
+  //get columns from model
   $scope.getDimColumnsByTable = function (tableName) {
 if (!tableName) {
   return [];
@@ -55,6 +56,9 @@ KylinApp.controller('CubeEditCtrl', function ($scope, $q, 
$routeParams, $locatio
 var tableDim = _.find($scope.metaModel.model.dimensions, function 
(dimension) {
   return dimension.table == tableName
 });
+if(!tableDim){
+  return [];
+}
 var tableDimColumns = tableDim.columns;
 var avaColObject = _.filter(tableColumns, function (col) {
   return tableDimColumns.indexOf(col.name) != -1;



[02/10] kylin git commit: KYLIN-1179 Cannot use String as partition column

2015-12-04 Thread mahongbin
KYLIN-1179 Cannot use String as partition column

Signed-off-by: honma 


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

Branch: refs/heads/2.x-staging
Commit: 225a7d5b6c68e4c0d5a70283823e4fede59d5522
Parents: 9f60f47
Author: lidongsjtu 
Authored: Mon Nov 30 10:48:36 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:29:06 2015 +0800

--
 .../hbase/cube/v2/CubeSegmentScanner.java   | 26 +++-
 webapp/app/js/controllers/modelEdit.js  |  2 +-
 2 files changed, 16 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/225a7d5b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
index 1eed318..2f78a86 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
@@ -11,6 +11,7 @@ import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.kylin.common.debug.BackdoorToggles;
 import org.apache.kylin.common.util.ByteArray;
 import org.apache.kylin.common.util.DateFormat;
@@ -30,6 +31,7 @@ import org.apache.kylin.gridtable.GTScanRequest;
 import org.apache.kylin.gridtable.GTUtil;
 import org.apache.kylin.gridtable.IGTScanner;
 import org.apache.kylin.metadata.filter.TupleFilter;
+import org.apache.kylin.metadata.model.DataType;
 import org.apache.kylin.metadata.model.FunctionDesc;
 import org.apache.kylin.metadata.model.TblColRef;
 
@@ -83,27 +85,23 @@ public class CubeSegmentScanner implements IGTScanner {
 GTInfo trimmedInfo = GTInfo.deserialize(trimmedInfoBytes);
 
 for (GTScanRange range : scanRanges) {
-scanRequests.add(new GTScanRequest(trimmedInfo, 
range.replaceGTInfo(trimmedInfo),
-gtDimensions, gtAggrGroups, gtAggrMetrics, gtAggrFuncs, 
gtFilter, allowPreAggregate));
+scanRequests.add(new GTScanRequest(trimmedInfo, 
range.replaceGTInfo(trimmedInfo), gtDimensions, gtAggrGroups, gtAggrMetrics, 
gtAggrFuncs, gtFilter, allowPreAggregate));
 }
 
 scanner = new Scanner();
 }
 
 private Pair getSegmentStartAndEnd(TblColRef 
tblColRef, int index) {
-
-String partitionColType = tblColRef.getColumnDesc().getDatatype();
-
 ByteArray start;
 if (cubeSeg.getDateRangeStart() != Long.MIN_VALUE) {
-start = translateTsToString(cubeSeg.getDateRangeStart(), 
partitionColType, index);
+start = translateTsToString(cubeSeg.getDateRangeStart(), index, 1);
 } else {
 start = new ByteArray();
 }
 
 ByteArray end;
 if (cubeSeg.getDateRangeEnd() != Long.MAX_VALUE) {
-end = translateTsToString(cubeSeg.getDateRangeEnd(), 
partitionColType, index);
+end = translateTsToString(cubeSeg.getDateRangeEnd(), index, -1);
 } else {
 end = new ByteArray();
 }
@@ -111,19 +109,25 @@ public class CubeSegmentScanner implements IGTScanner {
 
 }
 
-private ByteArray translateTsToString(long ts, String partitionColType, 
int index) {
+private ByteArray translateTsToString(long ts, int index, int 
roundingFlag) {
 String value;
-if ("date".equalsIgnoreCase(partitionColType)) {
+DataType partitionColType = info.getColumnType(index);
+if (partitionColType.isDate()) {
 value = DateFormat.formatToDateStr(ts);
-} else if ("timestamp".equalsIgnoreCase(partitionColType)) {
+} else if (partitionColType.isDatetime()) {
 //TODO: if partition col is not dict encoded, value's format may 
differ from expected. Though by default it is not the case
 value = DateFormat.formatToTimeWithoutMilliStr(ts);
+} else if (partitionColType.isStringFamily()) {
+String partitionDateFormat = 
cubeSeg.getCubeDesc().getModel().getPartitionDesc().getPartitionDateFormat();
+if (StringUtils.isEmpty(partitionDateFormat))
+partitionDateFormat = DateFormat.DEFAULT_DATE_PATTERN;
+value = DateFormat.formatToDateStr(ts, partitionDateFormat);
 } else {
 throw new RuntimeException("Type " 

[10/10] kylin git commit: KYLIN-919 model name validate when edit model, add lowercase check

2015-12-04 Thread mahongbin
KYLIN-919 model name validate when edit model,add lowercase check

Signed-off-by: honma 


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

Branch: refs/heads/2.x-staging
Commit: 4afd144af38f99c2fc7333b18f07f2880cd80434
Parents: 24d3825
Author: Zhong 
Authored: Wed Dec 2 15:02:03 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:29:07 2015 +0800

--
 webapp/app/js/controllers/modelSchema.js | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4afd144a/webapp/app/js/controllers/modelSchema.js
--
diff --git a/webapp/app/js/controllers/modelSchema.js 
b/webapp/app/js/controllers/modelSchema.js
index 9e9f09c..682ce5e 100644
--- a/webapp/app/js/controllers/modelSchema.js
+++ b/webapp/app/js/controllers/modelSchema.js
@@ -166,9 +166,11 @@ KylinApp.controller('ModelSchemaCtrl', function ($scope, 
QueryService, UserServi
 
 var modelName = $scope.modelsManager.selectedModel.name.toUpperCase();
 var models = $scope.modelsManager.modelNameList;
-if ($scope.modelMode=="addNewModel"&(modelName) != -1 || 
models.indexOf(modelName.toLowerCase()) !=-1) {
-  SweetAlert.swal('', "Model named [" + modelName + "] already exist!", 
'warning');
-  return false;
+if ($scope.modelMode=="addNewModel") {
+  if(models.indexOf(modelName) != -1 || 
models.indexOf(modelName.toLowerCase()) !=-1){
+SweetAlert.swal('', "Model named [" + modelName + "] already exist!", 
'warning');
+return false;
+  }
 }
 return true;
   }



[07/10] kylin git commit: minor, update hyperlinks for kylin contacts on webapp

2015-12-04 Thread mahongbin
minor, update hyperlinks for kylin contacts on webapp

Signed-off-by: honma 


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

Branch: refs/heads/2.x-staging
Commit: d10c20ddea345e3acae21c8d0f2d372f419153ff
Parents: e8e2d27
Author: lidongsjtu 
Authored: Thu Dec 3 11:38:11 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:29:07 2015 +0800

--
 webapp/app/partials/footer.html | 4 ++--
 webapp/app/partials/login.html  | 2 +-
 webapp/app/partials/models/models_tree.html | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/d10c20dd/webapp/app/partials/footer.html
--
diff --git a/webapp/app/partials/footer.html b/webapp/app/partials/footer.html
index 5a72a52..d0a513a 100644
--- a/webapp/app/partials/footer.html
+++ b/webapp/app/partials/footer.html
@@ -20,8 +20,8 @@
 
 
 
-http://kylin.io; style="color:#808080;"> Home Page |
-https://groups.google.com/forum/#!forum/kylin-olap; 
style="color:#808080;"> Google Group
+http://kylin.apache.org; style="color:#808080;"> Apache Kylin |
+http://kylin.apache.org/community/; 
style="color:#808080;"> Apache Kylin Community
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/d10c20dd/webapp/app/partials/login.html
--
diff --git a/webapp/app/partials/login.html b/webapp/app/partials/login.html
index e64f9d5..79128b1 100644
--- a/webapp/app/partials/login.html
+++ b/webapp/app/partials/login.html
@@ -56,7 +56,7 @@
 
 
 
-https://groups.google.com/forum/#!forum/kylin-olap; target="_blank" 
class="text-muted">Login Issue?
+http://kylin.apache.org/community/; target="_blank" 
class="text-muted">Login Issue?
 
 
 {{loading? 
'Logging In...': 'Log In'}}

http://git-wip-us.apache.org/repos/asf/kylin/blob/d10c20dd/webapp/app/partials/models/models_tree.html
--
diff --git a/webapp/app/partials/models/models_tree.html 
b/webapp/app/partials/models/models_tree.html
index 30706cf..7b94841 100644
--- a/webapp/app/partials/models/models_tree.html
+++ b/webapp/app/partials/models/models_tree.html
@@ -26,7 +26,7 @@
 
 
   
- New 
Model
+New 
Model
   
   
 New Cube



[04/10] kylin git commit: KYLIN-1182 Upgrade tool for DataModelDesc from 1.x to 2.0

2015-12-04 Thread mahongbin
KYLIN-1182 Upgrade tool for DataModelDesc from 1.x to 2.0

Signed-off-by: honma 


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

Branch: refs/heads/2.x-staging
Commit: 5216faddd68df289be590f2f214b84a41011694f
Parents: d10c20d
Author: lidongsjtu 
Authored: Thu Dec 3 11:44:59 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:29:07 2015 +0800

--
 .../job/upgrade/CubeDescSignatureUpdate.java|  66 ---
 .../job/upgrade/v2/DataModelDescUpgradeV2.java  | 170 +++
 .../kylin/metadata/model/DataModelDesc.java |   8 +
 3 files changed, 217 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5216fadd/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
 
b/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
index 178f1b0..36784de 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
@@ -18,57 +18,40 @@
 
 package org.apache.kylin.job.upgrade;
 
-import com.google.common.collect.Lists;
+import java.util.List;
+
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.persistence.ResourceStore;
 import org.apache.kylin.cube.CubeDescManager;
+import org.apache.kylin.cube.CubeManager;
 import org.apache.kylin.cube.model.CubeDesc;
+import org.apache.kylin.metadata.MetadataManager;
+import org.apache.kylin.metadata.project.ProjectManager;
 
-import java.util.List;
+import com.google.common.collect.Lists;
 
 /**
  * Created by dongli on 11/17/15.
  */
 public class CubeDescSignatureUpdate {
+private static final Log logger = 
LogFactory.getLog(CubeDescSignatureUpdate.class);
 private KylinConfig config = null;
 private ResourceStore store;
 private String[] cubeNames;
 private List updatedResources = Lists.newArrayList();
 private List errorMsgs = Lists.newArrayList();
 
-private static final Log logger = 
LogFactory.getLog(CubeDescSignatureUpdate.class);
-
 public CubeDescSignatureUpdate(String[] cubes) {
 config = KylinConfig.getInstanceFromEnv();
 store = ResourceStore.getStore(config);
 cubeNames = cubes;
 }
 
-public void update() {
-logger.info("Reloading Cube Metadata from store: " + 
store.getReadableResourcePath(ResourceStore.CUBE_DESC_RESOURCE_ROOT));
-CubeDescManager cubeDescManager = CubeDescManager.getInstance(config);
-List cubeDescs;
-if (ArrayUtils.isEmpty(cubeNames)) {
-cubeDescs = cubeDescManager.listAllDesc();
-} else {
-String[] names = cubeNames[0].split(",");
-if (ArrayUtils.isEmpty(names))
-return;
-cubeDescs = Lists.newArrayListWithCapacity(names.length);
-for (String name : names) {
-cubeDescs.add(cubeDescManager.getCubeDesc(name));
-}
-}
-for (CubeDesc cubeDesc : cubeDescs) {
-updateCubeDesc(cubeDesc);
-}
-}
-
 public static void main(String args[]) {
-if (args != null && args.length != 0 && args.length != 1) {
+if (args != null && args.length > 1) {
 System.out.println("Usage: java CubeDescSignatureUpdate [Cubes]; 
e.g, cube1,cube2 ");
 return;
 }
@@ -100,11 +83,40 @@ public class CubeDescSignatureUpdate {
 
logger.info("=");
 }
 
+public void update() {
+logger.info("Reloading Cube Metadata from store: " + 
store.getReadableResourcePath(ResourceStore.CUBE_DESC_RESOURCE_ROOT));
+CubeDescManager cubeDescManager = CubeDescManager.getInstance(config);
+List cubeDescs;
+if (ArrayUtils.isEmpty(cubeNames)) {
+cubeDescs = cubeDescManager.listAllDesc();
+} else {
+String[] names = cubeNames[0].split(",");
+if (ArrayUtils.isEmpty(names))
+return;
+cubeDescs = Lists.newArrayListWithCapacity(names.length);
+for (String name : names) {
+cubeDescs.add(cubeDescManager.getCubeDesc(name));
+}
+}
+for (CubeDesc cubeDesc : cubeDescs) {
+  

[05/10] kylin git commit: KYLIN-1064 Restore disabled queries in KylinQueryTest.testVerifyQuery

2015-12-04 Thread mahongbin
KYLIN-1064 Restore disabled queries in KylinQueryTest.testVerifyQuery

Signed-off-by: honma 


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

Branch: refs/heads/2.0-rc
Commit: 2fb097bba79414b70b8a025b893a9ebf59a11258
Parents: fde4a3d
Author: lidongsjtu 
Authored: Thu Dec 3 09:49:38 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:14:34 2015 +0800

--
 .../apache/kylin/query/relnode/OLAPLimitRel.java |  7 +--
 .../resources/query/sql_verifyCount/query04.sql  | 19 +++
 .../query/sql_verifyCount/query04.sql.disable| 19 ---
 .../resources/query/sql_verifyCount/query05.sql  | 19 +++
 .../query/sql_verifyCount/query05.sql.disable| 19 ---
 .../resources/query/sql_verifyCount/query06.sql  | 19 +++
 .../query/sql_verifyCount/query06.sql.disable| 19 ---
 .../resources/query/sql_verifyCount/query07.sql  | 19 +++
 .../query/sql_verifyCount/query07.sql.disable| 19 ---
 9 files changed, 81 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/2fb097bb/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java
--
diff --git 
a/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java 
b/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java
index 74d5de0..572a5c7 100644
--- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java
+++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java
@@ -102,8 +102,11 @@ public class OLAPLimitRel extends SingleRel implements 
OLAPRel {
 
 @Override
 public EnumerableRel implementEnumerable(List inputs) {
-return new EnumerableLimit(getCluster(), 
getCluster().traitSetOf(EnumerableConvention.INSTANCE), //
-sole(inputs), localOffset, localFetch);
+EnumerableRel input = sole(inputs);
+if (input instanceof OLAPRel) {
+((OLAPRel) input).replaceTraitSet(EnumerableConvention.INSTANCE);
+}
+return EnumerableLimit.create(input, localOffset, localFetch);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/kylin/blob/2fb097bb/query/src/test/resources/query/sql_verifyCount/query04.sql
--
diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql 
b/query/src/test/resources/query/sql_verifyCount/query04.sql
new file mode 100644
index 000..9d3e409
--- /dev/null
+++ b/query/src/test/resources/query/sql_verifyCount/query04.sql
@@ -0,0 +1,19 @@
+--
+-- 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 * from test_kylin_fact limit 100

http://git-wip-us.apache.org/repos/asf/kylin/blob/2fb097bb/query/src/test/resources/query/sql_verifyCount/query04.sql.disable
--
diff --git a/query/src/test/resources/query/sql_verifyCount/query04.sql.disable 
b/query/src/test/resources/query/sql_verifyCount/query04.sql.disable
deleted file mode 100644
index 9d3e409..000
--- a/query/src/test/resources/query/sql_verifyCount/query04.sql.disable
+++ /dev/null
@@ -1,19 +0,0 @@
---
--- 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, 

[08/10] kylin git commit: KYLIN-1182 Upgrade tool for DataModelDesc from 1.x to 2.0

2015-12-04 Thread mahongbin
KYLIN-1182 Upgrade tool for DataModelDesc from 1.x to 2.0

Signed-off-by: honma 


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

Branch: refs/heads/2.0-rc
Commit: 3ecbfe72d94547d9cd3d4c90c98024c8fc915ce5
Parents: 1b6f1fe
Author: lidongsjtu 
Authored: Thu Dec 3 11:44:59 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:14:52 2015 +0800

--
 .../job/upgrade/CubeDescSignatureUpdate.java|  66 ---
 .../job/upgrade/v2/DataModelDescUpgradeV2.java  | 170 +++
 .../kylin/metadata/model/DataModelDesc.java |   8 +
 3 files changed, 217 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3ecbfe72/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
 
b/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
index 178f1b0..36784de 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/upgrade/CubeDescSignatureUpdate.java
@@ -18,57 +18,40 @@
 
 package org.apache.kylin.job.upgrade;
 
-import com.google.common.collect.Lists;
+import java.util.List;
+
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.persistence.ResourceStore;
 import org.apache.kylin.cube.CubeDescManager;
+import org.apache.kylin.cube.CubeManager;
 import org.apache.kylin.cube.model.CubeDesc;
+import org.apache.kylin.metadata.MetadataManager;
+import org.apache.kylin.metadata.project.ProjectManager;
 
-import java.util.List;
+import com.google.common.collect.Lists;
 
 /**
  * Created by dongli on 11/17/15.
  */
 public class CubeDescSignatureUpdate {
+private static final Log logger = 
LogFactory.getLog(CubeDescSignatureUpdate.class);
 private KylinConfig config = null;
 private ResourceStore store;
 private String[] cubeNames;
 private List updatedResources = Lists.newArrayList();
 private List errorMsgs = Lists.newArrayList();
 
-private static final Log logger = 
LogFactory.getLog(CubeDescSignatureUpdate.class);
-
 public CubeDescSignatureUpdate(String[] cubes) {
 config = KylinConfig.getInstanceFromEnv();
 store = ResourceStore.getStore(config);
 cubeNames = cubes;
 }
 
-public void update() {
-logger.info("Reloading Cube Metadata from store: " + 
store.getReadableResourcePath(ResourceStore.CUBE_DESC_RESOURCE_ROOT));
-CubeDescManager cubeDescManager = CubeDescManager.getInstance(config);
-List cubeDescs;
-if (ArrayUtils.isEmpty(cubeNames)) {
-cubeDescs = cubeDescManager.listAllDesc();
-} else {
-String[] names = cubeNames[0].split(",");
-if (ArrayUtils.isEmpty(names))
-return;
-cubeDescs = Lists.newArrayListWithCapacity(names.length);
-for (String name : names) {
-cubeDescs.add(cubeDescManager.getCubeDesc(name));
-}
-}
-for (CubeDesc cubeDesc : cubeDescs) {
-updateCubeDesc(cubeDesc);
-}
-}
-
 public static void main(String args[]) {
-if (args != null && args.length != 0 && args.length != 1) {
+if (args != null && args.length > 1) {
 System.out.println("Usage: java CubeDescSignatureUpdate [Cubes]; 
e.g, cube1,cube2 ");
 return;
 }
@@ -100,11 +83,40 @@ public class CubeDescSignatureUpdate {
 
logger.info("=");
 }
 
+public void update() {
+logger.info("Reloading Cube Metadata from store: " + 
store.getReadableResourcePath(ResourceStore.CUBE_DESC_RESOURCE_ROOT));
+CubeDescManager cubeDescManager = CubeDescManager.getInstance(config);
+List cubeDescs;
+if (ArrayUtils.isEmpty(cubeNames)) {
+cubeDescs = cubeDescManager.listAllDesc();
+} else {
+String[] names = cubeNames[0].split(",");
+if (ArrayUtils.isEmpty(names))
+return;
+cubeDescs = Lists.newArrayListWithCapacity(names.length);
+for (String name : names) {
+cubeDescs.add(cubeDescManager.getCubeDesc(name));
+}
+}
+for (CubeDesc cubeDesc : cubeDescs) {
+   

[09/10] kylin git commit: KYLIN-1190 Make memory budget per query configurable

2015-12-04 Thread mahongbin
KYLIN-1190 Make memory budget per query configurable

Signed-off-by: honma 


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

Branch: refs/heads/2.x-staging
Commit: e8e2d27ab82d6565615a27d4a441f019a5b5aafa
Parents: 6b20569
Author: lidongsjtu 
Authored: Thu Dec 3 09:50:19 2015 +0800
Committer: honma 
Committed: Fri Dec 4 16:29:07 2015 +0800

--
 .../main/java/org/apache/kylin/common/KylinConfig.java  |  4 
 .../kylin/storage/hbase/cube/v1/CubeStorageQuery.java   | 12 
 .../kylin/storage/hbase/cube/v2/CubeStorageQuery.java   | 11 +++
 3 files changed, 19 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/e8e2d27a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index b08df5f..d2a94c5 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -492,6 +492,10 @@ public class KylinConfig implements Serializable {
 return 
Long.parseLong(this.getOptional("kylin.query.cache.threshold.scancount", 
String.valueOf(10 * 1024)));
 }
 
+public long getQueryMemBudget() {
+return Long.parseLong(this.getOptional("kylin.query.mem.budget", 
String.valueOf(3L * 1024 * 1024 * 1024)));
+}
+
 public boolean isQuerySecureEnabled() {
 return 
Boolean.parseBoolean(this.getOptional("kylin.query.security.enabled", "false"));
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/e8e2d27a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/CubeStorageQuery.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/CubeStorageQuery.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/CubeStorageQuery.java
index 4d34943..2fa0490 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/CubeStorageQuery.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/CubeStorageQuery.java
@@ -82,7 +82,6 @@ public class CubeStorageQuery implements 
ICachableStorageQuery {
 private static final Logger logger = 
LoggerFactory.getLogger(CubeStorageQuery.class);
 
 private static final int MERGE_KEYRANGE_THRESHOLD = 100;
-private static final long MEM_BUDGET_PER_QUERY = 3L * 1024 * 1024 * 1024; 
// 3G
 
 private final CubeInstance cubeInstance;
 private final CubeDesc cubeDesc;
@@ -732,8 +731,13 @@ public class CubeStorageQuery implements 
ICachableStorageQuery {
 }
 }
 
-long rowEst = MEM_BUDGET_PER_QUERY / rowSizeEst;
-context.setThreshold((int) rowEst);
+long rowEst = this.cubeInstance.getConfig().getQueryMemBudget() / 
rowSizeEst;
+if (rowEst > 0) {
+logger.info("Memory budget is set to: " + rowEst);
+context.setThreshold((int) rowEst);
+} else {
+logger.info("Memory budget is not set.");
+}
 }
 
 private void setLimit(TupleFilter filter, StorageContext context) {
@@ -760,7 +764,7 @@ public class CubeStorageQuery implements 
ICachableStorageQuery {
 topnLiteralCol = func.getTopNLiteralColumn();
 }
 }
-
+
 // if TopN is not involved
 if (topnFunc == null)
 return;

http://git-wip-us.apache.org/repos/asf/kylin/blob/e8e2d27a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java
index 0c8c3bd..59ed99b 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java
@@ -41,8 +41,6 @@ public class CubeStorageQuery implements 
ICachableStorageQuery {
 
 private static final Logger logger = 
LoggerFactory.getLogger(CubeStorageQuery.class);
 
-private static final long MEM_BUDGET_PER_QUERY = 3L * 1024 * 1024 * 1024; 
// 3G
-
 private final CubeInstance cubeInstance;
 private final CubeDesc cubeDesc;
 
@@ -362,8 

[6/7] kylin git commit: KYLIN-242 refactor cuboid and cuboid scheduer to support white list by addming joint semantic

2015-12-04 Thread mahongbin
KYLIN-242 refactor cuboid and cuboid scheduer to support white list by addming 
joint semantic


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

Branch: refs/heads/2.x-staging
Commit: 07537a9aa6c6d6ed37fb039bee5b3c2eabd534d8
Parents: af6b11a
Author: honma 
Authored: Fri Nov 27 16:47:28 2015 +0800
Committer: honma 
Committed: Fri Dec 4 17:08:01 2015 +0800

--
 .../kylin/job/dataGen/FactTableGenerator.java   |   7 +-
 .../persistence/RootPersistentEntity.java   |   2 +
 .../org/apache/kylin/common/util/BasicTest.java |   2 +-
 .../java/org/apache/kylin/cube/CubeManager.java |   2 +-
 .../java/org/apache/kylin/cube/CubeSegment.java |   6 +-
 .../org/apache/kylin/cube/cuboid/Cuboid.java| 329 +++-
 .../org/apache/kylin/cube/cuboid/CuboidCLI.java |  81 +-
 .../kylin/cube/cuboid/CuboidScheduler.java  | 256 +++---
 .../gridtable/CuboidToGridTableMapping.java |  10 +-
 .../cube/inmemcubing/InMemCubeBuilderUtils.java |   6 +-
 .../org/apache/kylin/cube/kv/RowConstants.java  |   2 +
 .../kylin/cube/model/AggregationGroup.java  | 280 +++
 .../org/apache/kylin/cube/model/CubeDesc.java   | 187 ++---
 .../apache/kylin/cube/model/DimensionDesc.java  | 121 +--
 .../kylin/cube/model/HBaseMappingDesc.java  |   2 +-
 .../apache/kylin/cube/model/RowKeyColDesc.java  |  73 +-
 .../org/apache/kylin/cube/model/RowKeyDesc.java | 229 +
 .../org/apache/kylin/cube/model/SelectRule.java |  30 +
 .../kylin/cube/model/v2/CubeBuildTypeEnum.java  |  39 +
 .../apache/kylin/cube/model/v2/CubeDesc.java| 826 +++
 .../kylin/cube/model/v2/DimensionDesc.java  | 239 ++
 .../kylin/cube/model/v2/HBaseColumnDesc.java| 138 
 .../cube/model/v2/HBaseColumnFamilyDesc.java|  58 ++
 .../kylin/cube/model/v2/HBaseMappingDesc.java   |  96 +++
 .../kylin/cube/model/v2/HierarchyDesc.java  |  68 ++
 .../kylin/cube/model/v2/RowKeyColDesc.java  |  92 +++
 .../apache/kylin/cube/model/v2/RowKeyDesc.java  | 295 +++
 .../model/validation/CubeMetadataValidator.java |   9 +-
 .../cube/model/validation/ValidateContext.java  |   5 +-
 .../validation/rule/AggregationGroupRule.java   | 185 +
 .../rule/AggregationGroupSizeRule.java  |  66 --
 .../rule/IKylinValidationConstants.java |   6 +-
 .../validation/rule/MandatoryColumnRule.java|  75 --
 .../model/validation/rule/RowKeyAttrRule.java   |  27 +-
 .../cube/upgrade/V2/CubeDescUpgraderV2.java | 287 +++
 .../cube/upgrade/V2/CubeMetadataUpgradeV2.java  | 177 
 .../org/apache/kylin/cube/util/CubingUtils.java |  30 +-
 .../kylin/cube/AggregationGroupRuleTest.java| 127 +++
 .../cube/AggregationGroupSizeRuleTest.java  | 101 ---
 .../org/apache/kylin/cube/CubeManagerTest.java  |   2 +-
 .../kylin/cube/DictionaryManagerTest.java   |   4 +-
 .../kylin/cube/MandatoryColumnRuleTest.java |  57 --
 .../apache/kylin/cube/RowKeyAttrRuleTest.java   |  43 +-
 .../kylin/cube/cuboid/CuboidSchedulerTest.java  | 155 ++--
 .../apache/kylin/cube/cuboid/CuboidTest.java|  10 +-
 .../src/test/resources/data/TEST1_desc.json | 183 
 .../src/test/resources/data/TEST2_desc.json | 168 
 .../src/test/resources/data/TEST3_desc.json | 182 
 .../apache/kylin/dict/DictionaryManager.java|  10 +-
 .../kylin/job/manager/ExecutableManager.java|   4 +-
 .../kylin/metadata/model/MeasureDesc.java   |  16 +-
 .../kylin/engine/mr/BatchCubingJobBuilder.java  |   2 +-
 .../mr/steps/FactDistinctColumnsMapperBase.java |   2 +-
 .../mr/steps/FactDistinctHiveColumnsMapper.java |   3 +-
 .../mr/steps/MapContextGTRecordWriter.java  |   2 +-
 .../mr/steps/MergeCuboidFromStorageMapper.java  |   2 +-
 .../engine/mr/steps/MergeCuboidMapper.java  |   2 +-
 .../engine/mr/steps/MergeDictionaryStep.java|   2 +-
 .../kylin/engine/mr/steps/CubeSamplingTest.java |   3 +-
 .../apache/kylin/engine/spark/SparkCubing.java  |   5 +-
 .../spark/cube/DefaultTupleConverter.java   |   3 +-
 .../apache/kylin/rest/service/CubeService.java  |   4 +-
 .../rest/controller/CubeControllerTest.java |   7 +-
 .../storage/hbase/cube/v1/CubeStorageQuery.java |   2 +-
 .../hbase/cube/v1/CubeTupleConverter.java   |   6 +-
 .../storage/hbase/cube/v2/CubeStorageQuery.java |   2 +-
 .../hbase/cube/v2/CubeTupleConverter.java   |   3 +-
 .../kylin/storage/hbase/steps/BulkLoadJob.java  |   2 +-
 .../storage/hbase/steps/CubeHFileMapper.java|   2 +-
 .../storage/hbase/steps/CubeHTableUtil.java |   2 +-
 .../storage/hbase/steps/HBaseCuboidWriter.java  |   2 +-
 .../storage/hbase/steps/HBaseMROutput2.java |   4 +-
 .../hbase/steps/HBaseMROutput2Transition.java   |   2 +-
 

[2/7] kylin git commit: KYLIN-242 refine cube desc to fit new aggregation group design

2015-12-04 Thread mahongbin
KYLIN-242 refine cube desc to fit new aggregation group design


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

Branch: refs/heads/2.x-staging
Commit: af6b11a97c74eb45aba62fa65494bab98d33541c
Parents: 91b1f92
Author: honma 
Authored: Mon Nov 30 11:17:14 2015 +0800
Committer: honma 
Committed: Fri Dec 4 17:07:50 2015 +0800

--
 .../localmeta/cube_desc/test_kylin_cube_without_slr_desc.json | 3 +--
 .../cube_desc/test_kylin_cube_without_slr_left_join_desc.json | 3 +--
 .../localmeta/cube_desc/test_streaming_table_cube_desc.json   | 3 ++-
 3 files changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/af6b11a9/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
--
diff --git 
a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
 
b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
index 1e007c3..31c54a8 100644
--- 
a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
+++ 
b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
@@ -245,8 +245,7 @@
 "leaf_categ_id",
 "meta_categ_name",
 "categ_lvl3_name",
-"categ_lvl2_name",
-"lstg_format_name"
+"categ_lvl2_name"
   ]
 ]
   },

http://git-wip-us.apache.org/repos/asf/kylin/blob/af6b11a9/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
--
diff --git 
a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
 
b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
index 73a58f0..80ea23a 100644
--- 
a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
+++ 
b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
@@ -245,8 +245,7 @@
 "leaf_categ_id",
 "meta_categ_name",
 "categ_lvl3_name",
-"categ_lvl2_name",
-"lstg_format_name"
+"categ_lvl2_name"
   ]
 ]
   },

http://git-wip-us.apache.org/repos/asf/kylin/blob/af6b11a9/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
--
diff --git 
a/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
 
b/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
index c9a6536..6f9b3a7 100644
--- 
a/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
+++ 
b/examples/test_case_data/localmeta/cube_desc/test_streaming_table_cube_desc.json
@@ -83,7 +83,7 @@
 "column": "DAY_START",
 "length": 0,
 "dictionary": "true",
-"mandatory": true
+"mandatory": false
   },
   {
 "column": "HOUR_START",
@@ -112,6 +112,7 @@
 ],
 "aggregation_groups": [
   [
+"DAY_START",
 "HOUR_START",
 "MINUTE_START",
 "SITE",



[3/7] kylin git commit: KYLIN-242 refactor cuboid and cuboid scheduer to support white list by addming joint semantic

2015-12-04 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/07537a9a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java 
b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index 981e19a..2a1304a 100644
--- a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -223,11 +223,11 @@ public class DictionaryManager {
 }
 }
 
-public DictionaryInfo buildDictionary(DataModelDesc model, String dict, 
TblColRef col, DistinctColumnValuesProvider factTableValueProvider) throws 
IOException {
+public DictionaryInfo buildDictionary(DataModelDesc model, boolean 
usingDict, TblColRef col, DistinctColumnValuesProvider factTableValueProvider) 
throws IOException {
 
 logger.info("building dictionary for " + col);
 
-TblColRef srcCol = decideSourceData(model, dict, col);
+TblColRef srcCol = decideSourceData(model, usingDict, col);
 String srcTable = srcCol.getTable();
 String srcColName = srcCol.getName();
 int srcColIdx = srcCol.getColumnDesc().getZeroBasedIndex();
@@ -259,9 +259,9 @@ public class DictionaryManager {
 /**
  * Decide a dictionary's source data, leverage PK-FK relationship.
  */
-public TblColRef decideSourceData(DataModelDesc model, String dict, 
TblColRef col) throws IOException {
+public TblColRef decideSourceData(DataModelDesc model, boolean usingDict, 
TblColRef col) throws IOException {
 // Note FK on fact table is supported by scan the related PK on lookup 
table
-if ("true".equals(dict) || "string".equals(dict) || 
"number".equals(dict) || "any".equals(dict)) {
+if (usingDict) {
 // FK on fact table and join type is inner, use PK from lookup 
instead
 if (model.isFactTable(col.getTable())) {
 TblColRef pkCol = model.findPKByFK(col, "inner");
@@ -270,7 +270,7 @@ public class DictionaryManager {
 }
 return col;
 } else
-throw new IllegalArgumentException("Unknown dictionary value: " + 
dict);
+throw new IllegalArgumentException("Not using Dictionary ");
 }
 
 private String checkDupByInfo(DictionaryInfo dictInfo) throws IOException {

http://git-wip-us.apache.org/repos/asf/kylin/blob/07537a9a/core-job/src/main/java/org/apache/kylin/job/manager/ExecutableManager.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/manager/ExecutableManager.java 
b/core-job/src/main/java/org/apache/kylin/job/manager/ExecutableManager.java
index ff92a50..d73fd26 100644
--- a/core-job/src/main/java/org/apache/kylin/job/manager/ExecutableManager.java
+++ b/core-job/src/main/java/org/apache/kylin/job/manager/ExecutableManager.java
@@ -299,6 +299,7 @@ public class ExecutableManager {
 
 private static AbstractExecutable parseTo(ExecutablePO executablePO) {
 if (executablePO == null) {
+logger.warn("executablePO is null");
 return null;
 }
 String type = executablePO.getType();
@@ -318,8 +319,7 @@ public class ExecutableManager {
 }
 return result;
 } catch (ReflectiveOperationException e) {
-logger.error("cannot parse this job:" + executablePO.getId(), e);
-return null;
+throw new IllegalStateException("cannot parse this job:" + 
executablePO.getId(), e);
 }
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/07537a9a/core-metadata/src/main/java/org/apache/kylin/metadata/model/MeasureDesc.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/model/MeasureDesc.java 
b/core-metadata/src/main/java/org/apache/kylin/metadata/model/MeasureDesc.java
index 618d25a..5d65771 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/model/MeasureDesc.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/model/MeasureDesc.java
@@ -31,8 +31,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 @JsonAutoDetect(fieldVisibility = Visibility.NONE, getterVisibility = 
Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = 
Visibility.NONE)
 public class MeasureDesc {
 
-@JsonProperty("id")
-private int id;
+   
 @JsonProperty("name")
 private String name;
 @JsonProperty("function")
@@ -49,13 +48,7 @@ public class MeasureDesc {
 }
 }
 
-public int getId() {
-return id;
-}
-
-public void setId(int id) {
-this.id = id;
-}
+   
 
 public String getName() {
 return name;
@@ -103,11 +96,6 @@ public class MeasureDesc 

[5/7] kylin git commit: KYLIN-242 refactor cuboid and cuboid scheduer to support white list by addming joint semantic

2015-12-04 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/07537a9a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java 
b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
index 278b59f..7c26e8f 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
@@ -18,11 +18,15 @@
 
 package org.apache.kylin.cube.model;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.kylin.cube.kv.RowConstants;
 import org.apache.kylin.metadata.model.TblColRef;
 
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Objects;
+import com.google.common.base.Preconditions;
 
 /**
  * @author yangli9
@@ -31,37 +35,74 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 @JsonAutoDetect(fieldVisibility = Visibility.NONE, getterVisibility = 
Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = 
Visibility.NONE)
 public class RowKeyColDesc {
 
+public enum ColEncodingType {
+DICT, FIXED_LEN
+}
+
+public class ColEncoding {
+public ColEncodingType type;
+public Object param;
+
+public ColEncoding(ColEncodingType type, Object param) {
+this.type = type;
+this.param = param;
+}
+}
+
 @JsonProperty("column")
 private String column;
-@JsonProperty("length")
-private int length;
-@JsonProperty("dictionary")
-private String dictionary;
-@JsonProperty("mandatory")
-private boolean mandatory = false;
+@JsonProperty("encoding")
+private String encoding;
 
 // computed
+private ColEncoding colEncoding;
 private int bitIndex;
 private TblColRef colRef;
 
-public String getDictionary() {
-return dictionary;
+public void init() {
+
+//dict or fix length?
+Preconditions.checkState(StringUtils.isNotEmpty(this.encoding));
+if (this.encoding.equalsIgnoreCase("dict")) {
+this.colEncoding = new ColEncoding(ColEncodingType.DICT, null);
+} else if (this.encoding.startsWith("fixed_length")) {
+int length = RowConstants.ROWKEY_COL_DEFAULT_LENGTH;
+if (this.encoding.indexOf(":") > 0) {
+length = 
Integer.parseInt(this.encoding.substring(this.encoding.indexOf(":") + 1));
+}
+this.colEncoding = new ColEncoding(ColEncodingType.FIXED_LEN, 
length);
+} else {
+throw new IllegalArgumentException("Not supported row key col 
encoding:" + this.encoding);
+}
+}
+
+public String getEncoding() {
+return encoding;
+}
+
+public void setEncoding(String encoding) {
+this.encoding = encoding;
 }
 
 public String getColumn() {
 return column;
 }
 
-void setColumn(String column) {
+public void setColumn(String column) {
 this.column = column;
 }
 
-public int getLength() {
-return length;
+public boolean isUsingDictionary() {
+return this.colEncoding.type == ColEncodingType.DICT;
+
 }
 
-public boolean isMandatory() {
-return mandatory;
+public int getLength() {
+if (this.colEncoding.type == ColEncodingType.FIXED_LEN) {
+return (Integer) this.colEncoding.param;
+} else {
+return 0;
+}
 }
 
 public int getBitIndex() {
@@ -80,13 +121,9 @@ public class RowKeyColDesc {
 this.colRef = colRef;
 }
 
-public void setDictionary(String dictionary) {
-this.dictionary = dictionary;
-}
-
 @Override
 public String toString() {
-return "RowKeyColDesc [column=" + column + ", length=" + length + ", 
dictionary=" + dictionary + ", mandatory=" + mandatory + "]";
+return Objects.toStringHelper(this).add("column", 
column).add("encoding", encoding).toString();
 }
 
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/07537a9a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyDesc.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyDesc.java 
b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyDesc.java
index abec436..7254df0 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyDesc.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyDesc.java
@@ -18,139 +18,65 @@
 
 package org.apache.kylin.cube.model;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
-import 

[4/7] kylin git commit: KYLIN-242 refactor cuboid and cuboid scheduer to support white list by addming joint semantic

2015-12-04 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/07537a9a/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
new file mode 100644
index 000..17f5b2d
--- /dev/null
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/AggregationGroupRule.java
@@ -0,0 +1,185 @@
+/*
+ * 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.
+*/
+
+package org.apache.kylin.cube.model.validation.rule;
+
+import java.util.Arrays;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.kylin.common.KylinConfig;
+import org.apache.kylin.cube.model.AggregationGroup;
+import org.apache.kylin.cube.model.CubeDesc;
+import org.apache.kylin.cube.model.validation.IValidatorRule;
+import org.apache.kylin.cube.model.validation.ResultLevel;
+import org.apache.kylin.cube.model.validation.ValidateContext;
+
+/**
+ *  find forbid overlaps in each AggregationGroup
+ *  the include dims in AggregationGroup must contain all mandatory, hierarchy 
and joint
+ */
+public class AggregationGroupRule implements IValidatorRule {
+
+@Override
+public void validate(CubeDesc cube, ValidateContext context) {
+inner(cube, context);
+}
+
+private int count(String[][] input) {
+if (input == null) {
+return 0;
+} else {
+int count = 0;
+for (String[] x : input) {
+count += count(x);
+}
+return count;
+}
+}
+
+private int count(String[] input) {
+return input == null ? 0 : input.length;
+}
+
+private void inner(CubeDesc cube, ValidateContext context) {
+int maxSize = getMaxAgrGroupSize();
+
+int index = 0;
+for (AggregationGroup agg : cube.getAggregationGroups()) {
+if (agg.getIncludes() == null) {
+context.addResult(ResultLevel.ERROR, "Aggregation group " + 
index + " includes field not set");
+continue;
+}
+
+if (agg.getSelectRule() == null) {
+context.addResult(ResultLevel.ERROR, "Aggregation group " + 
index + " select rule field not set");
+continue;
+}
+
+Set includeDims = new 
TreeSet<>(String.CASE_INSENSITIVE_ORDER);
+if (agg.getIncludes() != null) {
+for (String include : agg.getIncludes()) {
+includeDims.add(include);
+}
+}
+
+Set mandatoryDims = new 
TreeSet<>(String.CASE_INSENSITIVE_ORDER);
+if (agg.getSelectRule().mandatory_dims != null) {
+for (String m : agg.getSelectRule().mandatory_dims) {
+mandatoryDims.add(m);
+}
+}
+
+Set hierarchyDims = new 
TreeSet<>(String.CASE_INSENSITIVE_ORDER);
+if (agg.getSelectRule().hierarchy_dims != null) {
+for (String[] ss : agg.getSelectRule().hierarchy_dims) {
+for (String s : ss)
+hierarchyDims.add(s);
+}
+}
+
+Set jointDims = new 
TreeSet<>(String.CASE_INSENSITIVE_ORDER);
+if (agg.getSelectRule().joint_dims != null) {
+for (String[] ss : agg.getSelectRule().joint_dims) {
+for (String s : ss)
+jointDims.add(s);
+}
+}
+
+if (!includeDims.containsAll(mandatoryDims) || 
!includeDims.containsAll(hierarchyDims) || !includeDims.containsAll(jointDims)) 
{
+context.addResult(ResultLevel.ERROR, "Aggregation group " + 
index + " Include dims not containing all the used dims");
+continue;
+}
+
+Set normalDims = new 
TreeSet<>(String.CASE_INSENSITIVE_ORDER);
+normalDims.addAll(includeDims);
+

[1/7] kylin git commit: minor: give find command -L option to follow all symbolic links

2015-12-04 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 4afd144af -> 5d16f9bf6


minor: give find command -L option to follow all symbolic links


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

Branch: refs/heads/2.x-staging
Commit: 91b1f922314fbc113709de41add140f4e01382b0
Parents: 4afd144
Author: honma 
Authored: Mon Nov 23 13:36:49 2015 +0800
Committer: honma 
Committed: Fri Dec 4 17:02:02 2015 +0800

--
 build/bin/cleanup_streaming_files.sh | 2 +-
 build/bin/find-hive-dependency.sh| 4 ++--
 build/bin/sample.sh  | 2 +-
 build/bin/streaming_rolllog.sh   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/91b1f922/build/bin/cleanup_streaming_files.sh
--
diff --git a/build/bin/cleanup_streaming_files.sh 
b/build/bin/cleanup_streaming_files.sh
index 3837a2d..4fc9f0e 100644
--- a/build/bin/cleanup_streaming_files.sh
+++ b/build/bin/cleanup_streaming_files.sh
@@ -8,7 +8,7 @@ fi
 
 cd $KYLIN_HOME/logs
 
-for pidfile in `find . -name "$1_1*"`
+for pidfile in `find -L . -name "$1_1*"`
 do
 pidfile=`echo "$pidfile" | cut -c 3-`
 echo "pidfile:$pidfile"

http://git-wip-us.apache.org/repos/asf/kylin/blob/91b1f922/build/bin/find-hive-dependency.sh
--
diff --git a/build/bin/find-hive-dependency.sh 
b/build/bin/find-hive-dependency.sh
index 47f0fbc..5994dda 100644
--- a/build/bin/find-hive-dependency.sh
+++ b/build/bin/find-hive-dependency.sh
@@ -55,7 +55,7 @@ else
 hcatalog_home=${HCAT_HOME}
 fi
 
-hcatalog=`find ${hcatalog_home} -name "hive-hcatalog-core[0-9\.-]*jar" 2>&1 | 
grep -m 1 -v 'Permission denied'`
+hcatalog=`find -L ${hcatalog_home} -name "hive-hcatalog-core[0-9\.-]*jar" 2>&1 
| grep -m 1 -v 'Permission denied'`
 
 if [ -z "$hcatalog" ]
 then
@@ -64,7 +64,7 @@ then
 fi
 
 
-hive_lib=`find "$(dirname $hive_exec_path)" -name '*.jar' ! -name '*calcite*' 
-printf '%p:' | sed 's/:$//'`
+hive_lib=`find -L "$(dirname $hive_exec_path)" -name '*.jar' ! -name 
'*calcite*' -printf '%p:' | sed 's/:$//'`
 hive_dependency=${hive_conf_path}:${hive_lib}:${hcatalog}
 echo "hive dependency: $hive_dependency"
 export hive_dependency

http://git-wip-us.apache.org/repos/asf/kylin/blob/91b1f922/build/bin/sample.sh
--
diff --git a/build/bin/sample.sh b/build/bin/sample.sh
index 6931457..a71d43f 100644
--- a/build/bin/sample.sh
+++ b/build/bin/sample.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 dir=$(dirname ${0})
 source ${dir}/check-env.sh
-job_jar=`find ${KYLIN_HOME}/lib/ -name kylin-job*.jar`
+job_jar=`find -L ${KYLIN_HOME}/lib/ -name kylin-job*.jar`
 echo "Going to create sample tables in hive..."
 cd ${KYLIN_HOME}/sample_cube/data
 hive -f ${KYLIN_HOME}/sample_cube/create_sample_tables.sql  || { exit 1; }

http://git-wip-us.apache.org/repos/asf/kylin/blob/91b1f922/build/bin/streaming_rolllog.sh
--
diff --git a/build/bin/streaming_rolllog.sh b/build/bin/streaming_rolllog.sh
index 9380f49..1fa5bb7 100644
--- a/build/bin/streaming_rolllog.sh
+++ b/build/bin/streaming_rolllog.sh
@@ -7,6 +7,6 @@ KYLIN_LOG_HOME=${KYLIN_HOME}/logs
 cd ${KYLIN_LOG_HOME}
 timestamp=`date +%Y_%m_%d_%H_%M_%S`
 tarfile=logs_archived_at_${timestamp}.tar
-files=`find . ! -name '*.tar' -type f -mtime +1` # keep two days' log
+files=`find -L . ! -name '*.tar' -type f -mtime +1` # keep two days' log
 echo ${files} | xargs tar -cvf ${tarfile}
 echo ${files} | xargs rm
\ No newline at end of file



[3/6] kylin git commit: KYLIN-976 Support Custom Aggregation Types

2015-12-15 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/c721d679/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalMinAggregator.java
--
diff --git 
a/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalMinAggregator.java
 
b/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalMinAggregator.java
deleted file mode 100644
index d0aff5a..000
--- 
a/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalMinAggregator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.kylin.metadata.measure;
-
-import java.math.BigDecimal;
-
-/**
- * @author yangli9
- * 
- */
-public class BigDecimalMinAggregator extends MeasureAggregator {
-
-BigDecimal max = null;
-
-@Override
-public void reset() {
-max = null;
-}
-
-@Override
-public void aggregate(BigDecimal value) {
-if (max == null)
-max = value;
-else if (max.compareTo(value) > 0)
-max = value;
-}
-
-@Override
-public BigDecimal getState() {
-return max;
-}
-
-@Override
-public int getMemBytes() {
-return guessBigDecimalMemBytes();
-}
-
-}

http://git-wip-us.apache.org/repos/asf/kylin/blob/c721d679/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalSerializer.java
--
diff --git 
a/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalSerializer.java
 
b/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalSerializer.java
deleted file mode 100644
index 3c858b2..000
--- 
a/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalSerializer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.kylin.metadata.measure;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-
-import org.apache.kylin.common.util.Bytes;
-import org.apache.kylin.common.util.BytesUtil;
-
-/**
- * @author yangli9
- * 
- */
-public class BigDecimalSerializer extends MeasureSerializer {
-
-@Override
-public void serialize(BigDecimal value, ByteBuffer out) {
-byte[] bytes = value.unscaledValue().toByteArray();
-
-BytesUtil.writeVInt(value.scale(), out);
-BytesUtil.writeVInt(bytes.length, out);
-out.put(bytes);
-}
-
-@Override
-public BigDecimal deserialize(ByteBuffer in) {
-int scale = BytesUtil.readVInt(in);
-int n = BytesUtil.readVInt(in);
-
-byte[] bytes = new byte[n];
-in.get(bytes);
-
-return new BigDecimal(new BigInteger(bytes), scale);
-}
-
-@Override
-public BigDecimal valueOf(byte[] value) {
-if (value == null)
-return new BigDecimal(0);
-else
-return new BigDecimal(Bytes.toString(value));
-}
-
-}

http://git-wip-us.apache.org/repos/asf/kylin/blob/c721d679/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalSumAggregator.java
--
diff --git 
a/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalSumAggregator.java
 
b/metadata/src/main/java/org/apache/kylin/metadata/measure/BigDecimalSumAggregator.java
deleted file mode 100644

[1/3] kylin git commit: KYLIN-1283 Replace GTScanRequest's SerDer form Kryo to manual

2016-01-04 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 4d4e743c7 -> 2ac2f56a1


http://git-wip-us.apache.org/repos/asf/kylin/blob/2ac2f56a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
index 6981214..6acaa8b 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
@@ -38,7 +38,6 @@ import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
 import org.apache.kylin.common.util.CompressionUtils;
 import org.apache.kylin.cube.kv.RowConstants;
-import org.apache.kylin.cube.util.KryoUtils;
 import org.apache.kylin.gridtable.GTRecord;
 import org.apache.kylin.gridtable.GTScanRequest;
 import org.apache.kylin.gridtable.IGTScanner;
@@ -132,8 +131,8 @@ public class CubeVisitService extends 
CubeVisitProtos.CubeVisitService implement
 try {
 this.serviceStartTime = System.currentTimeMillis();
 
-GTScanRequest scanReq = 
KryoUtils.deserialize(HBaseZeroCopyByteString.zeroCopyGetBytes(request.getGtScanRequest()),
 GTScanRequest.class);
-RawScan hbaseRawScan = 
KryoUtils.deserialize(HBaseZeroCopyByteString.zeroCopyGetBytes(request.getHbaseRawScan()),
 RawScan.class);
+GTScanRequest scanReq = 
GTScanRequest.serializer.deserialize(ByteBuffer.wrap(HBaseZeroCopyByteString.zeroCopyGetBytes(request.getGtScanRequest(;
+RawScan hbaseRawScan = 
RawScan.serializer.deserialize(ByteBuffer.wrap(HBaseZeroCopyByteString.zeroCopyGetBytes(request.getHbaseRawScan(;
 List hbaseColumnsToGT = Lists.newArrayList();
 for (IntList intList : request.getHbaseColumnsToGTList()) {
 hbaseColumnsToGT.add(intList.getIntsList());

http://git-wip-us.apache.org/repos/asf/kylin/blob/2ac2f56a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/EndpointAggregators.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/EndpointAggregators.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/EndpointAggregators.java
index 10e80ae..76c6637 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/EndpointAggregators.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/EndpointAggregators.java
@@ -34,7 +34,6 @@ import org.apache.kylin.measure.hllc.HLLCMeasureType;
 import org.apache.kylin.metadata.datatype.DataType;
 import org.apache.kylin.metadata.datatype.LongMutable;
 import org.apache.kylin.metadata.model.FunctionDesc;
-import org.apache.kylin.storage.hbase.common.coprocessor.CoprocessorConstants;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
@@ -214,7 +213,7 @@ public class EndpointAggregators {
 }
 return length;
 }
-
+
 public List deserializeMetricValues(ByteBuffer buffer) {
 List ret = Lists.newArrayList();
 for (int i = 0; i < measureSerializers.length; i++) {
@@ -226,7 +225,7 @@ public class EndpointAggregators {
 }
 
 public static byte[] serialize(EndpointAggregators o) {
-ByteBuffer buf = 
ByteBuffer.allocate(CoprocessorConstants.SERIALIZE_BUFFER_SIZE);
+ByteBuffer buf = 
ByteBuffer.allocate(BytesSerializer.SERIALIZE_BUFFER_SIZE);
 serializer.serialize(o, buf);
 byte[] result = new byte[buf.position()];
 System.arraycopy(buf.array(), 0, result, 0, buf.position());
@@ -237,9 +236,7 @@ public class EndpointAggregators {
 return serializer.deserialize(ByteBuffer.wrap(bytes));
 }
 
-private static final Serializer serializer = new Serializer();
-
-private static class Serializer implements 
BytesSerializer {
+private static final BytesSerializer serializer = new 
BytesSerializer() {
 
 @Override
 public void serialize(EndpointAggregators value, ByteBuffer out) {
@@ -278,7 +275,7 @@ public class EndpointAggregators {
 return new EndpointAggregators(funcNames, dataTypes, infos, 
tableInfo);
 }
 
-}
+};
 
 public int getMeasureSerializeLength() {
 int length = 0;

http://git-wip-us.apache.org/repos/asf/kylin/blob/2ac2f56a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/IIEndpoint.java

[2/3] kylin git commit: KYLIN-1283 Replace GTScanRequest's SerDer form Kryo to manual

2016-01-04 Thread mahongbin
KYLIN-1283 Replace GTScanRequest's SerDer form Kryo to manual


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

Branch: refs/heads/2.x-staging
Commit: 2ac2f56a138e9c014796423bcddb1a01248fe218
Parents: ec5c28d
Author: honma 
Authored: Wed Dec 30 22:20:24 2015 +0800
Committer: honma 
Committed: Mon Jan 4 21:39:54 2016 +0800

--
 .../org/apache/kylin/common/util/ByteArray.java |  10 ++
 .../kylin/common/util/ImmutableBitSet.java  |  34 --
 .../org/apache/kylin/common/util/BasicTest.java |  10 --
 .../kylin/cube/gridtable/CubeCodeSystem.java|  96 ++-
 .../kylin/cube/gridtable/FixLenSerializer.java  | 103 
 .../cube/gridtable/TrimmedCubeCodeSystem.java   | 103 ++--
 .../cube/inmemcubing/InMemCubeBuilder.java  |   7 +-
 .../java/org/apache/kylin/gridtable/GTInfo.java | 100 
 .../org/apache/kylin/gridtable/GTRecord.java|   9 +-
 .../kylin/gridtable/GTSampleCodeSystem.java |  12 ++
 .../org/apache/kylin/gridtable/GTScanRange.java |   2 +
 .../kylin/gridtable/GTScanRangePlanner.java |   7 +-
 .../apache/kylin/gridtable/GTScanRequest.java   |  84 --
 .../java/org/apache/kylin/gridtable/GTUtil.java |  10 ++
 .../inmemcubing/ConcurrentDiskStoreTest.java|   2 +-
 .../cube/inmemcubing/MemDiskStoreTest.java  |   2 +-
 .../gridtable/AggregationCacheSpillTest.java|   6 +-
 .../kylin/gridtable/DictGridTableTest.java  |  41 +--
 .../kylin/gridtable/GTScanReqSerDerTest.java| 116 +++
 .../kylin/gridtable/SimpleGridTableTest.java|   4 +-
 .../metadata/datatype/BigDecimalSerializer.java |   6 +-
 .../kylin/metadata/datatype/DataType.java   |  30 -
 .../index/TableRecordInfoDigest.java|   8 +-
 .../coprocessor/CoprocessorConstants.java   |  26 -
 .../coprocessor/CoprocessorProjector.java   |   9 +-
 .../common/coprocessor/CoprocessorRowType.java  |  10 +-
 .../observer/ObserverAggregators.java   |  13 +--
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java |  18 ++-
 .../storage/hbase/cube/v2/CubeHBaseRPC.java |   8 +-
 .../hbase/cube/v2/CubeSegmentScanner.java   |   7 +-
 .../storage/hbase/cube/v2/CubeStorageQuery.java |   1 -
 .../kylin/storage/hbase/cube/v2/RawScan.java|  56 -
 .../coprocessor/endpoint/CubeVisitService.java  |   5 +-
 .../endpoint/EndpointAggregators.java   |  11 +-
 .../ii/coprocessor/endpoint/IIEndpoint.java |   7 +-
 35 files changed, 702 insertions(+), 271 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/2ac2f56a/core-common/src/main/java/org/apache/kylin/common/util/ByteArray.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/util/ByteArray.java 
b/core-common/src/main/java/org/apache/kylin/common/util/ByteArray.java
index ccd5001..015d5c5 100644
--- a/core-common/src/main/java/org/apache/kylin/common/util/ByteArray.java
+++ b/core-common/src/main/java/org/apache/kylin/common/util/ByteArray.java
@@ -105,6 +105,16 @@ public class ByteArray implements Comparable, 
Serializable {
 return copy;
 }
 
+//notice this will have a length header
+public void exportData(ByteBuffer out) {
+BytesUtil.writeByteArray(this.data, this.offset, this.length, out);
+}
+
+public static ByteArray importData(ByteBuffer in) {
+byte[] bytes = BytesUtil.readByteArray(in);
+return new ByteArray(bytes);
+}
+
 public void copyFrom(ByteArray other) {
 System.arraycopy(other.array(), other.offset, data, offset, 
other.length);
 this.length = other.length;

http://git-wip-us.apache.org/repos/asf/kylin/blob/2ac2f56a/core-common/src/main/java/org/apache/kylin/common/util/ImmutableBitSet.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/util/ImmutableBitSet.java 
b/core-common/src/main/java/org/apache/kylin/common/util/ImmutableBitSet.java
index f5a22d2..a36bcef 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/util/ImmutableBitSet.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/util/ImmutableBitSet.java
@@ -17,6 +17,7 @@
  */
 package org.apache.kylin.common.util;
 
+import java.nio.ByteBuffer;
 import java.util.BitSet;
 
 public class ImmutableBitSet {
@@ -30,6 +31,16 @@ public class ImmutableBitSet {
 this(newBitSet(index));
 }
 
+public ImmutableBitSet(BitSet set) {
+this.set = (BitSet) set.clone();
+this.arr = new 

[3/3] kylin git commit: KYLIN-1270 improve TimedJsonStreamParser to support week_start, month_start, quarter_start, year_start

2016-01-04 Thread mahongbin
KYLIN-1270 improve TimedJsonStreamParser to support week_start, month_start, 
quarter_start, year_start


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

Branch: refs/heads/2.x-staging
Commit: ec5c28d99d58c761b7dd6a0be2301fc8563f156c
Parents: 4d4e743
Author: honma 
Authored: Wed Dec 30 21:33:37 2015 +0800
Committer: honma 
Committed: Mon Jan 4 21:39:54 2016 +0800

--
 .../org/apache/kylin/common/util/TimeUtil.java  | 44 +++--
 .../apache/kylin/common/util/TimeUtilTest.java  | 21 +++-
 .../source/kafka/TimedJsonStreamParser.java | 51 ++--
 3 files changed, 94 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/ec5c28d9/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java 
b/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
index c79e88b..17868a6 100644
--- a/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
+++ b/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
@@ -1,12 +1,13 @@
 package org.apache.kylin.common.util;
 
+import java.util.Calendar;
+import java.util.TimeZone;
+
 /**
  */
 public class TimeUtil {
-public enum NormalizedTimeUnit {
-MINUTE, HOUR, DAY
-}
 
+private static TimeZone gmt = TimeZone.getTimeZone("GMT");
 private static long ONE_MINUTE_TS = 60 * 1000;
 private static long ONE_HOUR_TS = 60 * ONE_MINUTE_TS;
 private static long ONE_DAY_TS = 24 * ONE_HOUR_TS;
@@ -23,7 +24,40 @@ public class TimeUtil {
 return ts / ONE_DAY_TS * ONE_DAY_TS;
 }
 
-public static long getNextPeriodStart(long ts, long period) {
-return ((ts + period - 1) / period) * period;
+public static long getWeekStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(getDayStart(ts));
+calendar.add(Calendar.DAY_OF_WEEK, calendar.getFirstDayOfWeek() - 
calendar.get(Calendar.DAY_OF_WEEK));
+return calendar.getTimeInMillis();
 }
+
+public static long getMonthStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(ts);
+int year = calendar.get(Calendar.YEAR);
+int month = calendar.get(Calendar.MONTH);
+calendar.clear();
+calendar.set(year, month, 1);
+return calendar.getTimeInMillis();
+}
+
+public static long getQuarterStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(ts);
+int year = calendar.get(Calendar.YEAR);
+int month = calendar.get(Calendar.MONTH);
+calendar.clear();
+calendar.set(year, month / 3 * 3, 1);
+return calendar.getTimeInMillis();
+}
+
+public static long getYearStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(ts);
+int year = calendar.get(Calendar.YEAR);
+calendar.clear();
+calendar.set(year, 0, 1);
+return calendar.getTimeInMillis();
+}
+
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/ec5c28d9/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
--
diff --git 
a/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java 
b/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
index d81d49a..3fdf6aa 100644
--- a/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
+++ b/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
@@ -3,14 +3,19 @@ package org.apache.kylin.common.util;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
+import java.util.TimeZone;
 
-import org.apache.kylin.common.util.TimeUtil.NormalizedTimeUnit;
 import org.junit.Assert;
 import org.junit.Test;
 
 /**
  */
 public class TimeUtilTest {
+
+public enum NormalizedTimeUnit {
+MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR
+}
+
 public static long normalizeTime(long timeMillis, NormalizedTimeUnit unit) 
{
 Calendar a = Calendar.getInstance();
 Calendar b = Calendar.getInstance();
@@ -28,6 +33,7 @@ public class TimeUtilTest {
 @Test
 public void basicTest() throws ParseException {
 java.text.DateFormat dateFormat = new SimpleDateFormat("/MM/dd 
HH:mm:ss");
+

[1/2] kylin git commit: KYLIN-1270 bug fix by removing formatTs's affections

2016-01-05 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging f0a8078a0 -> f7057e87c


KYLIN-1270 bug fix by removing formatTs's affections


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

Branch: refs/heads/2.x-staging
Commit: 280fce6cc817f85b4ebdbe71513fb3b4b7d329c3
Parents: f0a8078
Author: honma 
Authored: Tue Jan 5 10:43:56 2016 +0800
Committer: honma 
Committed: Tue Jan 5 16:10:58 2016 +0800

--
 .../kylin/source/kafka/TimedJsonStreamParser.java   | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/280fce6c/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
--
diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
index c1d8379..0907623 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
@@ -65,7 +65,7 @@ public final class TimedJsonStreamParser extends 
StreamingParser {
 private static final Logger logger = 
LoggerFactory.getLogger(TimedJsonStreamParser.class);
 
 private List allColumns;
-private boolean formatTs = false;
+private boolean formatTs = false;//not used
 private final ObjectMapper mapper = new ObjectMapper();
 private String tsColName = "timestamp";
 private final JavaType mapType = MapType.construct(HashMap.class, 
SimpleType.construct(String.class), SimpleType.construct(String.class));
@@ -119,26 +119,26 @@ public final class TimedJsonStreamParser extends 
StreamingParser {
 String columnName = column.getName();
 if (columnName.equalsIgnoreCase("minute_start")) {
 normalized = TimeUtil.getMinuteStart(t);
-result.add(formatTs ? 
DateFormat.formatToTimeStr(normalized) : String.valueOf(normalized));
+result.add(DateFormat.formatToTimeStr(normalized));
 } else if (columnName.equalsIgnoreCase("hour_start")) {
 normalized = TimeUtil.getHourStart(t);
-result.add(formatTs ? 
DateFormat.formatToTimeStr(normalized) : String.valueOf(normalized));
+result.add(DateFormat.formatToTimeStr(normalized));
 } else if (columnName.equalsIgnoreCase("day_start")) {
 //from day_start on, formatTs will output date format
 normalized = TimeUtil.getDayStart(t);
-result.add(formatTs ? 
DateFormat.formatToDateStr(normalized) : String.valueOf(normalized));
+result.add(DateFormat.formatToDateStr(normalized));
 } else if (columnName.equalsIgnoreCase("week_start")) {
 normalized = TimeUtil.getWeekStart(t);
-result.add(formatTs ? 
DateFormat.formatToDateStr(normalized) : String.valueOf(normalized));
+result.add(DateFormat.formatToDateStr(normalized));
 } else if (columnName.equalsIgnoreCase("month_start")) {
 normalized = TimeUtil.getMonthStart(t);
-result.add(formatTs ? 
DateFormat.formatToDateStr(normalized) : String.valueOf(normalized));
+result.add(DateFormat.formatToDateStr(normalized));
 } else if (columnName.equalsIgnoreCase("quarter_start")) {
 normalized = TimeUtil.getQuarterStart(t);
-result.add(formatTs ? 
DateFormat.formatToDateStr(normalized) : String.valueOf(normalized));
+result.add(DateFormat.formatToDateStr(normalized));
 } else if (columnName.equalsIgnoreCase("year_start")) {
 normalized = TimeUtil.getYearStart(t);
-result.add(formatTs ? 
DateFormat.formatToDateStr(normalized) : String.valueOf(normalized));
+result.add(DateFormat.formatToDateStr(normalized));
 } else {
 String x = root.get(columnName.toLowerCase());
 result.add(x);



kylin git commit: KYLIN-1294 disabled related test cases as it is depending on Calcite-980

2016-01-07 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging a1b26ff9f -> bb130af0a


KYLIN-1294 disabled related test cases as it is depending on Calcite-980


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

Branch: refs/heads/2.x-staging
Commit: bb130af0a37f36fbc76eb9a549b222df964e7761
Parents: a1b26ff
Author: honma 
Authored: Fri Jan 8 10:50:41 2016 +0800
Committer: honma 
Committed: Fri Jan 8 10:50:41 2016 +0800

--
 .../metadata/filter/ConstantTupleFilter.java|  9 ++
 .../metadata/filter/LogicalTupleFilter.java | 19 +++--
 query/src/test/resources/query/sql/query92.sql  | 30 
 .../resources/query/sql/query92.sql.disabled| 30 
 query/src/test/resources/query/sql/query93.sql  | 30 
 .../resources/query/sql/query93.sql.disabled| 30 
 query/src/test/resources/query/sql/query94.sql  | 30 
 .../resources/query/sql/query94.sql.disabled| 30 
 query/src/test/resources/query/sql/query95.sql  | 30 
 .../resources/query/sql/query95.sql.disabled| 30 
 10 files changed, 146 insertions(+), 122 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
index cc3add2..3056a9c 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ConstantTupleFilter.java
@@ -54,6 +54,15 @@ public class ConstantTupleFilter extends TupleFilter {
 }
 
 @Override
+public TupleFilter reverse() {
+if (this.evaluate(null, null)) {
+return ConstantTupleFilter.FALSE;
+} else {
+return ConstantTupleFilter.TRUE;
+}
+}
+
+@Override
 public void addChild(TupleFilter child) {
 throw new UnsupportedOperationException("This is " + this + " and 
child is " + child);
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
index 83404eb..0929cf1 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/LogicalTupleFilter.java
@@ -46,12 +46,27 @@ public class LogicalTupleFilter extends TupleFilter {
 return cloneTuple;
 }
 
+
+//private TupleFilter reverseNestedNots(TupleFilter filter, int depth) 
{
+//if ((filter instanceof LogicalTupleFilter) && (filter.operator 
== FilterOperatorEnum.NOT)) {
+//assert (filter.children.size() == 1);
+//return reverseNestedNots(filter.children.get(0), depth + 1);
+//}
+//
+//if (depth % 2 == 1) {
+//return filter;
+//} else {
+//return filter.reverse();
+//}
+//}
+
+
 @Override
 public TupleFilter reverse() {
 switch (operator) {
 case NOT:
-assert (children.size() == 1);
-return children.get(0);
+throw new IllegalStateException("not( not in ()) is invalid 
syntax");
+//return reverseNestedNots(this, 0);
 case AND:
 case OR:
 LogicalTupleFilter reverse = new 
LogicalTupleFilter(REVERSE_OP_MAP.get(operator));

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb130af0/query/src/test/resources/query/sql/query92.sql
--
diff --git a/query/src/test/resources/query/sql/query92.sql 
b/query/src/test/resources/query/sql/query92.sql
deleted file mode 100644
index e551a45..000
--- a/query/src/test/resources/query/sql/query92.sql
+++ /dev/null
@@ -1,30 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional 

[2/2] kylin git commit: KYLIN-1293 keep kylin log clean

2016-01-07 Thread mahongbin
KYLIN-1293 keep kylin log clean


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

Branch: refs/heads/2.x-staging
Commit: 50b3f429d557a748198824a79483c77252a0a483
Parents: c1e83b0
Author: honma 
Authored: Fri Jan 8 11:01:55 2016 +0800
Committer: honma 
Committed: Fri Jan 8 11:03:06 2016 +0800

--
 .../org/apache/kylin/common/KylinConfig.java|   3 +-
 .../apache/kylin/common/KylinConfigBase.java|  28 +-
 .../kylin/common/persistence/ResourceStore.java |   2 +-
 .../apache/kylin/common/util/BytesSplitter.java |  42 -
 .../kylin/common/util/CompressionUtils.java |   4 +-
 .../common/util/MemoryBudgetController.java |  10 +-
 .../src/main/resources/kylin-log4j.properties   |   2 +-
 .../java/org/apache/kylin/cube/CubeManager.java |   2 +-
 .../inmemcubing/AbstractInMemCubeBuilder.java   |   2 +-
 .../cube/inmemcubing/InMemCubeBuilder.java  |  10 +-
 .../org/apache/kylin/cube/util/CubingUtils.java |   1 -
 .../apache/kylin/dict/DictionaryManager.java|  16 +-
 .../apache/kylin/query/routing/QueryRouter.java |   5 +-
 .../apache/kylin/query/routing/RoutingRule.java |   7 +-
 .../kylin/rest/controller/UserController.java   |   6 +-
 .../kylin/rest/service/BadQueryDetector.java|   9 +-
 .../apache/kylin/rest/service/BasicService.java |  24 +-
 .../apache/kylin/rest/service/CacheService.java |  14 +-
 .../apache/kylin/rest/service/QueryService.java |   2 +-
 .../resources/kylin-server-log4j.properties |  97 +--
 .../kylin/storage/hbase/HBaseResourceStore.java | 762 +--
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java |   8 +-
 22 files changed, 508 insertions(+), 548 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/50b3f429/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index bc18989..81f5827 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -99,8 +99,7 @@ public class KylinConfig extends KylinConfigBase {
 throw new IllegalStateException("Metadata uri : " + 
metaUri + " is not a valid REST URI address");
 }
 } catch (Exception e) {
-logger.info(e.getLocalizedMessage());
-throw new IllegalStateException("Metadata uri : " + metaUri + " is 
not recognized");
+throw new IllegalStateException("Metadata uri : " + metaUri + " is 
not recognized", e);
 }
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/50b3f429/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index e7c373e..96c76f0 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -44,7 +44,7 @@ import com.google.common.collect.Sets;
 public class KylinConfigBase implements Serializable {
 
 private static final Logger logger = 
LoggerFactory.getLogger(KylinConfigBase.class);
-
+
 /*
  * DON'T DEFINE CONSTANTS FOR PROPERTY KEYS!
  * 
@@ -62,9 +62,9 @@ public class KylinConfigBase implements Serializable {
 }
 
 // 

-
+
 private volatile Properties properties = new Properties();
-
+
 public String getOptional(String prop) {
 return getOptional(prop, null);
 }
@@ -90,7 +90,7 @@ public class KylinConfigBase implements Serializable {
 }
 return r;
 }
-
+
 /**
  * Use with care, properties should be read-only. This is for testing 
mostly.
  */
@@ -98,7 +98,7 @@ public class KylinConfigBase implements Serializable {
 logger.info("Kylin Config was updated with " + key + " : " + value);
 properties.setProperty(key, value);
 }
-
+
 protected Properties getAllProperties() {
 return properties;
 }
@@ -114,9 +114,9 @@ public class KylinConfigBase implements Serializable {
 }
 this.properties = newProperties;
 }
-
+
 // 

-
+
 public String 

[1/2] kylin git commit: bug fix: remove checkDupByInfo in merge dict

2016-01-05 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc ea702c8a0 -> 5516466b3


bug fix: remove checkDupByInfo in merge dict


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

Branch: refs/heads/2.0-rc
Commit: 5516466b30d0db8a38a64d622877e3b81bfa55f2
Parents: 1dc361c
Author: honma 
Authored: Tue Jan 5 16:11:29 2016 +0800
Committer: honma 
Committed: Wed Jan 6 10:05:29 2016 +0800

--
 .../java/org/apache/kylin/dict/DictionaryManager.java | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5516466b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java 
b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index 981e19a..78b4307 100644
--- a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -199,11 +199,11 @@ public class DictionaryManager {
 signature.setLastModifiedTime(System.currentTimeMillis());
 signature.setPath("merged_with_no_original_path");
 
-String dupDict = checkDupByInfo(newDictInfo);
-if (dupDict != null) {
-logger.info("Identical dictionary input " + newDictInfo.getInput() 
+ ", reuse existing dictionary at " + dupDict);
-return getDictionaryInfo(dupDict);
-}
+//String dupDict = checkDupByInfo(newDictInfo);
+//if (dupDict != null) {
+//logger.info("Identical dictionary input " + 
newDictInfo.getInput() + ", reuse existing dictionary at " + dupDict);
+//return getDictionaryInfo(dupDict);
+//}
 
 //check for cases where merging dicts are actually same
 boolean identicalSourceDicts = true;



[2/2] kylin git commit: Revert "KYLIN-1270"

2016-01-05 Thread mahongbin
Revert "KYLIN-1270"

This reverts commit d3648849626c78b1e44df4050a620c25e5ee805f.


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

Branch: refs/heads/2.0-rc
Commit: 1dc361c6d30d1b01e0bf2c3677f6a6d90f670396
Parents: ea702c8
Author: honma 
Authored: Tue Jan 5 16:10:45 2016 +0800
Committer: honma 
Committed: Wed Jan 6 10:05:29 2016 +0800

--
 .../org/apache/kylin/source/kafka/TimedJsonStreamParser.java| 5 -
 1 file changed, 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/1dc361c6/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
--
diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
index f7f15ab..0907623 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/TimedJsonStreamParser.java
@@ -36,7 +36,6 @@ package org.apache.kylin.source.kafka;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -109,10 +108,8 @@ public final class TimedJsonStreamParser extends 
StreamingParser {
 //" cannot be null, the message offset is " + 
messageAndOffset.getOffset() + " content is " + new 
String(messageAndOffset.getRawData()));
 long t;
 if (StringUtils.isEmpty(tsStr)) {
-logger.info("tsStr not found");
 t = 0;
 } else {
-logger.info("tsStr is :" + tsStr);
 t = Long.valueOf(tsStr);
 }
 ArrayList result = Lists.newArrayList();
@@ -148,8 +145,6 @@ public final class TimedJsonStreamParser extends 
StreamingParser {
 }
 }
 
-logger.info(Arrays.toString(result.toArray()));
-
 return new StreamingMessage(result, messageAndOffset.offset(), t, 
Collections. emptyMap());
 
 } catch (IOException e) {



kylin git commit: KYLIN-1239 attribute each htable with team contact and owner name

2015-12-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 0de917283 -> 6ec2adbbe


KYLIN-1239 attribute each htable with team contact and owner name


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

Branch: refs/heads/2.0-rc
Commit: 6ec2adbbe3f26fb78c18b26f61a9c7f587ed34c0
Parents: 0de9172
Author: honma 
Authored: Thu Dec 17 11:31:55 2015 +0800
Committer: honma 
Committed: Tue Dec 22 16:10:36 2015 +0800

--
 build/conf/kylin.properties  |  5 +
 .../org/apache/kylin/common/KylinConfig.java |  6 ++
 .../realization/IRealizationConstants.java   |  5 -
 .../apache/kylin/engine/spark/SparkCubing.java   |  3 +--
 .../test_case_data/localmeta/kylin.properties|  5 +
 examples/test_case_data/sandbox/kylin.properties |  5 +
 .../storage/hbase/steps/CreateHTableJob.java |  4 +---
 .../storage/hbase/steps/CubeHTableUtil.java  | 19 ---
 .../hbase/steps/HBaseStreamingOutput.java|  2 +-
 .../kylin/storage/hbase/util/CleanHtableCLI.java |  6 +-
 10 files changed, 49 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/6ec2adbb/build/conf/kylin.properties
--
diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties
index 2c34e92..f2170bd 100644
--- a/build/conf/kylin.properties
+++ b/build/conf/kylin.properties
@@ -17,6 +17,11 @@
 
 ## Config for Kylin Engine ##
 
+
+# optional information for the owner of kylin platform, it can be your team's 
email
+# currently it will be attached to each kylin's htable attribute
+kylin.owner=who...@kylin.apache.org
+
 # List of web servers in use, this enables one web server instance to sync up 
with other servers.
 kylin.rest.servers=localhost:7070
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/6ec2adbb/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index eb76534..c65ade4 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -55,6 +55,8 @@ public class KylinConfig implements Serializable {
  * NOTE: These key constants should be private or even better be removed.
  *   All external access should go through public methods.
  */
+public static final String KYLIN_OWNER = "kylin.owner";
+
 public static final String KYLIN_STORAGE_URL = "kylin.storage.url";
 
 public static final String KYLIN_METADATA_URL = "kylin.metadata.url";
@@ -706,6 +708,10 @@ public class KylinConfig implements Serializable {
 return this.getOptional(HIVE_DATABASE_FOR_INTERMEDIATE_TABLE, 
"default");
 }
 
+public String getKylinOwner() {
+return this.getOptional(KYLIN_OWNER, "");
+}
+
 public void setRunAsRemoteCommand(String v) {
 properties.setProperty(KYLIN_JOB_RUN_AS_REMOTE_CMD, v);
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/6ec2adbb/core-metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
index 7cbcdf8..138a209 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/IRealizationConstants.java
@@ -31,7 +31,10 @@ public class IRealizationConstants {
  * which kylin server(represented by its kylin_metadata prefix) owns this 
htable
  */
 public final static String HTableTag = "KYLIN_HOST";
-
+
+public final static String HTableOwner = "OWNER";
+
+public final static String HTableUser = "USER";
 
 public final static String HTableCreationTime = "CREATION_TIME";
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/6ec2adbb/engine-spark/src/main/java/org/apache/kylin/engine/spark/SparkCubing.java
--
diff --git 
a/engine-spark/src/main/java/org/apache/kylin/engine/spark/SparkCubing.java 
b/engine-spark/src/main/java/org/apache/kylin/engine/spark/SparkCubing.java
index 01d97fd..9a2610c 100644
--- 

kylin git commit: fix typo

2015-12-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 3fc3883a4 -> 7849a47ff


fix typo


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

Branch: refs/heads/2.x-staging
Commit: 7849a47ffbc8d7d5dac42a46b3579aa4a7275a09
Parents: 3fc3883
Author: honma 
Authored: Tue Dec 22 15:24:07 2015 +0800
Committer: honma 
Committed: Tue Dec 22 16:11:12 2015 +0800

--
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7849a47f/README.md
--
diff --git a/README.md b/README.md
index 73313f5..10bc863 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Get Help
 The fastest way to get response from our developers is to send email to our 
mail list ,   
 and remember to subscribe our mail list via 

 
-Licnese
+License
 
 Please refer to 
[LICENSE](https://github.com/apache/incubator-kylin/blob/master/LICENSE) file.
 



kylin git commit: KYLIN-1270 improve TimedJsonStreamParser to support week_start, month_start, quarter_start, year_start

2015-12-30 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc e0748f5b4 -> 5c83a14a4


KYLIN-1270 improve TimedJsonStreamParser to support week_start, month_start, 
quarter_start, year_start


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

Branch: refs/heads/2.0-rc
Commit: 5c83a14a4bea5e1496d49ed362593aaaf84922ed
Parents: e0748f5
Author: honma 
Authored: Wed Dec 30 21:33:37 2015 +0800
Committer: honma 
Committed: Wed Dec 30 21:35:43 2015 +0800

--
 .../org/apache/kylin/common/util/TimeUtil.java  | 44 +++--
 .../apache/kylin/common/util/TimeUtilTest.java  | 21 +++-
 .../source/kafka/TimedJsonStreamParser.java | 51 ++--
 3 files changed, 94 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5c83a14a/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java 
b/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
index c79e88b..17868a6 100644
--- a/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
+++ b/core-common/src/main/java/org/apache/kylin/common/util/TimeUtil.java
@@ -1,12 +1,13 @@
 package org.apache.kylin.common.util;
 
+import java.util.Calendar;
+import java.util.TimeZone;
+
 /**
  */
 public class TimeUtil {
-public enum NormalizedTimeUnit {
-MINUTE, HOUR, DAY
-}
 
+private static TimeZone gmt = TimeZone.getTimeZone("GMT");
 private static long ONE_MINUTE_TS = 60 * 1000;
 private static long ONE_HOUR_TS = 60 * ONE_MINUTE_TS;
 private static long ONE_DAY_TS = 24 * ONE_HOUR_TS;
@@ -23,7 +24,40 @@ public class TimeUtil {
 return ts / ONE_DAY_TS * ONE_DAY_TS;
 }
 
-public static long getNextPeriodStart(long ts, long period) {
-return ((ts + period - 1) / period) * period;
+public static long getWeekStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(getDayStart(ts));
+calendar.add(Calendar.DAY_OF_WEEK, calendar.getFirstDayOfWeek() - 
calendar.get(Calendar.DAY_OF_WEEK));
+return calendar.getTimeInMillis();
 }
+
+public static long getMonthStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(ts);
+int year = calendar.get(Calendar.YEAR);
+int month = calendar.get(Calendar.MONTH);
+calendar.clear();
+calendar.set(year, month, 1);
+return calendar.getTimeInMillis();
+}
+
+public static long getQuarterStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(ts);
+int year = calendar.get(Calendar.YEAR);
+int month = calendar.get(Calendar.MONTH);
+calendar.clear();
+calendar.set(year, month / 3 * 3, 1);
+return calendar.getTimeInMillis();
+}
+
+public static long getYearStart(long ts) {
+Calendar calendar = Calendar.getInstance(gmt);
+calendar.setTimeInMillis(ts);
+int year = calendar.get(Calendar.YEAR);
+calendar.clear();
+calendar.set(year, 0, 1);
+return calendar.getTimeInMillis();
+}
+
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/5c83a14a/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
--
diff --git 
a/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java 
b/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
index d81d49a..3fdf6aa 100644
--- a/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
+++ b/core-common/src/test/java/org/apache/kylin/common/util/TimeUtilTest.java
@@ -3,14 +3,19 @@ package org.apache.kylin.common.util;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
+import java.util.TimeZone;
 
-import org.apache.kylin.common.util.TimeUtil.NormalizedTimeUnit;
 import org.junit.Assert;
 import org.junit.Test;
 
 /**
  */
 public class TimeUtilTest {
+
+public enum NormalizedTimeUnit {
+MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR
+}
+
 public static long normalizeTime(long timeMillis, NormalizedTimeUnit unit) 
{
 Calendar a = Calendar.getInstance();
 Calendar b = Calendar.getInstance();
@@ -28,6 +33,7 @@ public class TimeUtilTest {
 @Test
 public void basicTest() throws ParseException {
 java.text.DateFormat dateFormat 

kylin git commit: KYLIN-1301 fix IT

2016-01-11 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 28b2154fd -> 3904a1767


KYLIN-1301 fix IT


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

Branch: refs/heads/2.0-rc
Commit: 3904a17671ba150728f9dbc40d1504d76401f9e6
Parents: 28b2154
Author: honma 
Authored: Mon Jan 11 16:57:52 2016 +0800
Committer: honma 
Committed: Mon Jan 11 16:57:52 2016 +0800

--
 query/src/test/resources/query/sql/query96.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3904a176/query/src/test/resources/query/sql/query96.sql
--
diff --git a/query/src/test/resources/query/sql/query96.sql 
b/query/src/test/resources/query/sql/query96.sql
index a1eda6f..c9c0c6f 100644
--- a/query/src/test/resources/query/sql/query96.sql
+++ b/query/src/test/resources/query/sql/query96.sql
@@ -24,5 +24,5 @@ inner JOIN edw.test_cal_dt as test_cal_dt
  ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
  inner JOIN edw.test_sites as test_sites
  ON test_kylin_fact.lstg_site_id = test_sites.site_id
- where test_kylin_fact.lstg_format_name='XXXUnknownFP-GTC' 
+ where test_kylin_fact.lstg_format_name='XXXUnknown' 
  group by test_cal_dt.cal_dt 



kylin git commit: KYLIN-1307 revisit growing dictionary

2016-01-12 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 3904a1767 -> 9f743fb78


KYLIN-1307 revisit growing dictionary


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

Branch: refs/heads/2.0-rc
Commit: 9f743fb7871d02f2c06e8fe21d288de1f502c939
Parents: 3904a17
Author: honma 
Authored: Tue Jan 12 16:06:39 2016 +0800
Committer: honma 
Committed: Tue Jan 12 16:06:39 2016 +0800

--
 .../apache/kylin/common/KylinConfigBase.java|  5 +-
 .../apache/kylin/dict/DictionaryManager.java| 58 +++-
 .../apache/kylin/rest/service/CacheService.java |  2 +
 3 files changed, 51 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/9f743fb7/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index a5ca690..4c640f3 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -412,7 +412,6 @@ public class KylinConfigBase implements Serializable {
 return Integer.parseInt(getOptional("kylin.dict.cache.max.entry", 
"3000"));
 }
 
-
 public boolean getQueryRunLocalCoprocessor() {
 return 
Boolean.parseBoolean(getOptional("kylin.query.run.local.coprocessor", "false"));
 }
@@ -453,6 +452,10 @@ public class KylinConfigBase implements Serializable {
 return 
Integer.parseInt(this.getOptional("kylin.hbase.scan.cache_rows", "1024"));
 }
 
+public boolean isGrowingDictEnabled() {
+return 
Boolean.parseBoolean(this.getOptional("kylin.dict.growing.enabled", "false"));
+}
+
 public int getHBaseScanMaxResultSize() {
 return 
Integer.parseInt(this.getOptional("kylin.hbase.scan.max_result_size", "" + (5 * 
1024 * 1024))); // 5 MB
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/9f743fb7/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java 
b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index b3cd634..cd12f01 100644
--- a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -139,26 +139,58 @@ public class DictionaryManager {
 
 initDictInfo(newDict, newDictInfo);
 
-DictionaryInfo largestDictInfo = findLargestDictInfo(newDictInfo);
-if (largestDictInfo != null) {
-largestDictInfo = 
getDictionaryInfo(largestDictInfo.getResourcePath());
-Dictionary largestDictObject = 
largestDictInfo.getDictionaryObject();
-if (largestDictObject.contains(newDict)) {
-logger.info("dictionary content " + newDict + ", is contained 
by  dictionary at " + largestDictInfo.getResourcePath());
-return largestDictInfo;
-} else if (newDict.contains(largestDictObject)) {
-logger.info("dictionary content " + newDict + " is by far the 
largest, save it");
-return saveNewDict(newDictInfo);
+if (KylinConfig.getInstanceFromEnv().isGrowingDictEnabled()) {
+DictionaryInfo largestDictInfo = findLargestDictInfo(newDictInfo);
+if (largestDictInfo != null) {
+largestDictInfo = 
getDictionaryInfo(largestDictInfo.getResourcePath());
+Dictionary largestDictObject = 
largestDictInfo.getDictionaryObject();
+if (largestDictObject.contains(newDict)) {
+logger.info("dictionary content " + newDict + ", is 
contained by  dictionary at " + largestDictInfo.getResourcePath());
+return largestDictInfo;
+} else if (newDict.contains(largestDictObject)) {
+logger.info("dictionary content " + newDict + " is by far 
the largest, save it");
+return saveNewDict(newDictInfo);
+} else {
+logger.info("merge dict and save...");
+return mergeDictionary(Lists.newArrayList(newDictInfo, 
largestDictInfo));
+}
 } else {
-logger.info("merge dict and save...");
-return mergeDictionary(Lists.newArrayList(newDictInfo, 

[6/9] kylin git commit: KYLIN-1307 revisit growing dictionary

2016-01-13 Thread mahongbin
KYLIN-1307 revisit growing dictionary


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

Branch: refs/heads/2.x-staging
Commit: 1c5784b28ff9bbeb4a1ee9d4db3b05461641165d
Parents: 142eaf4
Author: honma 
Authored: Tue Jan 12 16:06:39 2016 +0800
Committer: honma 
Committed: Wed Jan 13 17:52:57 2016 +0800

--
 .../apache/kylin/common/KylinConfigBase.java|  5 +-
 .../apache/kylin/dict/DictionaryManager.java| 58 +++-
 .../apache/kylin/rest/service/CacheService.java |  2 +
 3 files changed, 51 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/1c5784b2/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index f6775e8..bfad306 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -412,7 +412,6 @@ public class KylinConfigBase implements Serializable {
 return Integer.parseInt(getOptional("kylin.dict.cache.max.entry", 
"3000"));
 }
 
-
 public boolean getQueryRunLocalCoprocessor() {
 return 
Boolean.parseBoolean(getOptional("kylin.query.run.local.coprocessor", "false"));
 }
@@ -453,6 +452,10 @@ public class KylinConfigBase implements Serializable {
 return 
Integer.parseInt(this.getOptional("kylin.hbase.scan.cache_rows", "1024"));
 }
 
+public boolean isGrowingDictEnabled() {
+return 
Boolean.parseBoolean(this.getOptional("kylin.dict.growing.enabled", "false"));
+}
+
 public int getHBaseScanMaxResultSize() {
 return 
Integer.parseInt(this.getOptional("kylin.hbase.scan.max_result_size", "" + (5 * 
1024 * 1024))); // 5 MB
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/1c5784b2/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java 
b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index 630b2b2..d49e43d 100644
--- a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -140,26 +140,58 @@ public class DictionaryManager {
 
 initDictInfo(newDict, newDictInfo);
 
-DictionaryInfo largestDictInfo = findLargestDictInfo(newDictInfo);
-if (largestDictInfo != null) {
-largestDictInfo = 
getDictionaryInfo(largestDictInfo.getResourcePath());
-Dictionary largestDictObject = 
largestDictInfo.getDictionaryObject();
-if (largestDictObject.contains(newDict)) {
-logger.info("dictionary content " + newDict + ", is contained 
by  dictionary at " + largestDictInfo.getResourcePath());
-return largestDictInfo;
-} else if (newDict.contains(largestDictObject)) {
-logger.info("dictionary content " + newDict + " is by far the 
largest, save it");
-return saveNewDict(newDictInfo);
+if (KylinConfig.getInstanceFromEnv().isGrowingDictEnabled()) {
+DictionaryInfo largestDictInfo = findLargestDictInfo(newDictInfo);
+if (largestDictInfo != null) {
+largestDictInfo = 
getDictionaryInfo(largestDictInfo.getResourcePath());
+Dictionary largestDictObject = 
largestDictInfo.getDictionaryObject();
+if (largestDictObject.contains(newDict)) {
+logger.info("dictionary content " + newDict + ", is 
contained by  dictionary at " + largestDictInfo.getResourcePath());
+return largestDictInfo;
+} else if (newDict.contains(largestDictObject)) {
+logger.info("dictionary content " + newDict + " is by far 
the largest, save it");
+return saveNewDict(newDictInfo);
+} else {
+logger.info("merge dict and save...");
+return mergeDictionary(Lists.newArrayList(newDictInfo, 
largestDictInfo));
+}
 } else {
-logger.info("merge dict and save...");
-return mergeDictionary(Lists.newArrayList(newDictInfo, 
largestDictInfo));
+logger.info("first dict of this column, save it 

[9/9] kylin git commit: KYLIN-1308 maintain CubeHBaseScanRPC

2016-01-13 Thread mahongbin
KYLIN-1308 maintain CubeHBaseScanRPC


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

Branch: refs/heads/2.x-staging
Commit: bc8ea78171856e6c438b1a5da5ed9e2b1a49a862
Parents: fe19e3d
Author: honma 
Authored: Wed Jan 13 17:42:54 2016 +0800
Committer: honma 
Committed: Wed Jan 13 17:54:04 2016 +0800

--
 .../apache/kylin/cube/kv/LazyRowKeyEncoder.java |  26 ++
 .../storage/hbase/cube/v2/CubeHBaseRPC.java |  43 +++
 .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 348 +++
 .../hbase/cube/v2/CubeSegmentScanner.java   |   2 +-
 4 files changed, 266 insertions(+), 153 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/bc8ea781/core-cube/src/main/java/org/apache/kylin/cube/kv/LazyRowKeyEncoder.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/kv/LazyRowKeyEncoder.java 
b/core-cube/src/main/java/org/apache/kylin/cube/kv/LazyRowKeyEncoder.java
index 0fca726..c93f65e 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/kv/LazyRowKeyEncoder.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/kv/LazyRowKeyEncoder.java
@@ -18,9 +18,15 @@
 
 package org.apache.kylin.cube.kv;
 
+import com.google.common.collect.Lists;
+import org.apache.kylin.common.util.BytesUtil;
+import org.apache.kylin.common.util.ShardingHash;
 import org.apache.kylin.cube.CubeSegment;
 import org.apache.kylin.cube.cuboid.Cuboid;
 
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * A LazyRowKeyEncoder will not try to calculate shard
  * It works for both enableSharding or non-enableSharding scenario
@@ -38,4 +44,24 @@ public class LazyRowKeyEncoder extends RowKeyEncoder {
 throw new RuntimeException("If enableSharding false, you should 
never calculate shard");
 }
 }
+
+
+//for non-sharding cases it will only return one byte[] with not shard at 
beginning
+public List getRowKeysDifferentShards(byte[] halfCookedKey) {
+final short cuboidShardNum = cubeSeg.getCuboidShardNum(cuboid.getId());
+
+if (!enableSharding) {
+return Lists.newArrayList(halfCookedKey);//not shard to append at 
head, so it is already well cooked
+} else {
+List ret = Lists.newArrayList();
+for (short i = 0; i < cuboidShardNum; ++i) {
+short shard = 
ShardingHash.normalize(cubeSeg.getCuboidBaseShard(cuboid.getId()), i, 
cubeSeg.getTotalShards());
+byte[] cookedKey = Arrays.copyOf(halfCookedKey, 
halfCookedKey.length);
+BytesUtil.writeShort(shard, cookedKey, 0, 
RowConstants.ROWKEY_SHARDID_LEN);
+ret.add(cookedKey);
+}
+return ret;
+}
+
+}
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/bc8ea781/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
index 07143b1..db39455 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
@@ -30,6 +30,7 @@ import org.apache.kylin.gridtable.IGTScanner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
 
@@ -104,6 +105,48 @@ public abstract class CubeHBaseRPC {
 return new RawScan(start, end, selectedColumns, hbaseFuzzyKeys, 
hbaseCaching, hbaseMaxResultSize);
 }
 
+protected List preparedHBaseScans(GTRecord pkStart, GTRecord 
pkEnd, List fuzzyKeys, ImmutableBitSet selectedColBlocks) {
+final List> selectedColumns = 
makeHBaseColumns(selectedColBlocks);
+List ret = Lists.newArrayList();
+
+LazyRowKeyEncoder encoder = new LazyRowKeyEncoder(cubeSeg, cuboid);
+byte[] start = encoder.createBuf();
+byte[] end = encoder.createBuf();
+List startKeys;
+List endKeys;
+
+encoder.setBlankByte(RowConstants.ROWKEY_LOWER_BYTE);
+encoder.encode(pkStart, pkStart.getInfo().getPrimaryKey(), start);
+startKeys = encoder.getRowKeysDifferentShards(start);
+
+encoder.setBlankByte(RowConstants.ROWKEY_UPPER_BYTE);
+encoder.encode(pkEnd, 

[1/9] kylin git commit: KYLIN-1297 correct LoadingCache settings

2016-01-13 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 05b7ca560 -> bc8ea7817


KYLIN-1297 correct LoadingCache settings


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

Branch: refs/heads/2.x-staging
Commit: 2d3d859724f0f8fde2113ef187e14635e52dfd00
Parents: 05b7ca5
Author: honma 
Authored: Fri Jan 8 15:48:58 2016 +0800
Committer: honma 
Committed: Wed Jan 13 17:48:31 2016 +0800

--
 .../src/main/java/org/apache/kylin/common/KylinConfigBase.java  | 5 +
 .../src/main/java/org/apache/kylin/dict/DictionaryManager.java  | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/2d3d8597/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 96c76f0..f6775e8 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -408,6 +408,11 @@ public class KylinConfigBase implements Serializable {
 return 
Integer.parseInt(getOptional("kylin.query.badquery.stacktrace.depth", "10"));
 }
 
+public int getCachedDictMaxEntrySize() {
+return Integer.parseInt(getOptional("kylin.dict.cache.max.entry", 
"3000"));
+}
+
+
 public boolean getQueryRunLocalCoprocessor() {
 return 
Boolean.parseBoolean(getOptional("kylin.query.run.local.coprocessor", "false"));
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/2d3d8597/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java 
b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index cb58721..cca8341 100644
--- a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -83,7 +83,8 @@ public class DictionaryManager {
 
 private DictionaryManager(KylinConfig config) {
 this.config = config;
-this.dictCache = 
CacheBuilder.newBuilder().weakValues().expireAfterWrite(10, 
TimeUnit.MINUTES).build(new CacheLoader() {
+this.dictCache = 
CacheBuilder.newBuilder().maximumSize(KylinConfig.getInstanceFromEnv().getCachedDictMaxEntrySize())//
+.expireAfterWrite(1, TimeUnit.DAYS).build(new 
CacheLoader() {
 @Override
 public DictionaryInfo load(String key) throws Exception {
 DictionaryInfo dictInfo = DictionaryManager.this.load(key, 
true);
@@ -357,7 +358,7 @@ public class DictionaryManager {
 DictionaryInfo load(String resourcePath, boolean loadDictObj) throws 
IOException {
 ResourceStore store = MetadataManager.getInstance(config).getStore();
 
-//logger.debug("Going to load DictionaryInfo from " + resourcePath);
+logger.debug("Loading DictionaryInfo(loadDictObj:" + loadDictObj + ") 
from " + resourcePath);
 DictionaryInfo info = store.getResource(resourcePath, 
DictionaryInfo.class, loadDictObj ? DictionaryInfoSerializer.FULL_SERIALIZER : 
DictionaryInfoSerializer.INFO_SERIALIZER);
 
 //if (loadDictObj)



[5/9] kylin git commit: KYLIN-1301 TRUE/FALSE filter pruning

2016-01-13 Thread mahongbin
KYLIN-1301 TRUE/FALSE filter pruning


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

Branch: refs/heads/2.x-staging
Commit: 142eaf41150a421d18f3fb584f58cff4df2d16da
Parents: a3a6a4d
Author: honma 
Authored: Wed Jan 13 17:50:41 2016 +0800
Committer: honma 
Committed: Wed Jan 13 17:51:17 2016 +0800

--
 .../kylin/gridtable/GTScanRangePlanner.java | 12 ++---
 .../kylin/gridtable/DictGridTableTest.java  | 21 +++
 query/src/test/resources/query/sql/query97.sql  | 28 
 3 files changed, 58 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/142eaf41/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
index 27fa6b4..6ff1ab4 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
@@ -18,6 +18,7 @@ import org.apache.kylin.common.util.ImmutableBitSet;
 import org.apache.kylin.common.util.Pair;
 import org.apache.kylin.cube.common.FuzzyValueCombination;
 import org.apache.kylin.metadata.filter.CompareTupleFilter;
+import org.apache.kylin.metadata.filter.ConstantTupleFilter;
 import org.apache.kylin.metadata.filter.LogicalTupleFilter;
 import org.apache.kylin.metadata.filter.TupleFilter;
 import org.apache.kylin.metadata.filter.TupleFilter.FilterOperatorEnum;
@@ -49,7 +50,6 @@ public class GTScanRangePlanner {
  * @param partitionColRef the TblColRef in GT
  */
 public GTScanRangePlanner(GTInfo info, Pair 
segmentStartAndEnd, TblColRef partitionColRef) {
-  
 
 this.info = info;
 this.segmentStartAndEnd = segmentStartAndEnd;
@@ -188,7 +188,9 @@ public class GTScanRangePlanner {
 throw new IllegalStateException("Filter should be AND instead 
of " + andFilter);
 
 Collection andRanges = 
translateToAndDimRanges(andFilter.getChildren());
-result.add(andRanges);
+if (andRanges != null) {
+result.add(andRanges);
+}
 }
 
 return preEvaluateConstantConditions(result);
@@ -198,7 +200,11 @@ public class GTScanRangePlanner {
 Map rangeMap = new HashMap();
 for (TupleFilter filter : andFilters) {
 if ((filter instanceof CompareTupleFilter) == false) {
-continue;
+if (filter instanceof ConstantTupleFilter && 
!filter.evaluate(null, null)) {
+return null;
+} else {
+continue;
+}
 }
 
 CompareTupleFilter comp = (CompareTupleFilter) filter;

http://git-wip-us.apache.org/repos/asf/kylin/blob/142eaf41/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
--
diff --git 
a/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java 
b/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
index 4588051..df69c17 100644
--- a/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
@@ -89,6 +89,7 @@ public class DictGridTableTest {
 ageComp2 = compare(info.colRef(1), FilterOperatorEnum.EQ, enc(info, 1, 
"20"));
 ageComp3 = compare(info.colRef(1), FilterOperatorEnum.EQ, enc(info, 1, 
"30"));
 ageComp4 = compare(info.colRef(1), FilterOperatorEnum.NEQ, enc(info, 
1, "30"));
+
 }
 
 @Test
@@ -138,6 +139,26 @@ public class DictGridTableTest {
 assertEquals("[142119360, null]-[null, null]", 
r.get(0).toString());
 assertEquals(0, r.get(0).fuzzyKeys.size());
 }
+{
+//skip FALSE filter
+LogicalTupleFilter filter = and(ageComp1, 
ConstantTupleFilter.FALSE);
+List r = planner.planScanRanges(filter);
+assertEquals(0, r.size());
+}
+{
+//TRUE or FALSE filter
+LogicalTupleFilter filter = or(ConstantTupleFilter.TRUE, 
ConstantTupleFilter.FALSE);
+List r = planner.planScanRanges(filter);
+assertEquals(1, r.size());
+assertEquals("[null, null]-[null, null]", r.get(0).toString());

kylin git commit: KYLIN-1301 fix segment pruning failure in 2.x versions

2016-01-10 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc f91e738a7 -> edab5a433


KYLIN-1301 fix segment pruning failure in 2.x versions


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

Branch: refs/heads/2.0-rc
Commit: edab5a433cb3260065ebddb6869505175db30758
Parents: f91e738
Author: honma 
Authored: Mon Jan 11 11:25:44 2016 +0800
Committer: honma 
Committed: Mon Jan 11 11:25:44 2016 +0800

--
 .../kylin/gridtable/GTScanRangePlanner.java   | 13 +++--
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java   |  4 
 .../kylin/storage/hbase/cube/v2/CubeHBaseRPC.java | 18 +-
 .../storage/hbase/cube/v2/CubeHBaseScanRPC.java   |  5 -
 .../storage/hbase/cube/v2/CubeSegmentScanner.java | 14 ++
 5 files changed, 38 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/edab5a43/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
index f0e42a0..dad0f7c 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
@@ -43,7 +43,16 @@ public class GTScanRangePlanner {
 final private RecordComparator rangeEndComparator;
 final private RecordComparator rangeStartEndComparator;
 
+/**
+ * @param info
+ * @param segmentStartAndEnd in GT encoding
+ * @param partitionColRef the TblColRef in GT
+ */
 public GTScanRangePlanner(GTInfo info, Pair 
segmentStartAndEnd, TblColRef partitionColRef) {
+if (partitionColRef != null && segmentStartAndEnd == null) {
+throw new IllegalArgumentException("segmentStartAndEnd not 
provided when partitionColRef is set to " + partitionColRef);
+}
+
 this.info = info;
 this.segmentStartAndEnd = segmentStartAndEnd;
 this.partitionColRef = partitionColRef;
@@ -91,9 +100,9 @@ public class GTScanRangePlanner {
 List fuzzyKeys;
 
 for (ColumnRange range : andDimRanges) {
-
 if (partitionColRef != null && 
range.column.equals(partitionColRef)) {
-
+logger.debug("Pre-check partition col filter, partitionColRef 
{}, segmentstartandend {}, range begin {}, range end {}",//
+new Object[] { partitionColRef, segmentStartAndEnd, 
range.begin, range.end });
 if 
(rangeStartEndComparator.comparator.compare(segmentStartAndEnd.getFirst(), 
range.end) <= 0 //
 && 
rangeStartEndComparator.comparator.compare(range.begin, 
segmentStartAndEnd.getSecond()) < 0) {
 //segment range is [Closed,Open)

http://git-wip-us.apache.org/repos/asf/kylin/blob/edab5a43/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 6ff07a4..a193d10 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -63,9 +63,13 @@ import com.google.common.collect.Iterators;
 import com.google.common.collect.Lists;
 import com.google.protobuf.ByteString;
 import com.google.protobuf.HBaseZeroCopyByteString;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 
+public static final Logger logger = 
LoggerFactory.getLogger(CubeHBaseEndpointRPC.class);
+
 private static ExecutorService executorService = 
Executors.newCachedThreadPool();
 
 static class EndpointResultsAsGTScanner implements IGTScanner {

http://git-wip-us.apache.org/repos/asf/kylin/blob/edab5a43/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseRPC.java
index 1335af0..d319c2d 100644
--- 

[1/3] kylin git commit: refactor: minor changes

2016-06-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master ff1c81395 -> b361d8aaa


refactor: minor changes


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

Branch: refs/heads/master
Commit: b361d8aaa2b1b5d0d86107bedb9f34397be000a5
Parents: ea24450
Author: Hongbin Ma 
Authored: Wed Jun 22 13:59:58 2016 +0800
Committer: Hongbin Ma 
Committed: Wed Jun 22 14:00:15 2016 +0800

--
 .../org/apache/kylin/cube/kv/RowKeyEncoder.java | 21 ++-
 .../org/apache/kylin/gridtable/GTRecord.java| 17 +-
 .../gridtable/memstore/GTSimpleMemStore.java| 20 +-
 .../kylin/gridtable/DictGridTableTest.java  | 64 ++--
 .../coprocessor/endpoint/CubeVisitService.java  |  2 +-
 5 files changed, 70 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b361d8aa/core-cube/src/main/java/org/apache/kylin/cube/kv/RowKeyEncoder.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/kv/RowKeyEncoder.java 
b/core-cube/src/main/java/org/apache/kylin/cube/kv/RowKeyEncoder.java
index db704dc..ebcbadd 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/kv/RowKeyEncoder.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/kv/RowKeyEncoder.java
@@ -94,12 +94,31 @@ public class RowKeyEncoder extends AbstractRowKeyEncoder {
 @Override
 public void encode(GTRecord record, ImmutableBitSet keyColumns, byte[] 
buf) {
 ByteArray byteArray = new ByteArray(buf, getHeaderLength(), 0);
-record.exportColumns(keyColumns, byteArray, defaultValue());
+
+encodeDims(record, keyColumns, byteArray, defaultValue());
 
 //fill shard and cuboid
 fillHeader(buf);
 }
 
+//ByteArray representing dimension does not have extra header
+public void encodeDims(GTRecord record, ImmutableBitSet selectedCols, 
ByteArray buf, byte defaultValue) {
+int pos = 0;
+for (int i = 0; i < selectedCols.trueBitCount(); i++) {
+int c = selectedCols.trueBitAt(i);
+ByteArray columnC = record.get(c);
+if (columnC.array() != null) {
+System.arraycopy(record.get(c).array(), columnC.offset(), 
buf.array(), buf.offset() + pos, columnC.length());
+pos += columnC.length();
+} else {
+int maxLength = 
record.getInfo().getCodeSystem().maxCodeLength(c);
+Arrays.fill(buf.array(), buf.offset() + pos, buf.offset() + 
pos + maxLength, defaultValue);
+pos += maxLength;
+}
+}
+buf.setLength(pos);
+}
+
 @Override
 public void encode(ByteArray bodyBytes, ByteArray outputBuf) {
 Preconditions.checkState(bodyBytes.length() == bodyLength);

http://git-wip-us.apache.org/repos/asf/kylin/blob/b361d8aa/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
index b676693..276f66e 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTRecord.java
@@ -235,22 +235,7 @@ public class GTRecord implements Comparable {
 buf.setLength(pos);
 }
 
-/** write data to given buffer, like serialize, use defaultValue when 
required column is not set*/
-public void exportColumns(ImmutableBitSet selectedCols, ByteArray buf, 
byte defaultValue) {
-int pos = 0;
-for (int i = 0; i < selectedCols.trueBitCount(); i++) {
-int c = selectedCols.trueBitAt(i);
-if (cols[c].array() != null) {
-System.arraycopy(cols[c].array(), cols[c].offset(), 
buf.array(), buf.offset() + pos, cols[c].length());
-pos += cols[c].length();
-} else {
-int maxLength = info.codeSystem.maxCodeLength(c);
-Arrays.fill(buf.array(), buf.offset() + pos, buf.offset() + 
pos + maxLength, defaultValue);
-pos += maxLength;
-}
-}
-buf.setLength(pos);
-}
+   
 
 /** write data to given buffer, like serialize */
 public void exportColumns(ImmutableBitSet selectedCols, ByteBuffer buf) {

http://git-wip-us.apache.org/repos/asf/kylin/blob/b361d8aa/core-cube/src/main/java/org/apache/kylin/gridtable/memstore/GTSimpleMemStore.java
--
diff 

kylin git commit: fix ci

2016-06-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 5fd26125b -> 97bfd5747


fix ci


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

Branch: refs/heads/master
Commit: 97bfd574796047b5a7e818f17620bae1f67e27f3
Parents: 5fd2612
Author: Hongbin Ma 
Authored: Wed Jun 22 14:47:17 2016 +0800
Committer: Hongbin Ma 
Committed: Wed Jun 22 14:47:36 2016 +0800

--
 .../java/org/apache/kylin/gridtable/DictGridTableTest.java   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/97bfd574/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
--
diff --git 
a/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java 
b/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
index 1687a4f..a328216 100644
--- a/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/gridtable/DictGridTableTest.java
@@ -119,7 +119,7 @@ public class DictGridTableTest extends 
LocalFileMetadataTestCase {
 assertEquals(1, r.size());//scan range are [close,close]
 assertEquals("[null, 10]-[142119360, 10]", 
r.get(0).toString());
 assertEquals(1, r.get(0).fuzzyKeys.size());
-assertEquals("[[10]]", r.get(0).fuzzyKeys.toString());
+assertEquals("[[null, 10, null, null, null]]", 
r.get(0).fuzzyKeys.toString());
 }
 {
 LogicalTupleFilter filter = and(timeComp2, ageComp1);
@@ -145,7 +145,7 @@ public class DictGridTableTest extends 
LocalFileMetadataTestCase {
 List r = planner.planScanRanges();
 assertEquals(1, r.size());
 assertEquals("[142119360, 10]-[null, 10]", 
r.get(0).toString());
-assertEquals("[[10], [142119360, 10]]", 
r.get(0).fuzzyKeys.toString());
+assertEquals("[[null, 10, null, null, null], [142119360, 10, 
null, null, null]]", r.get(0).fuzzyKeys.toString());
 }
 {
 LogicalTupleFilter filter = or(timeComp2, timeComp1, timeComp6);
@@ -191,7 +191,7 @@ public class DictGridTableTest extends 
LocalFileMetadataTestCase {
 assertEquals(1, r.size());//scan range are [close,close]
 assertEquals("[null, 10]-[142119360, 10]", 
r.get(0).toString());
 assertEquals(1, r.get(0).fuzzyKeys.size());
-assertEquals("[[10]]", r.get(0).fuzzyKeys.toString());
+assertEquals("[[null, 10, null, null, null]]", 
r.get(0).fuzzyKeys.toString());
 }
 
 {
@@ -212,7 +212,7 @@ public class DictGridTableTest extends 
LocalFileMetadataTestCase {
 List r = planner.planScanRanges();
 assertEquals(1, r.size());
 assertEquals("[142119360, 10]-[null, 20]", 
r.get(0).toString());
-assertEquals("[[10], [20]]", r.get(0).fuzzyKeys.toString());
+assertEquals("[[null, 10, null, null, null], [null, 20, null, 
null, null]]", r.get(0).fuzzyKeys.toString());
 }
 
 // pre-evaluate ever false



kylin git commit: refactor: subclass of AbstractExecutable change to use own logger

2016-06-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master bfee5ed44 -> 94567c150


refactor: subclass of AbstractExecutable change to use own logger


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

Branch: refs/heads/master
Commit: 94567c150e94d0f6499bb26621869c83d117c5a4
Parents: bfee5ed
Author: Hongbin Ma 
Authored: Wed Jun 22 17:51:55 2016 +0800
Committer: Hongbin Ma 
Committed: Wed Jun 22 17:52:03 2016 +0800

--
 .../kylin/job/common/ShellExecutable.java   |  4 
 .../kylin/job/execution/AbstractExecutable.java |  2 +-
 .../org/apache/kylin/engine/mr/CubingJob.java   |  4 
 .../engine/mr/common/HadoopShellExecutable.java |  4 
 .../UpdateIIInfoAfterBuildStep.java |  4 
 .../engine/mr/steps/MergeDictionaryStep.java|  5 
 .../engine/mr/steps/MergeStatisticsStep.java|  4 
 .../engine/mr/steps/SaveStatisticsStep.java |  4 
 .../mr/steps/UpdateCubeInfoAfterBuildStep.java  |  4 
 .../mr/steps/UpdateCubeInfoAfterMergeStep.java  |  4 
 .../kylin/engine/spark/SparkExecutable.java |  4 
 .../source/hive/CreateFlatHiveTableStep.java|  4 
 .../apache/kylin/source/hive/HiveMRInput.java   | 25 +++-
 .../apache/kylin/source/hive/HqlExecutable.java |  4 
 .../steps/HDFSPathGarbageCollectionStep.java|  5 
 15 files changed, 69 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/94567c15/core-job/src/main/java/org/apache/kylin/job/common/ShellExecutable.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/common/ShellExecutable.java 
b/core-job/src/main/java/org/apache/kylin/job/common/ShellExecutable.java
index 74f54a1..209d14e 100644
--- a/core-job/src/main/java/org/apache/kylin/job/common/ShellExecutable.java
+++ b/core-job/src/main/java/org/apache/kylin/job/common/ShellExecutable.java
@@ -32,11 +32,15 @@ import org.apache.kylin.job.execution.ExecutableContext;
 import org.apache.kylin.job.execution.ExecuteResult;
 
 import com.google.common.collect.Maps;
+import org.slf4j.LoggerFactory;
 
 /**
  */
 public class ShellExecutable extends AbstractExecutable {
 
+private static final org.slf4j.Logger logger = 
LoggerFactory.getLogger(ShellExecutable.class);
+
+
 private static final String CMD = "cmd";
 
 public ShellExecutable() {

http://git-wip-us.apache.org/repos/asf/kylin/blob/94567c15/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java 
b/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
index 395676b..778763c 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
@@ -49,7 +49,7 @@ public abstract class AbstractExecutable implements 
Executable, Idempotent {
 protected static final String START_TIME = "startTime";
 protected static final String END_TIME = "endTime";
 
-protected static final Logger logger = 
LoggerFactory.getLogger(AbstractExecutable.class);
+private static final Logger logger = 
LoggerFactory.getLogger(AbstractExecutable.class);
 protected int retry = 0;
 
 private String name;

http://git-wip-us.apache.org/repos/asf/kylin/blob/94567c15/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
--
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
index 70b6132..bbd0fc5 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
@@ -42,11 +42,15 @@ import org.apache.kylin.job.execution.ExecuteResult;
 import org.apache.kylin.job.execution.Output;
 import org.apache.kylin.metadata.project.ProjectInstance;
 import org.apache.kylin.metadata.project.ProjectManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  */
 public class CubingJob extends DefaultChainedExecutable {
 
+private static final Logger logger = 
LoggerFactory.getLogger(CubingJob.class);
+
 public enum AlgorithmEnum {
 LAYER, INMEM
 }


[1/2] kylin git commit: refactor: more checks on finding segment by id

2016-06-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 9b8a9899b -> 91d6798d4


refactor: more checks on finding segment by id


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

Branch: refs/heads/master
Commit: c736ee5fe8009c28f5e016d24c5f113940bc11cf
Parents: 9b8a989
Author: Hongbin Ma 
Authored: Wed Jun 22 19:06:17 2016 +0800
Committer: Hongbin Ma 
Committed: Wed Jun 22 19:06:41 2016 +0800

--
 .../engine/mr/steps/SaveStatisticsStep.java | 48 ++--
 1 file changed, 43 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/c736ee5f/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SaveStatisticsStep.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SaveStatisticsStep.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SaveStatisticsStep.java
index 435fb13..7cc9dc3 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SaveStatisticsStep.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SaveStatisticsStep.java
@@ -21,6 +21,9 @@ package org.apache.kylin.engine.mr.steps;
 import java.io.IOException;
 import java.util.Random;
 
+import javax.annotation.Nullable;
+
+import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -43,9 +46,11 @@ import org.apache.kylin.metadata.model.MeasureDesc;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.Function;
+import com.google.common.collect.Iterables;
+
 /**
  * Save the cube segment statistic to Kylin metadata store
- *
  */
 public class SaveStatisticsStep extends AbstractExecutable {
 
@@ -55,12 +60,45 @@ public class SaveStatisticsStep extends AbstractExecutable {
 super();
 }
 
+private CubeSegment findSegment(ExecutableContext context, String 
cubeName, String segmentId) {
+final CubeManager mgr = CubeManager.getInstance(context.getConfig());
+final CubeInstance cube = mgr.getCube(cubeName);
+
+if (cube == null) {
+String cubeList = 
StringUtils.join(Iterables.transform(mgr.listAllCubes(), new 
Function() {
+@Nullable
+@Override
+public String apply(@Nullable CubeInstance input) {
+return input.getName();
+}
+}).iterator(), ",");
+
+logger.info("target cube name: {}, cube list: {}", cubeName, 
cubeList);
+throw new IllegalStateException();
+}
+
+
+final CubeSegment newSegment = cube.getSegmentById(segmentId);
+
+if (newSegment == null) {
+String segmentList = 
StringUtils.join(Iterables.transform(cube.getSegments(), new 
Function() {
+@Nullable
+@Override
+public String apply(@Nullable CubeSegment input) {
+return input.getUuid();
+}
+}).iterator(), ",");
+
+logger.info("target segment id: {}, segment list: {}", segmentId, 
segmentList);
+throw new IllegalStateException();
+}
+return newSegment;
+}
+
 @Override
 protected ExecuteResult doWork(ExecutableContext context) throws 
ExecuteException {
-final CubeManager mgr = CubeManager.getInstance(context.getConfig());
-final CubeInstance cube = 
mgr.getCube(CubingExecutableUtil.getCubeName(this.getParams()));
-final CubeSegment newSegment = 
cube.getSegmentById(CubingExecutableUtil.getSegmentId(this.getParams()));
-KylinConfig kylinConf = cube.getConfig();
+CubeSegment newSegment = findSegment(context, 
CubingExecutableUtil.getCubeName(this.getParams()), 
CubingExecutableUtil.getSegmentId(this.getParams()));
+KylinConfig kylinConf = newSegment.getConfig();
 
 ResourceStore rs = ResourceStore.getStore(kylinConf);
 try {



[2/2] kylin git commit: fix compile

2016-06-22 Thread mahongbin
fix compile


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

Branch: refs/heads/master
Commit: 91d6798d47db0e4c3f20578d8d81f4390b082fdb
Parents: c736ee5
Author: Hongbin Ma 
Authored: Wed Jun 22 19:06:35 2016 +0800
Committer: Hongbin Ma 
Committed: Wed Jun 22 19:07:24 2016 +0800

--
 .../src/main/java/org/apache/kylin/gridtable/GTScanRequest.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/91d6798d/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
index 593469a..d520efa 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
@@ -63,7 +63,7 @@ public class GTScanRequest {
 this(info, ranges, dimensions, aggrGroupBy, aggrMetrics, 
aggrMetricsFuncs, filterPushDown, true, 0);
 }
 
-private GTScanRequest(GTInfo info, List ranges, 
ImmutableBitSet dimensions, ImmutableBitSet aggrGroupBy, //
+public GTScanRequest(GTInfo info, List ranges, 
ImmutableBitSet dimensions, ImmutableBitSet aggrGroupBy, //
 ImmutableBitSet aggrMetrics, String[] aggrMetricsFuncs, 
TupleFilter filterPushDown, boolean allowPreAggregation, double aggrCacheGB) {
 this.info = info;
 if (ranges == null) {



kylin git commit: KYLIN-1816 More than one base KylinConfig exist in spring JVM

2016-06-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 1b0ece4a4 -> 62ae3cb16


KYLIN-1816 More than one base KylinConfig exist in spring JVM


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

Branch: refs/heads/master
Commit: 62ae3cb165126404b1ef95009ff1095fe39e2441
Parents: 1b0ece4
Author: Hongbin Ma 
Authored: Thu Jun 23 12:04:32 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Jun 23 13:58:17 2016 +0800

--
 core-common/src/main/java/org/apache/kylin/common/KylinConfig.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/62ae3cb1/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index a4024ae..9eebde7 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -376,7 +376,7 @@ public class KylinConfig extends KylinConfigBase {
 int current = 0;
 
 StackTraceElement[] stackTrace = t.getStackTrace();
-StringBuilder buf = new StringBuilder("");
+StringBuilder buf = new StringBuilder("This is not a exception, just 
for diagnose purpose:");
 buf.append("\n");
 for (StackTraceElement e : stackTrace) {
 if (++current > maxStackTraceDepth) {



kylin git commit: refactor about default gtstore

2016-06-23 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 62ae3cb16 -> 4fd74fc6a


refactor about default gtstore


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

Branch: refs/heads/master
Commit: 4fd74fc6a7d7c9bcccab38b57da76f2b983cf5ef
Parents: 62ae3cb
Author: Hongbin Ma 
Authored: Thu Jun 23 16:37:09 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Jun 23 16:37:09 2016 +0800

--
 .../apache/kylin/gridtable/ScannerWorker.java   |  11 +-
 .../storage/gtrecord/CubeSegmentScanner.java| 100 +
 .../storage/gtrecord/CubeTupleConverter.java| 270 +
 .../gtrecord/GTCubeStorageQueryBase.java| 377 +++
 .../gtrecord/SequentialCubeTupleIterator.java   | 210 +++
 .../hbase/cube/v2/CubeSegmentScanner.java   | 100 -
 .../storage/hbase/cube/v2/CubeStorageQuery.java | 349 +
 .../hbase/cube/v2/CubeTupleConverter.java   | 270 -
 .../cube/v2/SequentialCubeTupleIterator.java| 210 ---
 9 files changed, 968 insertions(+), 929 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4fd74fc6/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
index 1ac3b02..586a584 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/ScannerWorker.java
@@ -24,8 +24,6 @@ import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Iterator;
 
-import org.apache.kylin.common.KylinConfig;
-import org.apache.kylin.common.debug.BackdoorToggles;
 import org.apache.kylin.cube.CubeSegment;
 import org.apache.kylin.cube.cuboid.Cuboid;
 import org.slf4j.Logger;
@@ -36,7 +34,7 @@ public class ScannerWorker {
 private static final Logger logger = 
LoggerFactory.getLogger(ScannerWorker.class);
 private IGTScanner internal = null;
 
-public ScannerWorker(CubeSegment cubeSeg, Cuboid cuboid, GTScanRequest 
scanRequest) {
+public ScannerWorker(CubeSegment cubeSeg, Cuboid cuboid, GTScanRequest 
scanRequest, String gtStorage) {
 if (scanRequest == null) {
 logger.info("Segment {} will be skipped", cubeSeg);
 internal = new EmptyGTScanner(0);
@@ -46,12 +44,7 @@ public class ScannerWorker {
 final GTInfo info = scanRequest.getInfo();
 
 try {
-IGTStorage rpc;
-if 
("scan".equalsIgnoreCase(BackdoorToggles.getHbaseCubeQueryProtocol())) {
-rpc = (IGTStorage) 
Class.forName("org.apache.kylin.storage.hbase.cube.v2.CubeHBaseScanRPC").getConstructor(CubeSegment.class,
 Cuboid.class, GTInfo.class).newInstance(cubeSeg, cuboid, info); // for local 
debug
-} else {
-rpc = (IGTStorage) 
Class.forName(KylinConfig.getInstanceFromEnv().getDefaultIGTStorage()).getConstructor(CubeSegment.class,
 Cuboid.class, GTInfo.class).newInstance(cubeSeg, cuboid, info); // default 
behavior
-}
+IGTStorage rpc = (IGTStorage) 
Class.forName(gtStorage).getConstructor(CubeSegment.class, Cuboid.class, 
GTInfo.class).newInstance(cubeSeg, cuboid, info); // default behavior
 internal = rpc.getGTScanner(scanRequest);
 } catch (IOException | InstantiationException | 
InvocationTargetException | IllegalAccessException | ClassNotFoundException | 
NoSuchMethodException e) {
 throw new RuntimeException("error", e);

http://git-wip-us.apache.org/repos/asf/kylin/blob/4fd74fc6/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
--
diff --git 
a/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
 
b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
new file mode 100644
index 000..c12159d
--- /dev/null
+++ 
b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/CubeSegmentScanner.java
@@ -0,0 +1,100 @@
+/*
+ * 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. 

kylin git commit: KYLIN-1816 More than one base KylinConfig exist in spring JVM

2016-06-22 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master b514ae16a -> 1b0ece4a4


KYLIN-1816 More than one base KylinConfig exist in spring JVM


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

Branch: refs/heads/master
Commit: 1b0ece4a433ca3417d13a6d5fc7b5c1e503e341b
Parents: b514ae1
Author: Hongbin Ma 
Authored: Thu Jun 23 12:04:32 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Jun 23 12:04:43 2016 +0800

--
 .../org/apache/kylin/common/KylinConfig.java| 78 +---
 .../org/apache/kylin/common/KylinConfigExt.java |  5 ++
 .../kylin/common/restclient/Broadcaster.java|  2 +-
 .../common/util/SerializeToByteBuffer.java  | 44 +++
 .../java/org/apache/kylin/cube/CubeManager.java |  9 ++-
 .../apache/kylin/gridtable/GTScanRequest.java   | 13 +++-
 .../apache/kylin/dict/DictionaryManager.java|  3 +
 .../kylin/dict/lookup/SnapshotManager.java  | 21 +++---
 .../org/apache/kylin/job/dao/ExecutableDao.java |  3 +
 .../kylin/job/execution/AbstractExecutable.java |  2 +-
 .../kylin/job/manager/ExecutableManager.java|  3 +
 .../realization/RealizationRegistry.java|  3 +
 .../kylin/storage/hybrid/HybridManager.java |  2 +-
 .../engine/streaming/StreamingManager.java  |  2 +-
 .../kylin/source/kafka/KafkaConfigManager.java  |  2 +-
 15 files changed, 147 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/1b0ece4a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index b4b3c1b..a4024ae 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -61,22 +61,28 @@ public class KylinConfig extends KylinConfigBase {
 private static KylinConfig ENV_INSTANCE = null;
 
 public static KylinConfig getInstanceFromEnv() {
-if (ENV_INSTANCE == null) {
-try {
-KylinConfig config = loadKylinConfig();
-ENV_INSTANCE = config;
-} catch (IllegalArgumentException e) {
-throw new IllegalStateException("Failed to find KylinConfig ", 
e);
+synchronized (KylinConfig.class) {
+if (ENV_INSTANCE == null) {
+try {
+KylinConfig config = loadKylinConfig();
+logger.info("Initialized a new KylinConfig from 
getInstanceFromEnv : " + System.identityHashCode(config));
+ENV_INSTANCE = config;
+} catch (IllegalArgumentException e) {
+throw new IllegalStateException("Failed to find 
KylinConfig ", e);
+}
 }
+return ENV_INSTANCE;
 }
-return ENV_INSTANCE;
 }
 
+//Only used in test cases!!! 
 public static void destroyInstance() {
+logger.info("Destory KylinConfig");
+dumpStackTrace();
 ENV_INSTANCE = null;
 }
 
-public static enum UriType {
+public enum UriType {
 PROPERTIES_FILE, REST_ADDR, LOCAL_FOLDER
 }
 
@@ -150,12 +156,15 @@ public class KylinConfig extends KylinConfigBase {
 }
 
 public static void setKylinConfigFromInputStream(InputStream is) {
-if (ENV_INSTANCE == null) {
-try {
-KylinConfig config = createKylinConfigFromInputStream(is);
-ENV_INSTANCE = config;
-} catch (IllegalArgumentException e) {
-throw new IllegalStateException("Failed to find KylinConfig ", 
e);
+synchronized (KylinConfig.class) {
+if (ENV_INSTANCE == null) {
+try {
+KylinConfig config = createKylinConfigFromInputStream(is);
+logger.info("Resetting ENV_INSTANCE by a input stream: " + 
System.identityHashCode(config));
+ENV_INSTANCE = config;
+} catch (IllegalArgumentException e) {
+throw new IllegalStateException("Failed to find 
KylinConfig ", e);
+}
 }
 }
 }
@@ -254,11 +263,11 @@ public class KylinConfig extends KylinConfigBase {
 
 return config;
 }
-
+
 public static void setSandboxEnvIfPossible() {
 File dir1 = new File("../examples/test_case_data/sandbox");
 File dir2 = new File("../../kylin/examples/test_case_data/sandbox");
-
+
 

kylin git commit: minor: disable printing stacktrace when create a KylinConfig instance

2016-06-23 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master c7439a0a4 -> 842f590af


minor: disable printing stacktrace when create a KylinConfig instance


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

Branch: refs/heads/master
Commit: 842f590af8af2c95d08e7409ea719ef62b18807e
Parents: c7439a0
Author: Hongbin Ma 
Authored: Fri Jun 24 09:52:21 2016 +0800
Committer: Hongbin Ma 
Committed: Fri Jun 24 09:52:26 2016 +0800

--
 .../org/apache/kylin/common/KylinConfig.java| 31 +++-
 1 file changed, 17 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/842f590a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index 9eebde7..8719541 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -371,19 +371,22 @@ public class KylinConfig extends KylinConfigBase {
 }
 
 private static void dumpStackTrace() {
-Thread t = Thread.currentThread();
-int maxStackTraceDepth = 20;
-int current = 0;
-
-StackTraceElement[] stackTrace = t.getStackTrace();
-StringBuilder buf = new StringBuilder("This is not a exception, just 
for diagnose purpose:");
-buf.append("\n");
-for (StackTraceElement e : stackTrace) {
-if (++current > maxStackTraceDepth) {
-break;
-}
-buf.append("\t").append("at ").append(e.toString()).append("\n");
-}
-logger.info(buf.toString());
+
+//uncomment below to start debugging
+
+//Thread t = Thread.currentThread();
+//int maxStackTraceDepth = 20;
+//int current = 0;
+//
+//StackTraceElement[] stackTrace = t.getStackTrace();
+//StringBuilder buf = new StringBuilder("This is not a exception, just 
for diagnose purpose:");
+//buf.append("\n");
+//for (StackTraceElement e : stackTrace) {
+//if (++current > maxStackTraceDepth) {
+//break;
+//}
+//buf.append("\t").append("at ").append(e.toString()).append("\n");
+//}
+//logger.info(buf.toString());
 }
 }



kylin git commit: add reviewboardrc

2016-01-13 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 65566bf13 -> 5d2a58a1d


add reviewboardrc


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

Branch: refs/heads/2.x-staging
Commit: 5d2a58a1d8dc8458c57072e97680aef0fe752cc9
Parents: 65566bf
Author: honma 
Authored: Thu Jan 14 10:25:05 2016 +0800
Committer: honma 
Committed: Thu Jan 14 10:38:00 2016 +0800

--
 .reviewboardrc | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5d2a58a1/.reviewboardrc
--
diff --git a/.reviewboardrc b/.reviewboardrc
new file mode 100644
index 000..7fcc51f
--- /dev/null
+++ b/.reviewboardrc
@@ -0,0 +1,4 @@
+REVIEWBOARD_URL = "https://reviews.apache.org;
+REPOSITORY = "kylin"
+BRANCH = "2.x-staging"
+LAND_DEST_BRANCH = "2.x-staging"



kylin git commit: add reviewboardrc

2016-01-13 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 721729823 -> bd73b643d


add reviewboardrc


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

Branch: refs/heads/1.x-staging
Commit: bd73b643d307dcacf3e2d99e71f3b8f7008f1d1b
Parents: 7217298
Author: honma 
Authored: Thu Jan 14 10:59:03 2016 +0800
Committer: honma 
Committed: Thu Jan 14 10:59:07 2016 +0800

--
 .reviewboardrc | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/bd73b643/.reviewboardrc
--
diff --git a/.reviewboardrc b/.reviewboardrc
new file mode 100644
index 000..79d75f5
--- /dev/null
+++ b/.reviewboardrc
@@ -0,0 +1,4 @@
+REVIEWBOARD_URL = "https://reviews.apache.org;
+REPOSITORY = "kylin"
+BRANCH = "1.x-staging"
+LAND_DEST_BRANCH = "1.x-staging"



kylin git commit: KYLIN-1221 Kill underlying running hadoop job while discard a job

2016-01-13 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 5d2a58a1d -> cef83f01c


KYLIN-1221 Kill underlying running hadoop job while discard a job

Bugs closed: KYLIN-1221

Reviewed at https://reviews.apache.org/r/42285/


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

Branch: refs/heads/2.x-staging
Commit: cef83f01c5f538cdacadbd5148f28c901148aa7d
Parents: 5d2a58a
Author: Dong Li 
Authored: Thu Jan 14 10:48:05 2016 +0800
Committer: honma 
Committed: Thu Jan 14 10:48:05 2016 +0800

--
 .../engine/mr/common/MapReduceExecutable.java   | 29 
 1 file changed, 18 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/cef83f01/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
index 585e0e1..f9c4673 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
@@ -53,12 +53,11 @@ import com.google.common.base.Preconditions;
  */
 public class MapReduceExecutable extends AbstractExecutable {
 
+public static final String MAP_REDUCE_WAIT_TIME = "mapReduceWaitTime";
 private static final String KEY_MR_JOB = "MR_JOB_CLASS";
 private static final String KEY_PARAMS = "MR_JOB_PARAMS";
 private static final String KEY_COUNTER_SAVEAS = "MR_COUNTER_SAVEAS";
 
-public static final String MAP_REDUCE_WAIT_TIME = "mapReduceWaitTime";
-
 public MapReduceExecutable() {
 super();
 }
@@ -117,7 +116,7 @@ public class MapReduceExecutable extends AbstractExecutable 
{
 try {
 //for async mr job, ToolRunner just return 0;
 ToolRunner.run(hadoopJob, args);
-
+
 if (hadoopJob.isSkipped()) {
 return new ExecuteResult(ExecuteResult.State.SUCCEED, 
"skipped");
 }
@@ -169,7 +168,15 @@ public class MapReduceExecutable extends 
AbstractExecutable {
 }
 
Thread.sleep(context.getConfig().getYarnStatusCheckIntervalSeconds() * 1000);
 }
-//TODO kill discarded mr job using "hadoop job -kill " + mrJobId
+
+// try to kill running map-reduce job to release resources.
+if (job != null) {
+try {
+job.killJob();
+} catch (Exception e) {
+logger.warn("failed to kill hadoop job: " + 
job.getJobID(), e);
+}
+}
 
 return new ExecuteResult(ExecuteResult.State.DISCARDED, 
output.toString());
 
@@ -211,7 +218,7 @@ public class MapReduceExecutable extends AbstractExecutable 
{
 logger.info("kylin.job.yarn.app.rest.check.status.url" + " is not 
set, read from job configuration");
 }
 String rmWebHost = 
HAUtil.getConfValueForRMInstance(YarnConfiguration.RM_WEBAPP_ADDRESS, 
YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS, job.getConfiguration());
-if(HAUtil.isHAEnabled(job.getConfiguration())) {
+if (HAUtil.isHAEnabled(job.getConfiguration())) {
 YarnConfiguration conf = new 
YarnConfiguration(job.getConfiguration());
 String active = RMHAUtils.findActiveRMHAId(conf);
 rmWebHost = 
HAUtil.getConfValueForRMInstance(HAUtil.addSuffix(YarnConfiguration.RM_WEBAPP_ADDRESS,
 active), YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS, conf);
@@ -236,22 +243,22 @@ public class MapReduceExecutable extends 
AbstractExecutable {
 addExtraInfo(MAP_REDUCE_WAIT_TIME, t + "");
 }
 
-public void setMapReduceJobClass(Class 
clazzName) {
-setParam(KEY_MR_JOB, clazzName.getName());
-}
-
 public String getMapReduceJobClass() throws ExecuteException {
 return getParam(KEY_MR_JOB);
 }
 
-public void setMapReduceParams(String param) {
-setParam(KEY_PARAMS, param);
+public void setMapReduceJobClass(Class 
clazzName) {
+setParam(KEY_MR_JOB, clazzName.getName());
 }
 
 public String getMapReduceParams() {
 return getParam(KEY_PARAMS);
 }
 
+public void setMapReduceParams(String param) {
+setParam(KEY_PARAMS, param);
+}
+
 public String getCounterSaveAs() {
 return getParam(KEY_COUNTER_SAVEAS);
 }



kylin git commit: add reviewboardrc

2016-01-13 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 5feca4e7c -> b5a444534


add reviewboardrc


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

Branch: refs/heads/2.0-rc
Commit: b5a4445346bc576aa1b29e276e8a46112f3d54ce
Parents: 5feca4e
Author: honma 
Authored: Thu Jan 14 10:56:19 2016 +0800
Committer: honma 
Committed: Thu Jan 14 10:56:24 2016 +0800

--
 .reviewboardrc | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b5a44453/.reviewboardrc
--
diff --git a/.reviewboardrc b/.reviewboardrc
new file mode 100644
index 000..b6c24fa
--- /dev/null
+++ b/.reviewboardrc
@@ -0,0 +1,4 @@
+REVIEWBOARD_URL = "https://reviews.apache.org;
+REPOSITORY = "kylin"
+BRANCH = "2.0-rc"
+LAND_DEST_BRANCH = "2.0-rc"



[2/3] kylin git commit: KYLIN-1297 avoid unnecessary converter creation

2016-01-14 Thread mahongbin
KYLIN-1297 avoid unnecessary converter creation


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

Branch: refs/heads/2.x-staging
Commit: b4ea1b3915c70daf44a871a39d65282e9089b77c
Parents: 32cb630
Author: honma 
Authored: Thu Jan 14 18:34:35 2016 +0800
Committer: honma 
Committed: Thu Jan 14 18:34:35 2016 +0800

--
 .../storage/hbase/cube/v2/SequentialCubeTupleIterator.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b4ea1b39/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
index 7e70a4d..dcc3aba 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/SequentialCubeTupleIterator.java
@@ -56,6 +56,7 @@ public class SequentialCubeTupleIterator implements 
ITupleIterator {
 
 @Override
 public boolean hasNext() {
+logger.info("hasNext called");
 if (next != null)
 return true;
 
@@ -75,7 +76,10 @@ public class SequentialCubeTupleIterator implements 
ITupleIterator {
 if (scannerIterator.hasNext()) {
 curScanner = scannerIterator.next();
 curRecordIterator = curScanner.iterator();
-curTupleConverter = new CubeTupleConverter(curScanner.cubeSeg, 
cuboid, selectedDimensions, selectedMetrics, tupleInfo);
+if (curRecordIterator.hasNext()) {
+//if the segment does not has any tuples, don't bother to 
create a converter
+curTupleConverter = new 
CubeTupleConverter(curScanner.cubeSeg, cuboid, selectedDimensions, 
selectedMetrics, tupleInfo);
+}
 } else {
 return false;
 }



[1/3] kylin git commit: don't do storage cleaning at buildcubewithengine

2016-01-14 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 08f42c0d5 -> d2bc9d140


don't do storage cleaning at buildcubewithengine


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

Branch: refs/heads/2.x-staging
Commit: 32cb630d746e5f0948591fec0d5f52bbc8ef6dfb
Parents: 08f42c0
Author: honma 
Authored: Thu Jan 14 17:39:23 2016 +0800
Committer: honma 
Committed: Thu Jan 14 17:41:10 2016 +0800

--
 .../src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/32cb630d/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
--
diff --git 
a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java 
b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
index 46bf1bb..331e21d 100644
--- a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
@@ -107,7 +107,6 @@ public class BuildCubeWithEngineTest {
 public void before() throws Exception {
 
HBaseMetadataTestCase.staticCreateTestMetadata(AbstractKylinTestCase.SANDBOX_TEST_DATA);
 
-cleanupOldStorage();
 DeployUtil.initCliWorkDir();
 DeployUtil.deployMetadata();
 DeployUtil.overrideJobJarLocations();



kylin git commit: bug fix in ResourceTool

2016-01-17 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc a09df13d3 -> fdba83ed4


bug fix in ResourceTool


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

Branch: refs/heads/2.0-rc
Commit: fdba83ed4db98f4d927e75e13a1748bed928128c
Parents: a09df13
Author: honma 
Authored: Mon Jan 18 12:15:36 2016 +0800
Committer: honma 
Committed: Mon Jan 18 12:15:55 2016 +0800

--
 .../java/org/apache/kylin/common/persistence/ResourceTool.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fdba83ed/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 f13b723..4a23ba3 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
@@ -131,7 +131,7 @@ public class ResourceTool {
 private static void resetR(ResourceStore store, String path) throws 
IOException {
 ArrayList children = store.listResources(path);
 if (children == null) { // path is a resource (not a folder)
-if (matchFilter(path) == false) {
+if (matchFilter(path)) {
 store.deleteResource(path);
 }
 } else {



kylin git commit: fix issues in 2.0 upgrade, part 2

2016-01-18 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 4646cdb25 -> ae3bab684


fix issues in 2.0 upgrade, part 2


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

Branch: refs/heads/2.0-rc
Commit: ae3bab68489a37652513029daac0c8a156b02f87
Parents: 4646cdb
Author: honma 
Authored: Tue Jan 19 13:48:35 2016 +0800
Committer: honma 
Committed: Tue Jan 19 13:48:41 2016 +0800

--
 .../java/org/apache/kylin/cube/cuboid/CuboidTest.java |  2 +-
 .../storage/hbase/cube/v2/CubeHBaseEndpointRPC.java   | 14 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/ae3bab68/core-cube/src/test/java/org/apache/kylin/cube/cuboid/CuboidTest.java
--
diff --git 
a/core-cube/src/test/java/org/apache/kylin/cube/cuboid/CuboidTest.java 
b/core-cube/src/test/java/org/apache/kylin/cube/cuboid/CuboidTest.java
index c17ee01..90ec655 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/cuboid/CuboidTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/cuboid/CuboidTest.java
@@ -148,7 +148,7 @@ public class CuboidTest extends LocalFileMetadataTestCase {
 Cuboid cuboid;
 
 cuboid = Cuboid.findById(cube, 0);
-assertEquals(toLong("100111000"), cuboid.getId());
+assertEquals(toLong("10100"), cuboid.getId());
 
 cuboid = Cuboid.findById(cube, 1);
 assertEquals(toLong("10111"), cuboid.getId());

http://git-wip-us.apache.org/repos/asf/kylin/blob/ae3bab68/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 5cca195..d6ef16c 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -255,11 +255,11 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 final ExpectedSizeIterator epResultItr = new 
ExpectedSizeIterator(scanRequests.size() * shardNum);
 
 for (final Pair epRange : 
getEPKeyRanges(cuboidBaseShard, shardNum, totalShards)) {
-for (int i = 0; i < scanRequests.size(); ++i) {
-final int scanIndex = i;
-executorService.submit(new Runnable() {
-@Override
-public void run() {
+executorService.submit(new Runnable() {
+@Override
+public void run() {
+for (int i = 0; i < scanRequests.size(); ++i) {
+int scanIndex = i;
 CubeVisitProtos.CubeVisitRequest.Builder builder = 
CubeVisitProtos.CubeVisitRequest.newBuilder();
 
builder.setGtScanRequest(scanRequestByteStrings.get(scanIndex)).setHbaseRawScan(rawScanByteStrings.get(scanIndex));
 for (IntList intList : hbaseColumnsToGTIntList) {
@@ -285,8 +285,8 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 }
 }
 }
-});
-}
+}
+});
 }
 
 return new EndpointResultsAsGTScanner(fullGTInfo, epResultItr, 
scanRequests.get(0).getColumns(), totalScannedCount.get());



[1/3] kylin git commit: enable filter in ResourceTool

2016-01-18 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 573c84e61 -> 000d883b1


enable filter in ResourceTool


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

Branch: refs/heads/2.x-staging
Commit: a7923b9698c1ca0e9677759744ef8a64996b1aaa
Parents: 573c84e
Author: honma 
Authored: Tue Jan 19 15:05:38 2016 +0800
Committer: honma 
Committed: Tue Jan 19 15:05:38 2016 +0800

--
 .../kylin/common/persistence/ResourceTool.java  | 31 ++--
 1 file changed, 22 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/a7923b96/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 c3038dd..4a23ba3 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
@@ -26,6 +26,7 @@ import org.apache.kylin.common.util.StringUtil;
 
 public class ResourceTool {
 
+private static String[] includes = null;
 private static String[] excludes = null;
 
 public static void main(String[] args) throws IOException {
@@ -38,6 +39,10 @@ public class ResourceTool {
 return;
 }
 
+String include = System.getProperty("include");
+if (include != null) {
+includes = include.split("\\s*,\\s*");
+}
 String exclude = System.getProperty("exclude");
 if (exclude != null) {
 excludes = exclude.split("\\s*,\\s*");
@@ -83,7 +88,7 @@ public class ResourceTool {
 
 // case of resource (not a folder)
 if (children == null) {
-if (matchExclude(path) == false) {
+if (matchFilter(path)) {
 RawResource res = src.getResource(path);
 if (res != null) {
 dst.putResource(path, res.inputStream, res.timestamp);
@@ -100,14 +105,22 @@ public class ResourceTool {
 }
 }
 
-private static boolean matchExclude(String path) {
-if (excludes == null)
-return false;
-for (String exclude : excludes) {
-if (path.startsWith(exclude))
-return true;
+private static boolean matchFilter(String path) {
+if (includes != null) {
+boolean in = false;
+for (String include : includes) {
+in = in || path.startsWith(include);
+}
+if (!in)
+return false;
+}
+if (excludes != null) {
+for (String exclude : excludes) {
+if (path.startsWith(exclude))
+return false;
+}
 }
-return false;
+return true;
 }
 
 public static void reset(KylinConfig config) throws IOException {
@@ -118,7 +131,7 @@ public class ResourceTool {
 private static void resetR(ResourceStore store, String path) throws 
IOException {
 ArrayList children = store.listResources(path);
 if (children == null) { // path is a resource (not a folder)
-if (matchExclude(path) == false) {
+if (matchFilter(path)) {
 store.deleteResource(path);
 }
 } else {



kylin git commit: KYLIN-1821 remaining

2016-06-25 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 81e3b2cd3 -> ef226f601


KYLIN-1821 remaining


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

Branch: refs/heads/master
Commit: ef226f60155cbbbc9783e59c9459d09ca6ecb167
Parents: 81e3b2c
Author: Hongbin Ma 
Authored: Sat Jun 25 21:19:29 2016 +0800
Committer: Hongbin Ma 
Committed: Sat Jun 25 21:19:29 2016 +0800

--
 .../src/main/java/org/apache/kylin/cube/model/CubeDesc.java  | 4 ++--
 .../src/main/java/org/apache/kylin/rest/service/UserService.java | 2 +-
 .../org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java| 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/ef226f60/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 7d9c058..fbdeeb7 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
@@ -710,13 +710,13 @@ public class CubeDesc extends RootPersistentEntity {
 
 if ((colStrs == null && dim.isDerived()) || 
("{FK}".equalsIgnoreCase(colStrs))) {
 // when column is omitted, special case
-
+
 for (TblColRef col : join.getForeignKeyColumns()) {
 dimCols.add(initDimensionColRef(col));
 }
 } else {
 // normal case
-
+
 if (StringUtils.isEmpty(colStrs))
 throw new IllegalStateException("Dimension column must not 
be blank " + dim);
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/ef226f60/server/src/main/java/org/apache/kylin/rest/service/UserService.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/service/UserService.java 
b/server/src/main/java/org/apache/kylin/rest/service/UserService.java
index c1f4e98..07c7c6f 100644
--- a/server/src/main/java/org/apache/kylin/rest/service/UserService.java
+++ b/server/src/main/java/org/apache/kylin/rest/service/UserService.java
@@ -279,7 +279,7 @@ public class UserService implements UserDetailsManager {
 return false;
 return true;
 }
-
+
 @Override
 public String toString() {
 return authority;

http://git-wip-us.apache.org/repos/asf/kylin/blob/ef226f60/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
index 3f67e5c..32aa4b0 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CubeMigrationCLI.java
@@ -541,8 +541,7 @@ public class CubeMigrationCLI {
 logger.info("Undo for PURGE_AND_DISABLE is not supported");
 break;
 }
-default:
-{
+default: {
 //do nothing
 break;
 }



[15/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/IKylinValidationConstants.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/IKylinValidationConstants.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/IKylinValidationConstants.java
deleted file mode 100644
index d0a07de..000
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/model/validation/rule/IKylinValidationConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.
-*/
-
-package org.apache.kylin.cube.model.validation.rule;
-
-import org.apache.kylin.metadata.MetadataConstants;
-
-public interface IKylinValidationConstants extends MetadataConstants {
-
-public static final int DEFAULT_MAX_AGR_GROUP_SIZE = 12;
-public static final String KEY_MAX_AGR_GROUP_SIZE = 
"rule_max.arggregation.group.size";
-
-}

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-cube/src/main/java/org/apache/kylin/cube/upgrade/common/MetadataVersionRefresher.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/upgrade/common/MetadataVersionRefresher.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/upgrade/common/MetadataVersionRefresher.java
index 02f084c..4cf0584 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/upgrade/common/MetadataVersionRefresher.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/upgrade/common/MetadataVersionRefresher.java
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
 import com.fasterxml.jackson.databind.node.ObjectNode;
+
 import com.google.common.collect.Lists;
 
 /**

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v1_4_0/CubeMetadataUpgrade_v_1_4_0.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v1_4_0/CubeMetadataUpgrade_v_1_4_0.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v1_4_0/CubeMetadataUpgrade_v_1_4_0.java
index 007b868..ca78d68 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v1_4_0/CubeMetadataUpgrade_v_1_4_0.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v1_4_0/CubeMetadataUpgrade_v_1_4_0.java
@@ -66,8 +66,6 @@ public class CubeMetadataUpgrade_v_1_4_0 extends 
CubeMetadataUpgrade {
 //do nothing
 }
 
-  
-
 private CubeDesc loadOldCubeDesc(String path) {
 CubeDesc ndesc = null;
 try {

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
index 53cc387..863b958 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
@@ -193,8 +193,8 @@ public class GTAggregateScanner implements IGTScanner {
 for (int i = 0; i < types.length; i++) {
 types[i] = info.getColumnType(metrics.trueBitAt(i));
 }
-
-BufferedMeasureEncoder result =  new BufferedMeasureEncoder(types);
+
+BufferedMeasureEncoder result = new BufferedMeasureEncoder(types);
 result.setBufferSize(info.getMaxColumnLength(metrics));
 return result;
 }
@@ -372,7 +372,7 @@ public class GTAggregateScanner implements IGTScanner {
 record.cols[c].set(key, offset, columnLength);
 offset += columnLength;
 }
-
+
 for (int i = 0; i < value.length; i++) {
 tmpValues[i] = 

[11/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/engine-spark/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/engine-spark/.settings/org.eclipse.jdt.core.prefs 
b/engine-spark/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000..a903301
--- /dev/null
+++ b/engine-spark/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,379 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore

[07/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java
index 6266f17..1bd92e6 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java
@@ -22,1330 +22,1277 @@
 package org.apache.kylin.storage.hbase.cube.v1.filter.generated;
 
 public final class FilterProtosExt {
-  private FilterProtosExt() {}
-  public static void registerAllExtensions(
-  com.google.protobuf.ExtensionRegistry registry) {
-  }
-  public interface BytesBytesPairOrBuilder
-  extends com.google.protobuf.MessageOrBuilder {
-
-// required bytes first = 1;
-/**
- * required bytes first = 1;
- */
-boolean hasFirst();
-/**
- * required bytes first = 1;
- */
-com.google.protobuf.ByteString getFirst();
-
-// required bytes second = 2;
-/**
- * required bytes second = 2;
- */
-boolean hasSecond();
-/**
- * required bytes second = 2;
- */
-com.google.protobuf.ByteString getSecond();
-  }
-  /**
-   * Protobuf type {@code BytesBytesPair}
-   */
-  public static final class BytesBytesPair extends
-  com.google.protobuf.GeneratedMessage
-  implements BytesBytesPairOrBuilder {
-// Use BytesBytesPair.newBuilder() to construct.
-private BytesBytesPair(com.google.protobuf.GeneratedMessage.Builder 
builder) {
-  super(builder);
-  this.unknownFields = builder.getUnknownFields();
+private FilterProtosExt() {
 }
-private BytesBytesPair(boolean noInit) { this.unknownFields = 
com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
 
-private static final BytesBytesPair defaultInstance;
-public static BytesBytesPair getDefaultInstance() {
-  return defaultInstance;
+public static void 
registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
 }
 
-public BytesBytesPair getDefaultInstanceForType() {
-  return defaultInstance;
-}
+public interface BytesBytesPairOrBuilder extends 
com.google.protobuf.MessageOrBuilder {
 
-private final com.google.protobuf.UnknownFieldSet unknownFields;
-@java.lang.Override
-public final com.google.protobuf.UnknownFieldSet
-getUnknownFields() {
-  return this.unknownFields;
-}
-private BytesBytesPair(
-com.google.protobuf.CodedInputStream input,
-com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-throws com.google.protobuf.InvalidProtocolBufferException {
-  initFields();
-  int mutable_bitField0_ = 0;
-  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-  com.google.protobuf.UnknownFieldSet.newBuilder();
-  try {
-boolean done = false;
-while (!done) {
-  int tag = input.readTag();
-  switch (tag) {
-case 0:
-  done = true;
-  break;
-default: {
-  if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
-done = true;
-  }
-  break;
-}
-case 10: {
-  bitField0_ |= 0x0001;
-  first_ = input.readBytes();
-  break;
-}
-case 18: {
-  bitField0_ |= 0x0002;
-  second_ = input.readBytes();
-  break;
-}
-  }
-}
-  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-throw e.setUnfinishedMessage(this);
-  } catch (java.io.IOException e) {
-throw new com.google.protobuf.InvalidProtocolBufferException(
-e.getMessage()).setUnfinishedMessage(this);
-  } finally {
-this.unknownFields = unknownFields.build();
-makeExtensionsImmutable();
-  }
-}
-public static final com.google.protobuf.Descriptors.Descriptor
-getDescriptor() {
-  return 
org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_BytesBytesPair_descriptor;
-}
+// required bytes first = 1;
+/**
+ * required bytes first = 1;
+ */
+boolean hasFirst();
 
-protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
-internalGetFieldAccessorTable() {
-  return 
org.apache.kylin.storage.hbase.cube.v1.filter.generated.FilterProtosExt.internal_static_BytesBytesPair_fieldAccessorTable
-  .ensureFieldAccessorsInitialized(
-  

[01/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master f26f702a6 -> 5d4982e24


http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/tool/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/tool/.settings/org.eclipse.jdt.core.prefs 
b/tool/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000..a903301
--- /dev/null
+++ b/tool/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,379 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore

[04/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHFileMapper.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHFileMapper.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHFileMapper.java
index 0e0a8ce..545d058 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHFileMapper.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/IICreateHFileMapper.java
@@ -63,10 +63,9 @@ public class IICreateHFileMapper extends 
KylinMapper

[13/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
index c23d649..021c146 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/measure/raw/RawSerializer.java
@@ -18,15 +18,15 @@
 
 package org.apache.kylin.measure.raw;
 
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.kylin.common.util.ByteArray;
 import org.apache.kylin.common.util.BytesUtil;
 import org.apache.kylin.metadata.datatype.DataType;
 import org.apache.kylin.metadata.datatype.DataTypeSerializer;
 
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
 @SuppressWarnings("unused")
 public class RawSerializer extends DataTypeSerializer {
 
@@ -98,7 +98,7 @@ public class RawSerializer extends 
DataTypeSerializer {
 if (size >= 0) {
 for (int i = 0; i < size; i++) {
 ByteArray ba = new ByteArray(BytesUtil.readByteArray(in));
-if (ba.length() != 0){
+if (ba.length() != 0) {
 values.add(ba);
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-metadata/src/main/java/org/apache/kylin/measure/topn/Counter.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/topn/Counter.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/Counter.java
index 8dc9e7e..041ea2b 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/topn/Counter.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/topn/Counter.java
@@ -18,7 +18,6 @@
 
 package org.apache.kylin.measure.topn;
 
-
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
@@ -33,7 +32,7 @@ public class Counter implements Externalizable {
 
 protected T item;
 protected double count;
-//protected double error;
+//protected double error;
 
 /**
  * For de-serialization
@@ -43,25 +42,25 @@ public class Counter implements Externalizable {
 
 public Counter(T item) {
 this.count = 0;
-//this.error = 0;
+//this.error = 0;
 this.item = item;
 }
 
 public T getItem() {
 return item;
 }
-
+
 public double getCount() {
 return count;
 }
 
-//public double getError() {
-//return error;
-//}
+//public double getError() {
+//return error;
+//}
 
 @Override
 public String toString() {
-//return item + ":" + count + ':' + error;
+//return item + ":" + count + ':' + error;
 return item + ":" + count;
 }
 
@@ -80,4 +79,3 @@ public class Counter implements Externalizable {
 //out.writeDouble(error);
 }
 }
-

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoubleDeltaSerializer.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoubleDeltaSerializer.java
 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoubleDeltaSerializer.java
index 2d9e3ee..38d5b20 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoubleDeltaSerializer.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoubleDeltaSerializer.java
@@ -30,7 +30,7 @@ public class DoubleDeltaSerializer {
 static final int PRECISION_BITS = 3;
 static final int DELTA_SIZE_BITS = 6;
 static final int LENGTH_BITS = 23;
-
+
 static final long[] MASKS = new long[64];
 {
 for (int i = 0; i < MASKS.length; i++) {
@@ -41,7 +41,6 @@ public class DoubleDeltaSerializer {
 final private int precision;
 final private int multiplier;
 
-
 transient ThreadLocal deltasThreadLocal;
 
 public DoubleDeltaSerializer() {
@@ -59,7 +58,7 @@ public class DoubleDeltaSerializer {
 this.deltasThreadLocal = new ThreadLocal();
 }
 
-public void serialize(double values[], ByteBuffer buf) {
+public void serialize(double[] values, ByteBuffer buf) {
 long[] deltas = calculateDeltas(values);
 int deltaSize = maxDeltaSize(deltas, values.length - 1);
 
@@ -118,7 +117,7 @@ public class DoubleDeltaSerializer {
 deltas = new long[len];
 deltasThreadLocal.set(deltas);
 }
-
+
 if (len == 0)
 return deltas;
 
@@ -144,17 +143,17 @@ public class 

[18/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code 
formatting


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

Branch: refs/heads/master
Commit: 5d4982e247a2172d97d44c85309cef4b3dbfce09
Parents: f26f702
Author: Hongbin Ma 
Authored: Fri Jun 24 16:19:05 2016 +0800
Committer: Hongbin Ma 
Committed: Sat Jun 25 19:10:05 2016 +0800

--
 .../.settings/org.eclipse.core.resources.prefs  |5 +
 assembly/.settings/org.eclipse.jdt.core.prefs   |  379 +
 assembly/.settings/org.eclipse.jdt.ui.prefs |7 +
 .../kylin/job/DeployLocalMetaToRemoteTest.java  |1 -
 .../java/org/apache/kylin/job/DeployUtil.java   |6 +-
 .../kylin/job/hadoop/invertedindex/IITest.java  |   13 +-
 .../kylin/job/streaming/KafkaDataLoader.java|8 +-
 .../streaming/StreamingTableDataGenerator.java  |1 +
 .../calcite/sql2rel/SqlToRelConverter.java  | 8302 -
 checkstyle-suppressions.xml |   37 +
 checkstyle.xml  |   60 +
 .../org/apache/kylin/common/KylinConfig.java|   32 +-
 .../common/persistence/FileResourceStore.java   |2 +-
 .../common/persistence/JsonSerializer.java  |2 +-
 .../persistence/RootPersistentEntity.java   |   13 -
 .../common/restclient/AbstractRestCache.java|2 +-
 .../kylin/common/restclient/Broadcaster.java|2 +-
 .../common/restclient/SingleValueCache.java |6 +-
 .../apache/kylin/common/util/BytesSplitter.java |   15 +-
 .../org/apache/kylin/common/util/BytesUtil.java |4 +-
 .../apache/kylin/common/util/Dictionary.java|6 +-
 .../kylin/common/util/ImmutableBitSet.java  |2 +-
 .../kylin/common/util/ImplementationSwitch.java |5 +-
 .../common/util/LoggableCachedThreadPool.java   |4 +-
 .../common/util/MemoryBudgetController.java |3 +-
 .../kylin/common/util/MyLogFormatter.java   |1 +
 .../org/apache/kylin/common/util/Primes.java|   31 +-
 .../org/apache/kylin/common/util/RangeUtil.java |6 +-
 .../org/apache/kylin/common/util/SSHClient.java |   13 +-
 .../apache/kylin/common/util/StringUtil.java|4 +-
 .../apache/kylin/common/KylinConfigTest.java|3 +-
 .../common/persistence/ResourceStoreTest.java   |   18 +-
 .../common/util/AbstractKylinTestCase.java  |1 -
 .../kylin/common/util/DateFormatTest.java   |5 +-
 .../common/util/HBaseMetadataTestCase.java  |3 +-
 .../apache/kylin/common/util/RangeUtilTest.java |1 -
 .../org/apache/kylin/cube/CubeInstance.java |3 +-
 .../java/org/apache/kylin/cube/CubeSegment.java |   13 +-
 .../org/apache/kylin/cube/CubeValidator.java|2 +-
 .../kylin/cube/cli/CubeSignatureRefresher.java  |4 +-
 .../kylin/cube/cli/DictionaryGeneratorCLI.java  |4 +-
 .../kylin/cube/common/RowKeySplitter.java   |1 -
 .../org/apache/kylin/cube/cuboid/Cuboid.java|5 +-
 .../kylin/cube/gridtable/CubeGridTable.java |2 +-
 .../gridtable/CuboidToGridTableMapping.java |   12 +-
 .../kylin/cube/gridtable/TrimmedDimEnc.java |6 +-
 .../gridtable/TrimmedDimensionSerializer.java   |4 +-
 .../inmemcubing/AbstractInMemCubeBuilder.java   |2 +-
 .../cube/inmemcubing/CompoundCuboidWriter.java  |4 +-
 .../cube/inmemcubing/ConcurrentDiskStore.java   |4 +-
 .../kylin/cube/inmemcubing/ICuboidWriter.java   |6 +-
 .../cube/inmemcubing/InMemCubeBuilder.java  |6 +-
 .../InMemCubeBuilderInputConverter.java |   23 +-
 .../cube/inmemcubing/InMemCubeBuilderUtils.java |4 +-
 .../kylin/cube/inmemcubing/MemDiskStore.java|4 +-
 .../kylin/cube/model/AggregationGroup.java  |3 +-
 .../org/apache/kylin/cube/model/CubeDesc.java   |   23 +-
 .../apache/kylin/cube/model/DictionaryDesc.java |   12 +-
 .../apache/kylin/cube/model/DimensionDesc.java  |2 +-
 .../kylin/cube/model/HBaseColumnDesc.java   |4 +-
 .../apache/kylin/cube/model/RowKeyColDesc.java  |3 +-
 .../org/apache/kylin/cube/model/RowKeyDesc.java |5 +-
 .../kylin/cube/model/v1_4_0/CubeDesc.java   |   12 +-
 .../cube/model/v1_4_0/HBaseColumnDesc.java  |4 +-
 .../model/v1_4_0/HBaseColumnFamilyDesc.java |1 -
 .../kylin/cube/model/v1_4_0/RowKeyDesc.java |4 +-
 .../model/validation/CubeMetadataValidator.java |2 +-
 .../cube/model/validation/IValidatorRule.java   |5 +-
 .../model/validation/rule/DictionaryRule.java   |   11 +-
 .../model/validation/rule/FunctionRule.java |3 +-
 .../rule/IKylinValidationConstants.java |   28 -
 .../common/MetadataVersionRefresher.java|1 +
 .../v1_4_0/CubeMetadataUpgrade_v_1_4_0.java |2 -
 

[10/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/cube/StreamingCubeBuilder.java
--
diff --git 
a/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/cube/StreamingCubeBuilder.java
 
b/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/cube/StreamingCubeBuilder.java
index 59bdc2d..465a983 100644
--- 
a/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/cube/StreamingCubeBuilder.java
+++ 
b/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/cube/StreamingCubeBuilder.java
@@ -45,7 +45,9 @@ import java.util.concurrent.LinkedBlockingQueue;
 import javax.annotation.Nullable;
 
 import org.apache.kylin.common.KylinConfig;
-import org.apache.kylin.measure.hllc.HyperLogLogPlusCounter;
+import org.apache.kylin.common.util.Dictionary;
+import org.apache.kylin.common.util.StreamingBatch;
+import org.apache.kylin.common.util.StreamingMessage;
 import org.apache.kylin.cube.CubeInstance;
 import org.apache.kylin.cube.CubeManager;
 import org.apache.kylin.cube.CubeSegment;
@@ -53,10 +55,8 @@ import org.apache.kylin.cube.CubeUpdate;
 import org.apache.kylin.cube.inmemcubing.ICuboidWriter;
 import org.apache.kylin.cube.inmemcubing.InMemCubeBuilder;
 import org.apache.kylin.cube.util.CubingUtils;
-import org.apache.kylin.common.util.Dictionary;
-import org.apache.kylin.common.util.StreamingBatch;
 import org.apache.kylin.engine.streaming.StreamingBatchBuilder;
-import org.apache.kylin.common.util.StreamingMessage;
+import org.apache.kylin.measure.hllc.HyperLogLogPlusCounter;
 import org.apache.kylin.metadata.model.IBuildable;
 import org.apache.kylin.metadata.model.SegmentStatusEnum;
 import org.apache.kylin.metadata.model.TblColRef;
@@ -91,7 +91,7 @@ public class StreamingCubeBuilder implements 
StreamingBatchBuilder {
 for (StreamingMessage streamingMessage : 
streamingBatch.getMessages()) {
 blockingQueue.put(streamingMessage.getData());
 }
-blockingQueue.put(Collections.emptyList());
+blockingQueue.put(Collections. emptyList());
 future.get();
 cuboidWriter.flush();
 
@@ -148,18 +148,14 @@ public class StreamingCubeBuilder implements 
StreamingBatchBuilder {
 final CubeInstance cubeInstance = 
cubeManager.reloadCubeLocal(cubeName);
 final Map dictionaryMap;
 try {
-dictionaryMap = CubingUtils.buildDictionary(cubeInstance,
-Lists.transform(streamingBatch.getMessages(), new 
Function() {
-@Nullable
-@Override
-public List apply(@Nullable StreamingMessage 
input) {
-return input.getData();
-}
-}));
-Map realDictMap = 
CubingUtils.writeDictionary((CubeSegment) buildable,
-dictionaryMap,
-streamingBatch.getTimeRange().getFirst(),
-streamingBatch.getTimeRange().getSecond());
+dictionaryMap = CubingUtils.buildDictionary(cubeInstance, 
Lists.transform(streamingBatch.getMessages(), new Function() {
+@Nullable
+@Override
+public List apply(@Nullable StreamingMessage input) {
+return input.getData();
+}
+}));
+Map realDictMap = 
CubingUtils.writeDictionary((CubeSegment) buildable, dictionaryMap, 
streamingBatch.getTimeRange().getFirst(), 
streamingBatch.getTimeRange().getSecond());
 return realDictMap;
 } catch (IOException e) {
 throw new RuntimeException("failed to build dictionary", e);

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/util/StreamingUtils.java
--
diff --git 
a/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/util/StreamingUtils.java
 
b/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/util/StreamingUtils.java
index 66a0af2..4038e53 100644
--- 
a/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/util/StreamingUtils.java
+++ 
b/engine-streaming/src/main/java/org/apache/kylin/engine/streaming/util/StreamingUtils.java
@@ -33,17 +33,14 @@
  */
 package org.apache.kylin.engine.streaming.util;
 
-import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.ClassUtil;
 import org.apache.kylin.engine.streaming.IStreamingInput;
 import org.apache.kylin.engine.streaming.IStreamingOutput;
 import org.apache.kylin.engine.streaming.StreamingBatchBuilder;
-import 

[03/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/generated/IIProtos.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/generated/IIProtos.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/generated/IIProtos.java
index 916a0a0..e3f9ca7 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/generated/IIProtos.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/generated/IIProtos.java
@@ -22,3895 +22,3752 @@
 package org.apache.kylin.storage.hbase.ii.coprocessor.endpoint.generated;
 
 public final class IIProtos {
-  private IIProtos() {}
-  public static void registerAllExtensions(
-  com.google.protobuf.ExtensionRegistry registry) {
-  }
-  public interface IIRequestOrBuilder
-  extends com.google.protobuf.MessageOrBuilder {
-
-// required bytes type = 1;
-/**
- * required bytes type = 1;
- */
-boolean hasType();
-/**
- * required bytes type = 1;
- */
-com.google.protobuf.ByteString getType();
-
-// required bytes filter = 2;
-/**
- * required bytes filter = 2;
- */
-boolean hasFilter();
-/**
- * required bytes filter = 2;
- */
-com.google.protobuf.ByteString getFilter();
-
-// required bytes projector = 3;
-/**
- * required bytes projector = 3;
- */
-boolean hasProjector();
-/**
- * required bytes projector = 3;
- */
-com.google.protobuf.ByteString getProjector();
-
-// required bytes aggregator = 4;
-/**
- * required bytes aggregator = 4;
- */
-boolean hasAggregator();
-/**
- * required bytes aggregator = 4;
- */
-com.google.protobuf.ByteString getAggregator();
-
-// optional bytes tsRange = 5;
-/**
- * optional bytes tsRange = 5;
- */
-boolean hasTsRange();
-/**
- * optional bytes tsRange = 5;
- */
-com.google.protobuf.ByteString getTsRange();
-  }
-  /**
-   * Protobuf type {@code IIRequest}
-   */
-  public static final class IIRequest extends
-  com.google.protobuf.GeneratedMessage
-  implements IIRequestOrBuilder {
-// Use IIRequest.newBuilder() to construct.
-private IIRequest(com.google.protobuf.GeneratedMessage.Builder builder) 
{
-  super(builder);
-  this.unknownFields = builder.getUnknownFields();
-}
-private IIRequest(boolean noInit) { this.unknownFields = 
com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
-private static final IIRequest defaultInstance;
-public static IIRequest getDefaultInstance() {
-  return defaultInstance;
-}
-
-public IIRequest getDefaultInstanceForType() {
-  return defaultInstance;
-}
-
-private final com.google.protobuf.UnknownFieldSet unknownFields;
-@java.lang.Override
-public final com.google.protobuf.UnknownFieldSet
-getUnknownFields() {
-  return this.unknownFields;
-}
-private IIRequest(
-com.google.protobuf.CodedInputStream input,
-com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-throws com.google.protobuf.InvalidProtocolBufferException {
-  initFields();
-  int mutable_bitField0_ = 0;
-  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-  com.google.protobuf.UnknownFieldSet.newBuilder();
-  try {
-boolean done = false;
-while (!done) {
-  int tag = input.readTag();
-  switch (tag) {
-case 0:
-  done = true;
-  break;
-default: {
-  if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
-done = true;
-  }
-  break;
-}
-case 10: {
-  bitField0_ |= 0x0001;
-  type_ = input.readBytes();
-  break;
-}
-case 18: {
-  bitField0_ |= 0x0002;
-  filter_ = input.readBytes();
-  break;
-}
-case 26: {
-  bitField0_ |= 0x0004;
-  projector_ = input.readBytes();
-  break;
-}
-case 34: {
-  bitField0_ |= 0x0008;
-  aggregator_ = input.readBytes();
-  break;
-}
-case 42: {
-  bitField0_ |= 0x0010;
-  tsRange_ = input.readBytes();
-  break;
-}
-  }
-}
-  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-throw e.setUnfinishedMessage(this);
-  } catch (java.io.IOException e) {
-throw new 

kylin git commit: KYLIN-1821 checkstyle enable leftcurly and rightcurly rules

2016-06-25 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 5d4982e24 -> 81e3b2cd3


KYLIN-1821 checkstyle enable leftcurly and rightcurly rules


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

Branch: refs/heads/master
Commit: 81e3b2cd3d0ee4632b95d80d54aafd355b541726
Parents: 5d4982e
Author: Hongbin Ma 
Authored: Sat Jun 25 19:47:48 2016 +0800
Committer: Hongbin Ma 
Committed: Sat Jun 25 20:18:23 2016 +0800

--
 checkstyle.xml|  2 ++
 .../kylin/common/persistence/ResourceTool.java|  7 +++
 .../java/org/apache/kylin/cube/CubeManager.java   |  9 -
 .../kylin/cube/gridtable/CubeCodeSystem.java  |  7 +++
 .../org/apache/kylin/cube/model/CubeDesc.java |  9 +
 .../apache/kylin/cube/model/v1_4_0/CubeDesc.java  |  7 +++
 .../upgrade/common/MetadataVersionRefresher.java  |  9 +
 .../kylin/gridtable/GTAggregateScanner.java   |  9 +
 .../benchmark/SortedGTRecordGenerator.java|  9 +
 .../apache/kylin/dict/AppendTrieDictionary.java   | 18 --
 .../java/org/apache/kylin/dict/CachedTreeMap.java |  1 -
 .../apache/kylin/dict/TrieDictionaryBuilder.java  | 16 +++-
 .../measure/hllc/HyperLogLogPlusCounter.java  |  5 ++---
 .../storage/gtrecord/CubeTupleConverter.java  |  5 ++---
 .../kylin/query/enumerator/OLAPEnumerator.java|  7 +++
 .../storage/hbase/cube/v1/CubeTupleConverter.java |  7 +++
 .../endpoint/EndpointTupleConverter.java  | 12 +---
 .../apache/kylin/tool/util/ResourceStoreUtil.java |  7 +++
 18 files changed, 68 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/81e3b2cd/checkstyle.xml
--
diff --git a/checkstyle.xml b/checkstyle.xml
index 10ba67b..682186f 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -49,6 +49,8 @@
 
 
 
+
+
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/81e3b2cd/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 b10856f..2f16eb7 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
@@ -131,8 +131,8 @@ public class ResourceTool {
 public static void copyR(ResourceStore src, ResourceStore dst, String 
path) throws IOException {
 NavigableSet children = src.listResources(path);
 
-// case of resource (not a folder)
 if (children == null) {
+// case of resource (not a folder)
 if (matchFilter(path)) {
 try {
 RawResource res = src.getResource(path);
@@ -147,9 +147,8 @@ public class ResourceTool {
 ex.printStackTrace();
 }
 }
-}
-// case of folder
-else {
+} else {
+// case of folder
 for (String child : children)
 copyR(src, dst, child);
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/81e3b2cd/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
index b62bc05..a200f5d 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
@@ -766,18 +766,17 @@ public class CubeManager implements IRealizationProvider {
 continue;
 }
 
-// if i, j competes
 if (is.getSourceOffsetStart() == js.getSourceOffsetStart()) {
-// if both new or ready, favor the bigger segment
+// if i, j competes
 if (isReady(is) && isReady(js) || isNew(is) && isNew(js)) {
+// if both new or ready, favor the bigger segment
 if (is.getSourceOffsetEnd() <= js.getSourceOffsetEnd()) {
 tobe.remove(i);
 } else {
 tobe.remove(j);
 }
-}
-   

[09/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/server/src/main/java/org/apache/kylin/rest/controller/ProjectController.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/controller/ProjectController.java 
b/server/src/main/java/org/apache/kylin/rest/controller/ProjectController.java
index 980ec8c..f829fff 100644
--- 
a/server/src/main/java/org/apache/kylin/rest/controller/ProjectController.java
+++ 
b/server/src/main/java/org/apache/kylin/rest/controller/ProjectController.java
@@ -73,13 +73,13 @@ public class ProjectController extends BasicController {
  * @return Table metadata array
  * @throws IOException
  */
-@RequestMapping(value = "", method = {RequestMethod.GET})
+@RequestMapping(value = "", method = { RequestMethod.GET })
 @ResponseBody
 public List getProjects(@RequestParam(value = "limit", 
required = false) Integer limit, @RequestParam(value = "offset", required = 
false) Integer offset) {
 return projectService.listAllProjects(limit, offset);
 }
 
-@RequestMapping(value = "/readable", method = {RequestMethod.GET})
+@RequestMapping(value = "/readable", method = { RequestMethod.GET })
 @ResponseBody
 public List getReadableProjects(@RequestParam(value = 
"limit", required = false) Integer limit, @RequestParam(value = "offset", 
required = false) Integer offset) {
 List readableProjects = new 
ArrayList();
@@ -189,12 +189,11 @@ public class ProjectController extends BasicController {
 }
 }
 
-
 }
 return readableProjects;
 }
 
-@RequestMapping(value = "", method = {RequestMethod.POST})
+@RequestMapping(value = "", method = { RequestMethod.POST })
 @ResponseBody
 public ProjectInstance saveProject(@RequestBody CreateProjectRequest 
projectRequest) {
 if (StringUtils.isEmpty(projectRequest.getName())) {
@@ -212,7 +211,7 @@ public class ProjectController extends BasicController {
 return createdProj;
 }
 
-@RequestMapping(value = "", method = {RequestMethod.PUT})
+@RequestMapping(value = "", method = { RequestMethod.PUT })
 @ResponseBody
 public ProjectInstance updateProject(@RequestBody UpdateProjectRequest 
projectRequest) {
 if (StringUtils.isEmpty(projectRequest.getFormerProjectName())) {
@@ -231,7 +230,7 @@ public class ProjectController extends BasicController {
 return updatedProj;
 }
 
-@RequestMapping(value = "/{projectName}", method = {RequestMethod.DELETE})
+@RequestMapping(value = "/{projectName}", method = { RequestMethod.DELETE 
})
 @ResponseBody
 public void deleteProject(@PathVariable String projectName) {
 try {

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/server/src/main/java/org/apache/kylin/rest/controller/QueryController.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/controller/QueryController.java 
b/server/src/main/java/org/apache/kylin/rest/controller/QueryController.java
index 88cf912..93b71ad 100644
--- a/server/src/main/java/org/apache/kylin/rest/controller/QueryController.java
+++ b/server/src/main/java/org/apache/kylin/rest/controller/QueryController.java
@@ -26,10 +26,6 @@ import java.util.List;
 import javax.annotation.PostConstruct;
 import javax.servlet.http.HttpServletResponse;
 
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
-import net.sf.ehcache.Element;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.debug.BackdoorToggles;
@@ -64,6 +60,10 @@ import org.supercsv.prefs.CsvPreference;
 
 import com.google.common.base.Preconditions;
 
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Element;
+
 /**
  * Handle query requests.
  * 

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
 
b/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
index e305f2c..f3374c3 100644
--- 
a/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
+++ 
b/server/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
@@ -18,9 +18,10 @@
 
 package org.apache.kylin.rest.controller;
 
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonMappingException;
+import java.io.IOException;
+import java.util.List;
+import java.util.UUID;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.kylin.common.KylinConfig;
 import 

[16/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/checkstyle-suppressions.xml
--
diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
new file mode 100644
index 000..d247c65
--- /dev/null
+++ b/checkstyle-suppressions.xml
@@ -0,0 +1,37 @@
+
+http://www.puppycrawl.com/dtds/suppressions_1_0.dtd;>
+  
+
+  
+  
+  
+

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/checkstyle.xml
--
diff --git a/checkstyle.xml b/checkstyle.xml
new file mode 100644
index 000..10ba67b
--- /dev/null
+++ b/checkstyle.xml
@@ -0,0 +1,60 @@
+
+
+
+http://www.puppycrawl.com/dtds/configuration_1_3.dtd;>
+
+
+
+
+
+
+
+
+
+
+
+ftp://"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index 8719541..283f505 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -371,22 +371,22 @@ public class KylinConfig extends KylinConfigBase {
 }
 
 private static void dumpStackTrace() {
-
+
 //uncomment below to start debugging
-
-//Thread t = Thread.currentThread();
-//int maxStackTraceDepth = 20;
-//int current = 0;
-//
-//StackTraceElement[] stackTrace = t.getStackTrace();
-//StringBuilder buf = new StringBuilder("This is not a exception, just 
for diagnose purpose:");
-//buf.append("\n");
-//for (StackTraceElement e : stackTrace) {
-//if (++current > maxStackTraceDepth) {
-//break;
-//}
-//buf.append("\t").append("at ").append(e.toString()).append("\n");
-//}
-//logger.info(buf.toString());
+
+//Thread t = Thread.currentThread();
+//int maxStackTraceDepth = 20;
+//int current = 0;
+//
+//StackTraceElement[] stackTrace = t.getStackTrace();
+//StringBuilder buf = new StringBuilder("This is not a 
exception, just for diagnose purpose:");
+//buf.append("\n");
+//for (StackTraceElement e : stackTrace) {
+//if (++current > maxStackTraceDepth) {
+//break;
+//}
+//buf.append("\t").append("at 
").append(e.toString()).append("\n");
+//}
+//logger.info(buf.toString());
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-common/src/main/java/org/apache/kylin/common/persistence/FileResourceStore.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/persistence/FileResourceStore.java
 
b/core-common/src/main/java/org/apache/kylin/common/persistence/FileResourceStore.java
index c1c62fb..dcd3f38 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/persistence/FileResourceStore.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/persistence/FileResourceStore.java
@@ -74,7 +74,7 @@ public class FileResourceStore extends ResourceStore {
 NavigableSet resources = listResources(folderPath);
 if (resources == null)
 return Collections.emptyList();
-
+
 List result = 
Lists.newArrayListWithCapacity(resources.size());
 try {
 for (String res : resources) {

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/core-common/src/main/java/org/apache/kylin/common/persistence/JsonSerializer.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/persistence/JsonSerializer.java
 
b/core-common/src/main/java/org/apache/kylin/common/persistence/JsonSerializer.java
index d2a684e..2e7768a 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/persistence/JsonSerializer.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/persistence/JsonSerializer.java
@@ -25,7 +25,7 @@ import java.io.IOException;
 import org.apache.kylin.common.util.JsonUtil;
 
 /**
- * @author yangli9
+ * @author yangli9  
  */
 public class JsonSerializer implements 
Serializer {
 


[12/18] kylin git commit: KYLIN-1821 Reformat all of the java files and enable checkstyle to enforce code formatting

2016-06-25 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
--
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
index bbd0fc5..44c80ee 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
@@ -21,7 +21,11 @@ package org.apache.kylin.engine.mr;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.TimeZone;
 import java.util.regex.Matcher;
 
 import org.apache.commons.lang3.tuple.Pair;
@@ -98,7 +102,6 @@ public class CubingJob extends DefaultChainedExecutable {
 super();
 }
 
-
 void setDeployEnvName(String name) {
 setParam(DEPLOY_ENV_NAME, name);
 }
@@ -126,17 +129,17 @@ public class CubingJob extends DefaultChainedExecutable {
 return null;
 }
 switch (state) {
-case ERROR:
-logMsg = output.getVerboseMsg();
-break;
-case DISCARDED:
-logMsg = "job has been discarded";
-break;
-case SUCCEED:
-logMsg = "job has succeeded";
-break;
-default:
-return null;
+case ERROR:
+logMsg = output.getVerboseMsg();
+break;
+case DISCARDED:
+logMsg = "job has been discarded";
+break;
+case SUCCEED:
+logMsg = "job has succeeded";
+break;
+default:
+return null;
 }
 String content = ExecutableConstants.NOTIFY_EMAIL_TEMPLATE;
 content = content.replaceAll("\\$\\{job_name\\}", getName());

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/engine-mr/src/main/java/org/apache/kylin/engine/mr/DFSFileTableReader.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/DFSFileTableReader.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/DFSFileTableReader.java
index 227e176..300b123 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/DFSFileTableReader.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/DFSFileTableReader.java
@@ -119,7 +119,7 @@ public class DFSFileTableReader implements TableReader {
 
 private String[] split(String line, String delim) {
 // FIXME CVS line should be parsed considering escapes
-String str[] = StringSplitter.split(line, delim);
+String[] str = StringSplitter.split(line, delim);
 
 // un-escape CSV
 if (DFSFileTable.DELIM_COMMA.equals(delim)) {

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/engine-mr/src/main/java/org/apache/kylin/engine/mr/IMROutput.java
--
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/IMROutput.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/IMROutput.java
index e989042..276af65 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/IMROutput.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/IMROutput.java
@@ -27,7 +27,6 @@ public interface IMROutput {
 /** Return a helper to participate in batch cubing job flow. */
 public IMRBatchCubingOutputSide getBatchCubingOutputSide(CubeSegment seg);
 
-
 /** Return a helper to participate in batch cubing job flow. */
 public IMRBatchInvertedIndexingOutputSide 
getBatchInvertedIndexingOutputSide(IISegment seg);
 
@@ -81,7 +80,6 @@ public interface IMROutput {
 public void addStepPhase3_Cleanup(DefaultChainedExecutable jobFlow);
 }
 
-
 /**
  * Participate the batch inverted indexing flow as the output side. 
Responsible for saving
  * the output to storage (Phase 3).

http://git-wip-us.apache.org/repos/asf/kylin/blob/5d4982e2/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
index d7676f1..5228088 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/JobBuilderSupport.java
@@ -34,7 +34,6 @@ import 
org.apache.kylin.engine.mr.steps.UpdateCubeInfoAfterBuildStep;
 import org.apache.kylin.engine.mr.steps.UpdateCubeInfoAfterMergeStep;
 import org.apache.kylin.job.constant.ExecutableConstants;
 import 

[01/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 1044f1dbb -> 7b46ed14c


http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/tool/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/tool/.settings/org.eclipse.jdt.core.prefs 
b/tool/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/tool/.settings/org.eclipse.jdt.core.prefs
+++ b/tool/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

[06/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/kylin-it/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/kylin-it/.settings/org.eclipse.jdt.core.prefs 
b/kylin-it/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/kylin-it/.settings/org.eclipse.jdt.core.prefs
+++ b/kylin-it/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

[02/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/src/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/src/.settings/org.eclipse.jdt.core.prefs 
b/src/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000..5aaaf1e
--- /dev/null
+++ b/src/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,386 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

[08/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/engine-streaming/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/engine-streaming/.settings/org.eclipse.jdt.core.prefs 
b/engine-streaming/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/engine-streaming/.settings/org.eclipse.jdt.core.prefs
+++ b/engine-streaming/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

[13/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/core-common/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/core-common/.settings/org.eclipse.jdt.core.prefs 
b/core-common/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/core-common/.settings/org.eclipse.jdt.core.prefs
+++ b/core-common/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

[14/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
KYLIN-1821 keep all .settings same


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

Branch: refs/heads/master
Commit: 7b46ed14cee13c2c47a7158e413ba742e9f4660c
Parents: 1044f1d
Author: Hongbin Ma 
Authored: Mon Jun 27 09:54:48 2016 +0800
Committer: Hongbin Ma 
Committed: Mon Jun 27 09:55:52 2016 +0800

--
 .settings/org.eclipse.core.resources.prefs  |   2 -
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 assembly/.settings/org.eclipse.jdt.core.prefs   | 772 +--
 assembly/.settings/org.eclipse.jdt.ui.prefs |  14 +-
 atopcalcite/.settings/org.eclipse.jdt.ui.prefs  |   2 +-
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 .../.settings/org.eclipse.jdt.core.prefs| 772 +--
 core-common/.settings/org.eclipse.jdt.ui.prefs  |  14 +-
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 core-cube/.settings/org.eclipse.jdt.core.prefs  | 772 +--
 core-cube/.settings/org.eclipse.jdt.ui.prefs|  14 +-
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 .../.settings/org.eclipse.jdt.core.prefs| 772 +--
 .../.settings/org.eclipse.jdt.ui.prefs  |  14 +-
 core-job/.settings/org.eclipse.jdt.ui.prefs |   2 +-
 .../.settings/org.eclipse.core.resources.prefs  |  12 +-
 .../.settings/org.eclipse.jdt.core.prefs| 772 +--
 .../.settings/org.eclipse.jdt.ui.prefs  |  14 +-
 core-storage/.settings/org.eclipse.jdt.ui.prefs |   2 +-
 engine-mr/.settings/org.eclipse.jdt.ui.prefs|   2 +-
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 .../.settings/org.eclipse.jdt.core.prefs| 772 +--
 engine-spark/.settings/org.eclipse.jdt.ui.prefs |  14 +-
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 .../.settings/org.eclipse.jdt.core.prefs| 772 +--
 .../.settings/org.eclipse.jdt.ui.prefs  |  14 +-
 .../.settings/org.eclipse.core.resources.prefs  |   1 +
 .../.settings/org.eclipse.jdt.ui.prefs  |   2 +-
 jdbc/.settings/org.eclipse.core.resources.prefs |  11 +-
 jdbc/.settings/org.eclipse.jdt.core.prefs   | 772 +--
 jdbc/.settings/org.eclipse.jdt.ui.prefs |  14 +-
 .../.settings/org.eclipse.core.resources.prefs  |  12 +-
 kylin-it/.settings/org.eclipse.jdt.core.prefs   | 772 +--
 kylin-it/.settings/org.eclipse.jdt.ui.prefs |  14 +-
 .../.settings/org.eclipse.core.resources.prefs  |  12 +-
 query/.settings/org.eclipse.jdt.core.prefs  | 772 +--
 query/.settings/org.eclipse.jdt.ui.prefs|  14 +-
 .../.settings/org.eclipse.core.resources.prefs  |   1 +
 server-base/.settings/org.eclipse.jdt.ui.prefs  |   2 +-
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 server/.settings/org.eclipse.jdt.core.prefs | 772 +--
 server/.settings/org.eclipse.jdt.ui.prefs   |  14 +-
 source-hive/.settings/org.eclipse.jdt.ui.prefs  |   2 +-
 .../.settings/org.eclipse.core.resources.prefs  |  11 +-
 .../.settings/org.eclipse.jdt.core.prefs| 772 +--
 source-kafka/.settings/org.eclipse.jdt.ui.prefs |  14 +-
 src/.settings/org.eclipse.core.resources.prefs  |   6 +
 src/.settings/org.eclipse.jdt.core.prefs| 386 ++
 src/.settings/org.eclipse.jdt.ui.prefs  |   7 +
 .../.settings/org.eclipse.jdt.ui.prefs  |   2 +-
 tool/.settings/org.eclipse.core.resources.prefs |  11 +-
 tool/.settings/org.eclipse.jdt.core.prefs   | 772 +--
 tool/.settings/org.eclipse.jdt.ui.prefs |  14 +-
 53 files changed, 5596 insertions(+), 5187 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/.settings/org.eclipse.core.resources.prefs
--
diff --git a/.settings/org.eclipse.core.resources.prefs 
b/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 99f26c0..000
--- a/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/=UTF-8

http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/assembly/.settings/org.eclipse.core.resources.prefs
--
diff --git a/assembly/.settings/org.eclipse.core.resources.prefs 
b/assembly/.settings/org.eclipse.core.resources.prefs
index 365bbd6..29abf99 100644
--- a/assembly/.settings/org.eclipse.core.resources.prefs
+++ b/assembly/.settings/org.eclipse.core.resources.prefs
@@ -1,5 +1,6 @@

[12/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/core-cube/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/core-cube/.settings/org.eclipse.jdt.core.prefs 
b/core-cube/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/core-cube/.settings/org.eclipse.jdt.core.prefs
+++ b/core-cube/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

[11/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/core-dictionary/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/core-dictionary/.settings/org.eclipse.jdt.core.prefs 
b/core-dictionary/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/core-dictionary/.settings/org.eclipse.jdt.core.prefs
+++ b/core-dictionary/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

[10/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/core-metadata/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/core-metadata/.settings/org.eclipse.jdt.core.prefs 
b/core-metadata/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/core-metadata/.settings/org.eclipse.jdt.core.prefs
+++ b/core-metadata/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

[04/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/server/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/server/.settings/org.eclipse.jdt.core.prefs 
b/server/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/server/.settings/org.eclipse.jdt.core.prefs
+++ b/server/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

[09/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/engine-spark/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/engine-spark/.settings/org.eclipse.jdt.core.prefs 
b/engine-spark/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/engine-spark/.settings/org.eclipse.jdt.core.prefs
+++ b/engine-spark/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

[05/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/query/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/query/.settings/org.eclipse.jdt.core.prefs 
b/query/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/query/.settings/org.eclipse.jdt.core.prefs
+++ b/query/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

[03/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/source-kafka/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/source-kafka/.settings/org.eclipse.jdt.core.prefs 
b/source-kafka/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/source-kafka/.settings/org.eclipse.jdt.core.prefs
+++ b/source-kafka/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore

[07/14] kylin git commit: KYLIN-1821 keep all .settings same

2016-06-26 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7b46ed14/jdbc/.settings/org.eclipse.jdt.core.prefs
--
diff --git a/jdbc/.settings/org.eclipse.jdt.core.prefs 
b/jdbc/.settings/org.eclipse.jdt.core.prefs
index 19e2439..5aaaf1e 100644
--- a/jdbc/.settings/org.eclipse.jdt.core.prefs
+++ b/jdbc/.settings/org.eclipse.jdt.core.prefs
@@ -1,386 +1,386 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

kylin git commit: KYLIN-1781 fix config encoding error

2016-06-15 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/master 7a05309bf -> a179136be


KYLIN-1781 fix config encoding error

Signed-off-by: Hongbin Ma 


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

Branch: refs/heads/master
Commit: a179136beabcad7a2cbb766d448d9acf88194245
Parents: 7a05309
Author: zhaotianshuo 
Authored: Mon Jun 13 13:33:55 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Jun 16 13:45:47 2016 +0800

--
 .../src/main/java/org/apache/kylin/common/KylinConfig.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/a179136b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
index 580edd8..b4b3c1b 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -18,6 +18,7 @@
 
 package org.apache.kylin.common;
 
+import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -26,6 +27,7 @@ import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.Enumeration;
@@ -197,9 +199,9 @@ public class KylinConfig extends KylinConfigBase {
 fis = new FileInputStream(propFile);
 fis2 = new FileInputStream(overrideFile);
 Properties conf = new Properties();
-conf.load(fis);
+conf.load(new BufferedReader(new InputStreamReader(fis, 
"UTF-8")));
 Properties override = new Properties();
-override.load(fis2);
+override.load(new BufferedReader(new InputStreamReader(fis2, 
"UTF-8")));
 for (Map.Entry entries : override.entrySet()) {
 conf.setProperty(entries.getKey().toString(), 
entries.getValue().toString());
 }



[5/6] kylin git commit: minor, move all hll and topn related code to core-metadata

2016-01-27 Thread mahongbin
minor, move all hll and topn related code to core-metadata


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

Branch: refs/heads/2.x-staging
Commit: daa294b679cf857422acce9cf2c86b6c950a5b67
Parents: 5f4c581
Author: honma 
Authored: Wed Jan 27 22:19:00 2016 +0800
Committer: honma 
Committed: Wed Jan 27 22:19:00 2016 +0800

--
 core-common/pom.xml |   6 +-
 .../common/hll/HyperLogLogPlusCounter.java  | 340 ---
 .../kylin/common/hll/HyperLogLogPlusTable.java  | 199 ---
 .../org/apache/kylin/common/topn/Counter.java   |  83 -
 .../common/topn/DoubleDeltaSerializer.java  | 193 ---
 .../kylin/common/topn/DoublyLinkedList.java | 141 
 .../org/apache/kylin/common/topn/ListNode2.java |  51 ---
 .../apache/kylin/common/topn/TopNCounter.java   | 335 --
 .../common/hll/HyperLogLogCounterTest.java  | 245 -
 .../common/topn/DoubleDeltaSerializerTest.java  |  85 -
 .../kylin/common/topn/TopNCounterBasicTest.java | 132 ---
 .../common/topn/TopNCounterCombinationTest.java |  62 
 .../kylin/common/topn/TopNCounterTest.java  | 306 -
 .../cube/inmemcubing/InMemCubeBuilder.java  |   4 +-
 .../org/apache/kylin/cube/util/CubingUtils.java |   2 +-
 .../apache/kylin/gridtable/UnitTestSupport.java |   2 +-
 .../gridtable/AggregationCacheMemSizeTest.java  |   2 +-
 .../metadata/measure/MeasureCodecTest.java  |  18 +-
 core-metadata/pom.xml   |   5 +
 .../kylin/measure/hllc/HLLCAggregator.java  |   1 -
 .../kylin/measure/hllc/HLLCMeasureType.java |   1 -
 .../kylin/measure/hllc/HLLCSerializer.java  |   1 -
 .../measure/hllc/HLLDistinctCountAggFunc.java   |   1 -
 .../measure/hllc/HyperLogLogPlusCounter.java| 340 +++
 .../measure/hllc/HyperLogLogPlusTable.java  | 199 +++
 .../org/apache/kylin/measure/topn/Counter.java  |  83 +
 .../measure/topn/DoubleDeltaSerializer.java | 193 +++
 .../kylin/measure/topn/DoublyLinkedList.java| 141 
 .../apache/kylin/measure/topn/ListNode2.java|  51 +++
 .../kylin/measure/topn/TopNAggregator.java  |   1 -
 .../apache/kylin/measure/topn/TopNCounter.java  | 335 ++
 .../measure/topn/TopNCounterSerializer.java |   3 -
 .../kylin/measure/topn/TopNMeasureType.java |   2 -
 .../topn/TopNCounterSerializerTest.java |   2 +-
 .../measure/hll/HyperLogLogCounterTest.java | 245 +
 .../measure/topn/DoubleDeltaSerializerTest.java |  85 +
 .../measure/topn/TopNCounterBasicTest.java  | 131 +++
 .../topn/TopNCounterCombinationTest.java|  62 
 .../kylin/measure/topn/TopNCounterTest.java | 306 +
 .../kylin/engine/mr/common/CubeStatsReader.java |   2 +-
 .../kylin/engine/mr/common/CuboidStatsUtil.java |   2 +-
 .../mr/steps/FactDistinctColumnsReducer.java|   2 +-
 .../mr/steps/FactDistinctHiveColumnsMapper.java |   2 +-
 .../engine/mr/steps/MergeStatisticsStep.java|   2 +-
 .../kylin/engine/mr/steps/CubeSamplingTest.java |   3 +-
 .../steps/FactDistinctColumnsReducerTest.java   |   2 +-
 .../apache/kylin/engine/spark/SparkCubing.java  |   3 +-
 .../engine/streaming/IStreamingOutput.java  |   2 +-
 .../streaming/OneOffStreamingBuilder.java   |   2 +-
 .../engine/streaming/StreamingBatchBuilder.java |   2 +-
 .../streaming/cube/StreamingCubeBuilder.java|   2 +-
 .../invertedindex/measure/FixedHLLCodec.java|   2 +-
 .../cardinality/ColumnCardinalityMapper.java|   2 +-
 .../cardinality/ColumnCardinalityReducer.java   |   2 +-
 .../ColumnCardinalityReducerTest.java   |   4 +-
 .../endpoint/EndpointAggregators.java   |   2 +-
 .../hbase/steps/HBaseStreamingOutput.java   |   2 +-
 57 files changed, 2210 insertions(+), 2224 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/daa294b6/core-common/pom.xml
--
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 28566d6..bfdc662 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -109,11 +109,7 @@
 
 
 
-
-org.apache.commons
-commons-math3
-test
-
+   
 
 junit
 junit

http://git-wip-us.apache.org/repos/asf/kylin/blob/daa294b6/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
--
diff --git 

[4/6] kylin git commit: minor, move all hll and topn related code to core-metadata

2016-01-27 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/daa294b6/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusTable.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusTable.java
 
b/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusTable.java
deleted file mode 100644
index 25ee404..000
--- 
a/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusTable.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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.
-*/
-
-package org.apache.kylin.common.hll;
-
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-/**
- * @author xjiang
- * 
- */
-public class HyperLogLogPlusTable {
-
-// threshold and bias data taken from google's bias correction data set:
-// 
https://docs.google.com/document/d/1gyjfMHy43U9OWBXxfaeG-3MjGzejW1dlpyMwEYAAWEI/view?fullscreen#
-public static final double[] thresholdData = { 10, 20, 40, 80, 220, 400, 
900, 1800, 3100, 6500, 15500, 2, 5, 12, 35 };
-
-public static final double[][] rawEstimateData = {
-// precision 4
-{ 11, 11.717, 12.207, 12.7896, 13.2882, 13.8204, 14.3772, 14.9342, 
15.5202, 16.161, 16.7722, 17.4636, 18.0396, 18.6766, 19.3566, 20.0454, 20.7936, 
21.4856, 22.2666, 22.9946, 23.766, 24.4692, 25.3638, 26.0764, 26.7864, 27.7602, 
28.4814, 29.433, 30.2926, 31.0664, 31.9996, 32.7956, 33.5366, 34.5894, 35.5738, 
36.2698, 37.3682, 38.0544, 39.2342, 40.0108, 40.7966, 41.9298, 42.8704, 
43.6358, 44.5194, 45.773, 46.6772, 47.6174, 48.4888, 49.3304, 50.2506, 51.4996, 
52.3824, 53.3078, 54.3984, 55.5838, 56.6618, 57.2174, 58.3514, 59.0802, 
60.1482, 61.0376, 62.3598, 62.8078, 63.9744, 64.914, 65.781, 67.1806, 68.0594, 
68.8446, 69.7928, 70.8248, 71.8324, 72.8598, 73.6246, 74.7014, 75.393, 76.6708, 
77.2394, },
-// precision 5
-{ 23, 23.1194, 23.8208, 24.2318, 24.77, 25.2436, 25.7774, 26.2848, 
26.8224, 27.3742, 27.9336, 28.503, 29.0494, 29.6292, 30.2124, 30.798, 31.367, 
31.9728, 32.5944, 33.217, 33.8438, 34.3696, 35.0956, 35.7044, 36.324, 37.0668, 
37.6698, 38.3644, 39.049, 39.6918, 40.4146, 41.082, 41.687, 42.5398, 43.2462, 
43.857, 44.6606, 45.4168, 46.1248, 46.9222, 47.6804, 48.447, 49.3454, 49.9594, 
50.7636, 51.5776, 52.331, 53.19, 53.9676, 54.7564, 55.5314, 56.4442, 57.3708, 
57.9774, 58.9624, 59.8796, 60.755, 61.472, 62.2076, 63.1024, 63.8908, 64.7338, 
65.7728, 66.629, 67.413, 68.3266, 69.1524, 70.2642, 71.1806, 72.0566, 72.9192, 
73.7598, 74.3516, 75.5802, 76.4386, 77.4916, 78.1524, 79.1892, 79.8414, 
80.8798, 81.8376, 82.4698, 83.7656, 84.331, 85.5914, 86.6012, 87.7016, 88.5582, 
89.3394, 90.3544, 91.4912, 92.308, 93.3552, 93.9746, 95.2052, 95.727, 97.1322, 
98.3944, 98.7588, 100.242, 101.1914, 102.2538, 102.8776, 103.6292, 105.1932, 
105.9152, 107.0868, 107.6728, 108.7144, 110.3114, 110.8716,
-111.245, 112.7908, 113.7064, 114.636, 115.7464, 116.1788, 
117.7464, 118.4896, 119.6166, 120.5082, 121.7798, 122.9028, 123.4426, 124.8854, 
125.705, 126.4652, 128.3464, 128.3462, 130.0398, 131.0342, 131.0042, 132.4766, 
133.511, 134.7252, 135.425, 136.5172, 138.0572, 138.6694, 139.3712, 140.8598, 
141.4594, 142.554, 143.4006, 144.7374, 146.1634, 146.8994, 147.605, 147.9304, 
149.1636, 150.2468, 151.5876, 152.2096, 153.7032, 154.7146, 155.807, 156.9228, 
157.0372, 158.5852, },
-// precision 6
-{ 46, 46.1902, 47.271, 47.8358, 48.8142, 49.2854, 50.317, 51.354, 
51.8924, 52.9436, 53.4596, 54.5262, 55.6248, 56.1574, 57.2822, 57.837, 58.9636, 
60.074, 60.7042, 61.7976, 62.4772, 63.6564, 64.7942, 65.5004, 66.686, 67.291, 
68.5672, 69.8556, 70.4982, 71.8204, 72.4252, 73.7744, 75.0786, 75.8344, 
77.0294, 77.8098, 79.0794, 80.5732, 81.1878, 82.5648, 83.2902, 84.6784, 
85.3352, 86.8946, 88.3712, 89.0852, 90.499, 91.2686, 92.6844, 94.2234, 94.9732, 
96.3356, 97.2286, 98.7262, 100.3284, 101.1048, 102.5962, 103.3562, 105.1272, 
106.4184, 107.4974, 109.0822, 109.856, 111.48, 113.2834, 114.0208, 115.637, 
116.5174, 118.0576, 119.7476, 120.427, 122.1326, 123.2372, 125.2788, 126.6776, 
127.7926, 129.1952, 129.9564, 131.6454, 

[6/6] kylin git commit: minor, check hdfs permission at build cube

2016-01-27 Thread mahongbin
minor, check hdfs permission at build cube


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

Branch: refs/heads/2.x-staging
Commit: f4667226d1ba34471c27192b95a0494f5f991d88
Parents: daa294b
Author: honma 
Authored: Thu Jan 28 10:34:25 2016 +0800
Committer: honma 
Committed: Thu Jan 28 10:34:25 2016 +0800

--
 .../kylin/provision/BuildCubeWithEngine.java | 19 +++
 1 file changed, 19 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/f4667226/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
--
diff --git 
a/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java 
b/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
index 32facf1..f44fc38 100644
--- a/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
+++ b/kylin-it/src/test/java/org/apache/kylin/provision/BuildCubeWithEngine.java
@@ -19,6 +19,7 @@
 package org.apache.kylin.provision;
 
 import java.io.File;
+import java.io.IOException;
 import java.lang.reflect.Method;
 import java.text.SimpleDateFormat;
 import java.util.List;
@@ -32,6 +33,9 @@ import java.util.concurrent.Future;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.AbstractKylinTestCase;
@@ -43,6 +47,7 @@ import org.apache.kylin.cube.CubeSegment;
 import org.apache.kylin.cube.CubeUpdate;
 import org.apache.kylin.engine.EngineFactory;
 import org.apache.kylin.engine.mr.CubingJob;
+import org.apache.kylin.engine.mr.HadoopUtil;
 import org.apache.kylin.job.DeployUtil;
 import org.apache.kylin.job.engine.JobEngineConfig;
 import org.apache.kylin.job.execution.AbstractExecutable;
@@ -93,6 +98,20 @@ public class BuildCubeWithEngine {
 }
 
 
HBaseMetadataTestCase.staticCreateTestMetadata(AbstractKylinTestCase.SANDBOX_TEST_DATA);
+
+try {
+//check hdfs permission
+Configuration hconf = HadoopUtil.getCurrentConfiguration();
+FileSystem fileSystem = FileSystem.get(hconf);
+String hdfsWorkingDirectory = 
KylinConfig.getInstanceFromEnv().getHdfsWorkingDirectory();
+Path coprocessorDir = new Path(hdfsWorkingDirectory);
+boolean success = fileSystem.mkdirs(coprocessorDir);
+if (!success) {
+throw new IOException("mkdir fails");
+}
+} catch (IOException e) {
+throw new RuntimeException("failed to create 
kylin.hdfs.working.dir, Please make sure the user has right to access " + 
KylinConfig.getInstanceFromEnv().getHdfsWorkingDirectory(), e);
+}
 }
 
 public void before() throws Exception {



[1/6] kylin git commit: minor, move all hll and topn related code to core-metadata

2016-01-27 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 5f4c581e6 -> f4667226d


http://git-wip-us.apache.org/repos/asf/kylin/blob/daa294b6/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoublyLinkedList.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoublyLinkedList.java
 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoublyLinkedList.java
new file mode 100644
index 000..03e4066
--- /dev/null
+++ 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/DoublyLinkedList.java
@@ -0,0 +1,141 @@
+/*
+ * 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.
+*/
+
+package org.apache.kylin.measure.topn;
+
+
+/**
+ * Modified from DoublyLinkedList.java in https://github.com/addthis/stream-lib
+ * 
+ * @param 
+ */
+public class DoublyLinkedList {
+
+private int size = 0;
+private ListNode2 tail;
+private ListNode2 head;
+
+/**
+ * Append to head of list
+ */
+public ListNode2 add(T value) {
+ListNode2 node = new ListNode2(value);
+add(node);
+
+return node;
+}
+
+/**
+ * Prepend to tail of list
+ */
+public ListNode2 enqueue(T value) {
+ListNode2 node = new ListNode2(value);
+   
+return enqueue(node);
+}
+
+public ListNode2 enqueue(ListNode2 node) {
+if (size++ == 0) {
+head = node;
+} else {
+node.next = tail;
+tail.prev = node;
+}
+
+tail = node;
+
+return node;
+}
+
+public void add(ListNode2 node) {
+node.prev = head;
+node.next = null;
+
+if (size++ == 0) {
+tail = node;
+} else {
+head.next = node;
+}
+
+head = node;
+}
+
+public ListNode2 addAfter(ListNode2 node, T value) {
+ListNode2 newNode = new ListNode2(value);
+addAfter(node, newNode);
+return newNode;
+}
+
+public void addAfter(ListNode2 node, ListNode2 newNode) {
+newNode.next = node.next;
+newNode.prev = node;
+node.next = newNode;
+if (newNode.next == null) {
+head = newNode;
+} else {
+newNode.next.prev = newNode;
+}
+size++;
+}
+
+
+public void addBefore(ListNode2 node, ListNode2 newNode) {
+newNode.prev = node.prev;
+newNode.next = node;
+node.prev = newNode;
+if (newNode.prev == null) {
+tail = newNode;
+} else {
+newNode.prev.next = newNode;
+}
+size++;
+}
+
+public void remove(ListNode2 node) {
+if (node == tail) {
+tail = node.next;
+} else {
+node.prev.next = node.next;
+}
+
+if (node == head) {
+head = node.prev;
+} else {
+node.next.prev = node.prev;
+}
+size--;
+}
+
+public int size() {
+return size;
+}
+
+
+public ListNode2 head() {
+return head;
+}
+
+public ListNode2 tail() {
+return tail;
+}
+
+public boolean isEmpty() {
+return size == 0;
+}
+
+}

http://git-wip-us.apache.org/repos/asf/kylin/blob/daa294b6/core-metadata/src/main/java/org/apache/kylin/measure/topn/ListNode2.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/topn/ListNode2.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/topn/ListNode2.java
new file mode 100644
index 000..b2f47c9
--- /dev/null
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/topn/ListNode2.java
@@ -0,0 +1,51 @@
+/*
+ * 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
+ * 
+ * 

kylin git commit: KYLIN-1356 increase memory settings for failsafe

2016-01-26 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 5511f2609 -> cd5e21b4c


KYLIN-1356 increase memory settings for failsafe


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

Branch: refs/heads/2.x-staging
Commit: cd5e21b4c077a0df5714a427c1cbd34b54a14d13
Parents: 5511f26
Author: honma 
Authored: Wed Jan 27 12:45:34 2016 +0800
Committer: honma 
Committed: Wed Jan 27 12:45:34 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/cd5e21b4/kylin-it/pom.xml
--
diff --git a/kylin-it/pom.xml b/kylin-it/pom.xml
index 3f38d16..6cb44a5 100644
--- a/kylin-it/pom.xml
+++ b/kylin-it/pom.xml
@@ -282,6 +282,7 @@
 true
 
 
+-Xms1G -Xmx4G -XX:PermSize=128M 
-XX:MaxPermSize=512M
 
 
 



kylin git commit: KYLIN-1372 fix CI

2016-01-31 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 75970c3b1 -> 555a2e566


KYLIN-1372 fix CI


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

Branch: refs/heads/1.x-staging
Commit: 555a2e5667837d6bdf16460a34c88f3f5130bf31
Parents: 75970c3
Author: honma 
Authored: Mon Feb 1 13:48:06 2016 +0800
Committer: honma 
Committed: Mon Feb 1 13:48:06 2016 +0800

--
 query/src/test/resources/query/sql_dynamic/query03.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/555a2e56/query/src/test/resources/query/sql_dynamic/query03.sql
--
diff --git a/query/src/test/resources/query/sql_dynamic/query03.sql 
b/query/src/test/resources/query/sql_dynamic/query03.sql
index 31d5d0b..3187c33 100644
--- a/query/src/test/resources/query/sql_dynamic/query03.sql
+++ b/query/src/test/resources/query/sql_dynamic/query03.sql
@@ -17,7 +17,7 @@
 --
 
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV
- , count(1) as TRANS_CNT, count(distinct leaf_categ_id) as LEAF_CATEG_CNT
+ , count(1) as TRANS_CNT
  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



kylin git commit: KYLIN-1372 fix CI

2016-01-31 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc a9637c9c5 -> d3250acf3


KYLIN-1372 fix CI


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

Branch: refs/heads/2.0-rc
Commit: d3250acf3516ceffc08f830ecac2993cdc1a91fd
Parents: a9637c9
Author: honma 
Authored: Mon Feb 1 13:44:02 2016 +0800
Committer: honma 
Committed: Mon Feb 1 13:45:58 2016 +0800

--
 kylin-it/src/test/resources/query/sql_dynamic/query03.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/d3250acf/kylin-it/src/test/resources/query/sql_dynamic/query03.sql
--
diff --git a/kylin-it/src/test/resources/query/sql_dynamic/query03.sql 
b/kylin-it/src/test/resources/query/sql_dynamic/query03.sql
index 90574f7..ceefe70 100644
--- a/kylin-it/src/test/resources/query/sql_dynamic/query03.sql
+++ b/kylin-it/src/test/resources/query/sql_dynamic/query03.sql
@@ -17,7 +17,7 @@
 --
 
 select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV
- , count(1) as TRANS_CNT, count(distinct test_kylin_fact.leaf_categ_id) as 
LEAF_CATEG_CNT
+ , count(1) as TRANS_CNT
  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



kylin git commit: KYLIN-1313 fix CI

2016-02-01 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 82c6d588f -> 54e491502


KYLIN-1313 fix CI


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

Branch: refs/heads/2.x-staging
Commit: 54e491502fb00b88fbabe0dcbc32aea91dc874e3
Parents: 82c6d58
Author: honma 
Authored: Mon Feb 1 22:14:41 2016 +0800
Committer: honma 
Committed: Mon Feb 1 22:14:41 2016 +0800

--
 .../measure/extendedcolumn/ExtendedColumnSerializerTest.java   | 6 +++---
 examples/test_case_data/sandbox/kylin.properties   | 2 +-
 .../src/test/java/org/apache/kylin/query/ITKylinQueryTest.java | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/54e49150/core-metadata/src/test/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnSerializerTest.java
--
diff --git 
a/core-metadata/src/test/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnSerializerTest.java
 
b/core-metadata/src/test/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnSerializerTest.java
index dd73369..fed1c28 100644
--- 
a/core-metadata/src/test/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnSerializerTest.java
+++ 
b/core-metadata/src/test/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnSerializerTest.java
@@ -39,7 +39,7 @@ public class ExtendedColumnSerializerTest {
 public void testSerDesNull() {
 ExtendedColumnSerializer serializer = new 
ExtendedColumnSerializer(DataType.getType("extendedcolumn(20)"));
 MeasureIngester ingester = measureType.newIngester();
-ByteArray array = ingester.valueOf(new String[] { null }, null, null);
+ByteArray array = ingester.valueOf(new String[] { null, null }, null, 
null);
 Assert.assertTrue(new ByteArray().equals(array));
 
 ByteBuffer buffer = ByteBuffer.allocate(serializer.maxLength());
@@ -57,7 +57,7 @@ public class ExtendedColumnSerializerTest {
 
 ExtendedColumnSerializer serializer = new 
ExtendedColumnSerializer(DataType.getType("extendedcolumn(20)"));
 MeasureIngester ingester = measureType.newIngester();
-ByteArray array = ingester.valueOf(new String[] { text }, null, null);
+ByteArray array = ingester.valueOf(new String[] { null, text }, null, 
null);
 
 ByteBuffer buffer = ByteBuffer.allocate(serializer.maxLength());
 serializer.serialize(array, buffer);
@@ -71,7 +71,7 @@ public class ExtendedColumnSerializerTest {
 String text = StringUtils.repeat("h", 21);
 ExtendedColumnSerializer serializer = new 
ExtendedColumnSerializer(DataType.getType("extendedcolumn(20)"));
 MeasureIngester ingester = measureType.newIngester();
-ByteArray array = ingester.valueOf(new String[] { text }, null, null);
+ByteArray array = ingester.valueOf(new String[] { null, text }, null, 
null);
 
 ByteBuffer buffer = ByteBuffer.allocate(serializer.maxLength());
 serializer.serialize(array, buffer);

http://git-wip-us.apache.org/repos/asf/kylin/blob/54e49150/examples/test_case_data/sandbox/kylin.properties
--
diff --git a/examples/test_case_data/sandbox/kylin.properties 
b/examples/test_case_data/sandbox/kylin.properties
index ccdc3a1..bf161fc 100644
--- a/examples/test_case_data/sandbox/kylin.properties
+++ b/examples/test_case_data/sandbox/kylin.properties
@@ -24,7 +24,7 @@ kylin.job.mapreduce.default.reduce.input.mb=500
 
 # If true, job engine will not assume that hadoop CLI reside on the same 
server as it self
 # you will have to specify kylin.job.remote.cli.hostname, 
kylin.job.remote.cli.username and kylin.job.remote.cli.password
-kylin.job.run.as.remote.cmd=true
+kylin.job.run.as.remote.cmd=false
 
 # Only necessary when kylin.job.run.as.remote.cmd=true
 kylin.job.remote.cli.hostname=sandbox

http://git-wip-us.apache.org/repos/asf/kylin/blob/54e49150/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
--
diff --git 
a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java 
b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
index 89a9740..fa71db2 100644
--- a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
@@ -45,7 +45,7 @@ public class ITKylinQueryTest extends KylinTestBase {
 
 @BeforeClass
 public static void setUp() throws Exception {
-

svn commit: r1728270 - in /kylin/site: ./ blog/ blog/2016/ blog/2016/02/ blog/2016/02/03/ blog/2016/02/03/streaming-cubing/ development/

2016-02-03 Thread mahongbin
Author: mahongbin
Date: Wed Feb  3 08:35:20 2016
New Revision: 1728270

URL: http://svn.apache.org/viewvc?rev=1728270=rev
Log:
UPDATE MESSAGE

Added:
kylin/site/blog/2016/
kylin/site/blog/2016/02/
kylin/site/blog/2016/02/03/
kylin/site/blog/2016/02/03/streaming-cubing/
kylin/site/blog/2016/02/03/streaming-cubing/index.html
Modified:
kylin/site/blog/index.html
kylin/site/development/about_temp_files.html
kylin/site/development/dev_env.html
kylin/site/development/howto_contribute.html
kylin/site/development/howto_docs.html
kylin/site/development/howto_package.html
kylin/site/development/howto_release.html
kylin/site/development/howto_test.html
kylin/site/development/index.html
kylin/site/development/new_metadata.html
kylin/site/development/web_tech.html
kylin/site/feed.xml

Added: kylin/site/blog/2016/02/03/streaming-cubing/index.html
URL: 
http://svn.apache.org/viewvc/kylin/site/blog/2016/02/03/streaming-cubing/index.html?rev=1728270=auto
==
--- kylin/site/blog/2016/02/03/streaming-cubing/index.html (added)
+++ kylin/site/blog/2016/02/03/streaming-cubing/index.html Wed Feb  3 08:35:20 
2016
@@ -0,0 +1,272 @@
+
+
+
+   
+
+
+  
+  
+  
+
+  Apache Kylin | Streaming cubing (Prototype)
+  
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+  
+  
+
+  http://kylin.apache.org/blog/2016/02/03/streaming-cubing/;>
+  http://kylin.apache.org/feed.xml; />
+
+
+
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+  //oringal tracker for kylin.io
+  ga('create', 'UA-55534813-1', 'auto');
+  //new tracker for kylin.apache.org
+  ga('create', 'UA-55534813-2', 'auto', {'name':'toplevel'});
+
+  ga('send', 'pageview');
+  ga('toplevel.send', 'pageview');
+
+
+
+
+ 
+ 
+
+
+   
+   
+
+
+  
+  
+  Apache Kylin™ Extreme OLAP Engine for Big 
Data 
+
+  
+  
+
+  
+  
+  
+
+
+
+  
+Toggle navigation
+
+
+
+  
+ 
+
+
+
+
+  
+ Home
+  Docs
+  Download
+  Community
+  Development
+  Blog
+  中文版  
+  https://twitter.com/apachekylin; target="_blank" 
class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" >
+  https://github.com/apache/kylin; target="_blank" 
class="fa fa-github-alt fa-lg" title="Github: apache/kylin" >  
+  https://www.facebook.com/kylinio; target="_blank" 
class="fa fa-facebook fa-lg" title="Facebook: kylin.io" >   
+
+
+  
+
+ 
+
+   
+   
+   
+   Apache Kylin™ 
Technical Blog
+   
+   
+
+   
+   
+
+   
+
+
+
+  
+Streaming cubing (Prototype)
+Feb 3, 2016 • Hongbin Ma
+  
+
+  
+One of the most important features in 2.x branches is streaming cubing 
which enables OLAP analysis on streaming data. Streaming cubing delivers faster 
insights on the data to help more promptly business decisions. Even though 
there are already many real time analysis tools in open source community, Kylin 
Streaming cubing still differs from them in multiple angles:
+
+Firstly, Kylin Streaming Cubing aligns with Kylin traditional cubing to 
provided unified, ANSI SQL interface. Actually Kylin Streaming shares the 
storage engine and query engine with traditional Kylin cubes, so in theory all 
of the optimization techniques to save storage and speed up query performance 
can also be applied on streaming cubes. Besides, all the supported 
aggregations/filters/UDFs still work for streaming cubes. By unifying the 
storage engine and query engine we also get freed from double amount of 
maintaince work.
+
+Secondly, Kylin Streaming Cubing does not require large amount of memory to 
store real time data, nor does it attempts to provide truly “real time” 
analysis. By our customer survey we found that minutes of visualization latency 
is acceptable for OLAP analysts. So our streaming cubing adopts the micro batch 
approach. Incoming streaming data are partitioned into different time windows 
and we build a micro batch for each time window. The cube output for each micro 
batch is directly saved to HBase. The query engine goes to HBase for data 
retrieving instead of the data ingestion server. The benefit of such design is 
that we don’t have to maintain large amount of in-memory index which cou

svn commit: r1728267 - in /kylin/site: ./ development/ images/develop/

2016-02-03 Thread mahongbin
Author: mahongbin
Date: Wed Feb  3 08:26:52 2016
New Revision: 1728267

URL: http://svn.apache.org/viewvc?rev=1728267=rev
Log:
UPDATE MESSAGE

Added:
kylin/site/development/streaming_cubing.html
kylin/site/images/develop/streaming.png   (with props)
Modified:
kylin/site/development/about_temp_files.html
kylin/site/development/dev_env.html
kylin/site/development/howto_contribute.html
kylin/site/development/howto_docs.html
kylin/site/development/howto_package.html
kylin/site/development/howto_release.html
kylin/site/development/howto_test.html
kylin/site/development/index.html
kylin/site/development/new_metadata.html
kylin/site/development/web_tech.html
kylin/site/feed.xml

Modified: kylin/site/development/about_temp_files.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/about_temp_files.html?rev=1728267=1728266=1728267=diff
==
--- kylin/site/development/about_temp_files.html (original)
+++ kylin/site/development/about_temp_files.html Wed Feb  3 08:26:52 2016
@@ -405,6 +405,8 @@
 
   
 
+  
+
   Kylin Web Summary  
   
 
@@ -424,6 +426,39 @@
   
 
 
+   
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Streaming cubing 
(Prototype)  
+  
+
+
 
 
 

Modified: kylin/site/development/dev_env.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/dev_env.html?rev=1728267=1728266=1728267=diff
==
--- kylin/site/development/dev_env.html (original)
+++ kylin/site/development/dev_env.html Wed Feb  3 08:26:52 2016
@@ -405,6 +405,8 @@
 
   
 
+  
+
   Kylin Web Summary  
   
 
@@ -424,6 +426,39 @@
   
 
 
+   
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Streaming cubing 
(Prototype)  
+  
+
+
 
 
 

Modified: kylin/site/development/howto_contribute.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/howto_contribute.html?rev=1728267=1728266=1728267=diff
==
--- kylin/site/development/howto_contribute.html (original)
+++ kylin/site/development/howto_contribute.html Wed Feb  3 08:26:52 2016
@@ -405,6 +405,8 @@
 
   
 
+  
+
   Kylin Web Summary  
   
 
@@ -424,6 +426,39 @@
   
 
 
+   
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Streaming cubing 
(Prototype)  
+  
+
+
 
 
 

Modified: kylin/site/development/howto_docs.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/howto_docs.html?rev=1728267=1728266=1728267=diff
==
--- kylin/site/development/howto_docs.html (original)
+++ kylin/site/development/howto_docs.html Wed Feb  3 08:26:52 2016
@@ -405,6 +405,8 @@
 
   
 
+  
+
   Kylin Web Summary  
   
 
@@ -424,6 +426,39 @@
   
 
 
+   
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Streaming cubing 
(Prototype)  
+  
+
+
 
 
 

Modified: kylin/site/development/howto_package.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/howto_package.html?rev=1728267=1728266=1728267=diff
==
--- kylin/site/development/howto_package.html (original)
+++ kylin/site/development/howto_package.html Wed Feb  3 08:26:52 2016
@@ -405,6 +405,8 @@
 
   
 
+  
+
   Kylin Web Summary  
   
 
@@ -424,6 +426,39 @@
   
 
 
+   
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Streaming cubing 
(Prototype)  
+  
+
+
 
 
 

Modified: kylin/site/development/howto_release.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/howto_release.html?rev=1728267=1728266=1728267=diff
==
--- kylin/site/development/howto_release.html (original)
+++ kylin/site/development/howto_release.html Wed Feb  3 08:26:52 2016
@@ -405,6 +405,8 @@
 
   
 
+  
+
   Kylin Web Summary  
   
 
@@ -424,6 +426,39 @@
   
 
 
+   
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Streaming cubing 
(Prototype)  
+  
+
+
 
 
 

Modified: kylin/site/development/howto_test.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/howto_test.html?rev=1728267=1728266=1728267=diff

kylin git commit: KYLIN-1366 Bind metadata version with release version(chen hao)

2016-02-03 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 36e26528e -> e2a0d1d82


KYLIN-1366 Bind metadata version with release version(chen hao)


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

Branch: refs/heads/2.x-staging
Commit: e2a0d1d821b0650a201370e0964a43207a744c21
Parents: 36e2652
Author: honma 
Authored: Thu Feb 4 10:06:47 2016 +0800
Committer: honma 
Committed: Thu Feb 4 10:06:47 2016 +0800

--
 .../apache/kylin/common/KylinConfigBase.java|  8 
 .../org/apache/kylin/common/KylinVersion.java   | 40 
 .../persistence/RootPersistentEntity.java   | 36 +++---
 .../org/apache/kylin/cube/CubeInstance.java | 14 +--
 .../org/apache/kylin/cube/model/CubeDesc.java   |  2 +-
 .../org/apache/kylin/dict/DictionaryInfo.java   |  4 +-
 .../kylin/dict/lookup/SnapshotManager.java  |  2 +-
 .../kylin/metadata/model/DataModelDesc.java |  2 +-
 .../kylin/metadata/project/ProjectInstance.java |  2 +-
 .../kylin/metadata/project/ProjectManager.java  |  2 +-
 .../kylin/storage/hybrid/HybridInstance.java|  2 +-
 .../metadata/cube/kylin_sales_cube.json |  2 +-
 .../cube_desc/kylin_sales_cube_desc.json|  1 +
 .../metadata/model_desc/kylin_sales_model.json  |  1 +
 .../metadata/project/learn_kylin.json   |  1 +
 .../metadata/table/DEFAULT.KYLIN_CAL_DT.json|  1 +
 .../table/DEFAULT.KYLIN_CATEGORY_GROUPINGS.json |  1 +
 .../metadata/table/DEFAULT.KYLIN_SALES.json |  1 +
 .../test_kylin_cube_with_slr_1_new_segment.json |  2 +-
 .../cube/test_kylin_cube_with_slr_empty.json|  2 +-
 ...est_kylin_cube_with_slr_left_join_empty.json |  2 +-
 ...est_kylin_cube_with_slr_left_join_ready.json |  2 +-
 .../cube/test_kylin_cube_with_slr_ready.json|  2 +-
 ...st_kylin_cube_with_slr_ready_2_segments.json |  2 +-
 .../cube/test_kylin_cube_without_slr_empty.json |  2 +-
 ..._kylin_cube_without_slr_left_join_empty.json |  2 +-
 ..._kylin_cube_without_slr_left_join_ready.json |  2 +-
 ..._without_slr_left_join_ready_2_segments.json |  2 +-
 .../cube/test_kylin_cube_without_slr_ready.json |  2 +-
 .../cube/test_streaming_table_cube.json |  2 +-
 .../test_kylin_cube_with_slr_desc.json  |  1 +
 ...test_kylin_cube_with_slr_left_join_desc.json |  1 +
 .../test_kylin_cube_without_slr_desc.json   |  2 +
 ...t_kylin_cube_without_slr_left_join_desc.json |  1 +
 .../test_streaming_table_cube_desc.json |  1 +
 .../hybrid/test_kylin_hybrid_inner_join.json|  1 +
 .../hybrid/test_kylin_hybrid_left_join.json |  1 +
 .../hybrid/test_kylin_hybrid_ready.json |  1 +
 .../invertedindex/test_kylin_ii_inner_join.json |  1 +
 .../invertedindex/test_kylin_ii_left_join.json  |  2 +-
 .../invertedindex/test_streaming_table_ii.json  |  2 +-
 .../test_kylin_ii_inner_join_desc.json  |  1 +
 .../test_kylin_ii_left_join_desc.json   |  1 +
 .../test_streaming_table_ii_desc.json   |  1 +
 .../localmeta/kafka/kafka_test.json |  1 +
 .../kafka/test_streaming_table_cube.json|  1 +
 .../kafka/test_streaming_table_ii.json  |  1 +
 .../test_kylin_inner_join_model_desc.json   |  1 +
 .../test_kylin_left_join_model_desc.json|  1 +
 .../test_streaming_table_model_desc.json|  1 +
 .../localmeta/project/default.json  |  1 +
 .../localmeta/streaming/kafka_test.json |  1 +
 .../streaming/test_streaming_table_cube.json|  1 +
 .../streaming/test_streaming_table_ii.json  |  1 +
 .../table/DEFAULT.STREAMING_TABLE.json  |  1 +
 .../table/DEFAULT.TEST_CATEGORY_GROUPINGS.json  |  1 +
 .../table/DEFAULT.TEST_KYLIN_FACT.json  |  1 +
 .../localmeta/table/EDW.TEST_CAL_DT.json|  1 +
 .../table/EDW.TEST_SELLER_TYPE_DIM.json |  1 +
 .../localmeta/table/EDW.TEST_SITES.json |  1 +
 .../apache/kylin/invertedindex/IIInstance.java  | 12 +-
 .../kylin/rest/controller/CubeController.java   |  4 +-
 .../hbase/util/ExtendCubeToHybridCLI.java   |  4 +-
 63 files changed, 143 insertions(+), 56 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/e2a0d1d8/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index bfad306..a44831d 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java

kylin git commit: minor, avoid verbose logging in serialier

2016-02-02 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 05df71369 -> 62a8cb268


minor, avoid verbose logging in serialier


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

Branch: refs/heads/1.x-staging
Commit: 62a8cb268e906738502338c7978b39bb3fd2c28d
Parents: 05df713
Author: honma 
Authored: Wed Feb 3 14:40:55 2016 +0800
Committer: honma 
Committed: Wed Feb 3 14:40:55 2016 +0800

--
 .../org/apache/kylin/metadata/datatype/BigDecimalSerializer.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/62a8cb26/metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
--
diff --git 
a/metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
 
b/metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
index 468e4b0..25805da 100644
--- 
a/metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
+++ 
b/metadata/src/main/java/org/apache/kylin/metadata/datatype/BigDecimalSerializer.java
@@ -48,8 +48,8 @@ public class BigDecimalSerializer extends 
DataTypeSerializer {
 @Override
 public void serialize(BigDecimal value, ByteBuffer out) {
 if (value.scale() > type.getScale()) {
-if (avoidVerbose % 1 == 0) {
-logger.warn("value's scale has exceeded the " + 
type.getScale() + ", cut it off, to ensure encoded value do not exceed 
maxLength " + maxLength + " times:" + (avoidVerbose++));
+if (avoidVerbose++ % 1 == 0) {
+logger.warn("value's scale has exceeded the " + 
type.getScale() + ", cut it off, to ensure encoded value do not exceed 
maxLength " + maxLength + " times:" + (avoidVerbose));
 }
 value = value.setScale(type.getScale(), 
BigDecimal.ROUND_HALF_EVEN);
 }



[1/2] kylin git commit: KYLIN-1436: If error exists during fetching streaming messages, streaming building should throw exception

2016-02-23 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc f18f7b025 -> 924421810


KYLIN-1436: If error exists during fetching streaming messages, streaming 
building should throw exception

Signed-off-by: honma 


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

Branch: refs/heads/2.0-rc
Commit: 9244218103906566d50bb1eb17e6dbd8da2eee6e
Parents: 1f93bec
Author: yangzhong 
Authored: Tue Feb 23 18:01:17 2016 +0800
Committer: honma 
Committed: Tue Feb 23 18:22:08 2016 +0800

--
 .../java/org/apache/kylin/source/kafka/KafkaStreamingInput.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/92442181/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
--
diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
index bcde47b..2e262b3 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
@@ -90,8 +90,7 @@ public class KafkaStreamingInput implements IStreamingInput {
 logger.warn("this thread should not be interrupted, just 
ignore", e);
 continue;
 } catch (ExecutionException e) {
-logger.error("error when get StreamingMessages", 
e.getCause());
-continue;
+throw new RuntimeException("error when get 
StreamingMessages",e.getCause());
 }
 }
 final Pair timeRange = Pair.newPair(startTime, 
endTime);



[2/2] kylin git commit: KYLIN-1435: Relax the checking for PartitionMetadata and logger the error code

2016-02-23 Thread mahongbin
KYLIN-1435: Relax the checking for PartitionMetadata and logger the error code

Signed-off-by: honma 


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

Branch: refs/heads/2.0-rc
Commit: 1f93bec1ca14fe0bdc2943fa9000404401f0acf5
Parents: f18f7b0
Author: yangzhong 
Authored: Tue Feb 23 17:37:11 2016 +0800
Committer: honma 
Committed: Tue Feb 23 18:22:08 2016 +0800

--
 .../java/org/apache/kylin/source/kafka/KafkaStreamingInput.java | 5 -
 .../java/org/apache/kylin/source/kafka/util/KafkaUtils.java | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/1f93bec1/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
--
diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
index ee5a555..bcde47b 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaStreamingInput.java
@@ -123,7 +123,10 @@ public class KafkaStreamingInput implements 
IStreamingInput {
 
 private Broker getLeadBroker() {
 final PartitionMetadata partitionMetadata = 
KafkaRequester.getPartitionMetadata(kafkaClusterConfig.getTopic(), partitionId, 
replicaBrokers, kafkaClusterConfig);
-if (partitionMetadata != null && partitionMetadata.errorCode() == 
0) {
+if (partitionMetadata != null) {
+if (partitionMetadata.errorCode() != 0){
+logger.warn("PartitionMetadata errorCode: 
"+partitionMetadata.errorCode());
+}
 replicaBrokers = partitionMetadata.replicas();
 return partitionMetadata.leader();
 } else {

http://git-wip-us.apache.org/repos/asf/kylin/blob/1f93bec1/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaUtils.java
--
diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaUtils.java 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaUtils.java
index ab54abb..f506999 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaUtils.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaUtils.java
@@ -51,7 +51,10 @@ public final class KafkaUtils {
 
 public static Broker getLeadBroker(KafkaClusterConfig kafkaClusterConfig, 
int partitionId) {
 final PartitionMetadata partitionMetadata = 
KafkaRequester.getPartitionMetadata(kafkaClusterConfig.getTopic(), partitionId, 
kafkaClusterConfig.getBrokers(), kafkaClusterConfig);
-if (partitionMetadata != null && partitionMetadata.errorCode() == 0) {
+if (partitionMetadata != null) {
+if (partitionMetadata.errorCode() != 0){
+logger.warn("PartitionMetadata errorCode: 
"+partitionMetadata.errorCode());
+}
 return partitionMetadata.leader();
 } else {
 return null;



[1/4] kylin git commit: KYLIN-1453 cuboid sharding based on specific column

2016-02-26 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 2e1d2f6b6 -> 294fc7078


KYLIN-1453 cuboid sharding based on specific column


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

Branch: refs/heads/2.x-staging
Commit: 294fc70785ab009e6b4d8a12cbeb609d46f89a93
Parents: 3f5074e
Author: honma 
Authored: Thu Feb 25 19:02:28 2016 +0800
Committer: honma 
Committed: Fri Feb 26 17:54:37 2016 +0800

--
 .../org/apache/kylin/common/util/BytesUtil.java |  18 +-
 .../dict/TupleFilterFunctionTransformer.java| 170 +++
 .../dict/TupleFilterFunctionTranslator.java | 166 --
 .../kylin/metadata/filter/CaseTupleFilter.java  |   7 +-
 .../metadata/filter/ColumnTupleFilter.java  |  11 +-
 .../metadata/filter/CompareTupleFilter.java |  10 +-
 .../metadata/filter/ConstantTupleFilter.java|  16 +-
 .../metadata/filter/DynamicTupleFilter.java |   9 +-
 .../metadata/filter/ExtractTupleFilter.java |   7 +-
 .../metadata/filter/FunctionTupleFilter.java|  16 +-
 .../filter/ITupleFilterTransformer.java |  23 +++
 .../metadata/filter/ITupleFilterTranslator.java |  26 ---
 .../metadata/filter/LogicalTupleFilter.java |  10 +-
 .../kylin/metadata/filter/TupleFilter.java  |   5 +-
 .../metadata/filter/TupleFilterSerializer.java  |  25 ++-
 .../common/coprocessor/FilterDecorator.java |   8 +-
 .../hbase/cube/v2/CubeSegmentScanner.java   |  10 +-
 .../common/coprocessor/FilterBaseTest.java  |  46 -
 .../common/coprocessor/FilterEvaluateTest.java  |   4 +-
 .../common/coprocessor/FilterSerializeTest.java |  26 ++-
 20 files changed, 325 insertions(+), 288 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/294fc707/core-common/src/main/java/org/apache/kylin/common/util/BytesUtil.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/util/BytesUtil.java 
b/core-common/src/main/java/org/apache/kylin/common/util/BytesUtil.java
index e01ce4f..4e0701c 100644
--- a/core-common/src/main/java/org/apache/kylin/common/util/BytesUtil.java
+++ b/core-common/src/main/java/org/apache/kylin/common/util/BytesUtil.java
@@ -57,7 +57,6 @@ public class BytesUtil {
 return integer;
 }
 
-
 public static long readLong(ByteBuffer buffer, int size) {
 long integer = 0;
 for (int i = 0; i < size; i++) {
@@ -133,11 +132,15 @@ public class BytesUtil {
 // from WritableUtils
 // 

 
+
 public static void writeVInt(int i, ByteBuffer out) {
+
 writeVLong(i, out);
+
 }
 
 public static void writeVLong(long i, ByteBuffer out) {
+
 if (i >= -112 && i <= 127) {
 out.put((byte) i);
 return;
@@ -203,6 +206,8 @@ public class BytesUtil {
 }
 
 public static void writeUnsigned(int num, int size, ByteBuffer out) {
+
+
 int mask = 0xff << ((size - 1) * 8);
 for (int i = size; i > 0; i--) {
 int v = (num & mask) >> (i - 1) * 8;
@@ -222,6 +227,7 @@ public class BytesUtil {
 }
 
 public static void writeLong(long num, ByteBuffer out) {
+
 for (int i = 0; i < 8; i++) {
 out.put((byte) num);
 num >>>= 8;
@@ -257,6 +263,8 @@ public class BytesUtil {
 }
 int len = str.length();
 BytesUtil.writeVInt(len, out);
+
+
 for (int i = 0; i < len; i++) {
 out.put((byte) str.charAt(i));
 }
@@ -335,7 +343,7 @@ public class BytesUtil {
 writeVInt(-1, out);
 return;
 }
-writeVInt(array.length, out);
+writeVInt(length, out);
 out.put(array, offset, length);
 }
 
@@ -348,7 +356,7 @@ public class BytesUtil {
 in.get(array);
 return array;
 }
-
+
 public static int peekByteArrayLength(ByteBuffer in) {
 int start = in.position();
 int arrayLen = readVInt(in);
@@ -369,6 +377,7 @@ public class BytesUtil {
 writeVInt(array.length, out);
 byte b_true = (byte) 1;
 byte b_false = (byte) 0;
+
 for (int i = 0; i < array.length; i++) {
 if (array[i])
 out.put(b_true);
@@ -428,7 +437,4 @@ public class BytesUtil {
 return sb.toString();
 }
 
-public static void main(String[] args) throws Exception {
-}
-
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/294fc707/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterFunctionTransformer.java

[2/4] kylin git commit: KYLIN-1366 simply metadata version binding

2016-02-26 Thread mahongbin
KYLIN-1366 simply metadata version binding

kylin 1366


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

Branch: refs/heads/2.x-staging
Commit: ab9d57914a119b5b426d2bfae712ca55ff35c92a
Parents: 4c08ded
Author: honma 
Authored: Wed Feb 24 15:58:07 2016 +0800
Committer: honma 
Committed: Fri Feb 26 17:54:37 2016 +0800

--
 .../org/apache/kylin/common/KylinConfigBase.java   |  8 
 .../java/org/apache/kylin/common/KylinVersion.java |  2 +-
 .../common/persistence/RootPersistentEntity.java   | 17 +
 .../java/org/apache/kylin/cube/CubeInstance.java   |  5 ++---
 .../java/org/apache/kylin/cube/model/CubeDesc.java |  2 +-
 .../java/org/apache/kylin/dict/DictionaryInfo.java |  4 ++--
 .../apache/kylin/dict/lookup/SnapshotManager.java  |  2 +-
 .../apache/kylin/metadata/model/DataModelDesc.java |  2 +-
 .../kylin/metadata/project/ProjectInstance.java|  2 +-
 .../kylin/metadata/project/ProjectManager.java |  2 +-
 .../kylin/storage/hybrid/HybridInstance.java   |  2 +-
 .../org/apache/kylin/invertedindex/IIInstance.java |  2 +-
 .../kylin/rest/controller/CubeController.java  |  4 ++--
 .../storage/hbase/util/ExtendCubeToHybridCLI.java  |  4 ++--
 14 files changed, 21 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/ab9d5791/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 5f9983a..7707684 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -61,14 +61,6 @@ public class KylinConfigBase implements Serializable {
 return kylinHome;
 }
 
-/**
- * @see KylinVersion
- * @return current kylin version
- */
-public static String getKylinVersion(){
-return KylinVersion.getCurrentVersion();
-}
-
 // 

 
 private volatile Properties properties = new Properties();

http://git-wip-us.apache.org/repos/asf/kylin/blob/ab9d5791/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
index d711b38..42cf237 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
@@ -21,7 +21,7 @@ package org.apache.kylin.common;
  *
  * @since 2.1
  */
-class KylinVersion {
+public class KylinVersion {
 /**
  * Require MANUAL updating kylin version per ANY upgrading.
  */

http://git-wip-us.apache.org/repos/asf/kylin/blob/ab9d5791/core-common/src/main/java/org/apache/kylin/common/persistence/RootPersistentEntity.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/persistence/RootPersistentEntity.java
 
b/core-common/src/main/java/org/apache/kylin/common/persistence/RootPersistentEntity.java
index 327ddcc..c46abe7 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/persistence/RootPersistentEntity.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/persistence/RootPersistentEntity.java
@@ -26,11 +26,11 @@ import java.util.Date;
 import java.util.UUID;
 
 import org.apache.commons.lang.time.FastDateFormat;
+import org.apache.kylin.common.KylinVersion;
 
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
 import com.fasterxml.jackson.annotation.JsonProperty;
-import org.apache.kylin.common.KylinConfig;
 
 /**
  * Marks the root entity of JSON persistence. Unit of read, write, cache, and
@@ -80,14 +80,14 @@ abstract public class RootPersistentEntity implements 
AclEntity, Serializable {
  * For example: 2.1
  */
 @JsonProperty("version")
-protected String version;
+protected String version = KylinVersion.getCurrentVersion();
 
 public String getVersion() {
-  return version;
+return version;
 }
 
 public void setVersion(String version) {
-  this.version = version;
+this.version = version;
 }
 
 public String getUuid() {
@@ -110,14 +110,7 

[3/4] kylin git commit: minor, fix CI occasionally fail issue

2016-02-26 Thread mahongbin
minor, fix CI occasionally fail issue


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

Branch: refs/heads/2.x-staging
Commit: 3f5074ee1568d5b0ba50d70d5c35319cd8223cc9
Parents: ab9d579
Author: honma 
Authored: Thu Feb 25 14:13:48 2016 +0800
Committer: honma 
Committed: Fri Feb 26 17:54:37 2016 +0800

--
 .../dict/TupleFilterDictionaryTranslater.java   | 165 --
 .../dict/TupleFilterFunctionTranslator.java | 166 +++
 .../metadata/filter/FunctionTupleFilter.java|   5 +-
 .../metadata/filter/function/BuiltInMethod.java |  33 ++--
 .../cache/AbstractCacheFledgedQuery.java|  32 +---
 .../kylin/storage/cache/DynamicCacheTest.java   |  15 +-
 .../kylin/storage/cache/StaticCacheTest.java|  19 ++-
 .../kylin/storage/hbase/ITStorageTest.java  |  11 +-
 .../common/coprocessor/FilterDecorator.java |   4 +-
 .../hbase/cube/v2/CubeSegmentScanner.java   |   4 +-
 10 files changed, 226 insertions(+), 228 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3f5074ee/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
 
b/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
deleted file mode 100644
index 9ef360d..000
--- 
a/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.kylin.dict;
-
-import com.google.common.primitives.Primitives;
-import org.apache.kylin.common.util.Dictionary;
-import org.apache.kylin.metadata.filter.ColumnTupleFilter;
-import org.apache.kylin.metadata.filter.CompareTupleFilter;
-import org.apache.kylin.metadata.filter.ConstantTupleFilter;
-import org.apache.kylin.metadata.filter.FunctionTupleFilter;
-import org.apache.kylin.metadata.filter.ITupleFilterTranslator;
-import org.apache.kylin.metadata.filter.LogicalTupleFilter;
-import org.apache.kylin.metadata.filter.TupleFilter;
-import org.apache.kylin.metadata.filter.TupleFilter.FilterOperatorEnum;
-import org.apache.kylin.metadata.model.TblColRef;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ListIterator;
-
-/**
- * Created by dongli on 1/7/16.
- */
-public class TupleFilterDictionaryTranslater implements ITupleFilterTranslator 
{
-public static final Logger logger = 
LoggerFactory.getLogger(TupleFilterDictionaryTranslater.class);
-
-private IDictionaryAware dictionaryAware;
-
-public TupleFilterDictionaryTranslater(IDictionaryAware dictionaryAware) {
-this.dictionaryAware = dictionaryAware;
-}
-
-@Override
-public TupleFilter translate(TupleFilter tupleFilter) {
-TupleFilter translated = null;
-if (tupleFilter instanceof CompareTupleFilter) {
-translated = translateCompareTupleFilter((CompareTupleFilter) 
tupleFilter);
-if (translated != null) {
-logger.info("Translated {" + tupleFilter + "} to IN clause: {" 
+ translated + "}");
-}
-} else if (tupleFilter instanceof FunctionTupleFilter) {
-translated = translateFunctionTupleFilter((FunctionTupleFilter) 
tupleFilter);
-if (translated != null) {
-logger.info("Translated {" + tupleFilter + "} to IN clause: {" 
+ translated + "}");
-}
-} else if (tupleFilter instanceof LogicalTupleFilter) {
-ListIterator childIterator = 
(ListIterator) tupleFilter.getChildren().listIterator();
-while (childIterator.hasNext()) {
-TupleFilter tempTranslated = 

kylin git commit: KYLIN-1297 correct LoadingCache settings

2016-01-20 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 2f5d89a8e -> eea691651


KYLIN-1297 correct LoadingCache settings


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

Branch: refs/heads/1.x-staging
Commit: eea6916518a59ce137ac6d26bd539e39bb871a6c
Parents: 2f5d89a
Author: honma 
Authored: Thu Jan 21 10:28:54 2016 +0800
Committer: honma 
Committed: Thu Jan 21 10:29:05 2016 +0800

--
 .../org/apache/kylin/common/KylinConfig.java|  5 
 .../apache/kylin/dict/DictionaryManager.java| 31 +++-
 .../storage/hbase/CubeSegmentTupleIterator.java |  1 -
 3 files changed, 22 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/eea69165/common/src/main/java/org/apache/kylin/common/KylinConfig.java
--
diff --git a/common/src/main/java/org/apache/kylin/common/KylinConfig.java 
b/common/src/main/java/org/apache/kylin/common/KylinConfig.java
index e0f774a..790e7a5 100644
--- a/common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -466,6 +466,11 @@ public class KylinConfig {
 return this.getOptional("kylin.server.mode", "all");
 }
 
+public int getCachedDictMaxEntrySize() {
+return Integer.parseInt(getOptional("kylin.dict.cache.max.entry", 
"3000"));
+}
+
+
 public int getDictionaryMaxCardinality() {
 return 
Integer.parseInt(getOptional("kylin.dictionary.max.cardinality", "500"));
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/eea69165/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
--
diff --git 
a/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java 
b/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
index aa0bc5d..9294e03 100644
--- a/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
+++ b/dictionary/src/main/java/org/apache/kylin/dict/DictionaryManager.java
@@ -28,9 +28,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
 import org.apache.commons.compress.utils.IOUtils;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
@@ -49,6 +46,10 @@ import org.apache.kylin.metadata.model.TblColRef;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+
 public class DictionaryManager {
 
 private static final Logger logger = 
LoggerFactory.getLogger(DictionaryManager.class);
@@ -84,17 +85,19 @@ public class DictionaryManager {
 
 private DictionaryManager(KylinConfig config) {
 this.config = config;
-this.dictCache = 
CacheBuilder.newBuilder().weakValues().expireAfterWrite(10, 
TimeUnit.MINUTES).build(new CacheLoader() {
-@Override
-public DictionaryInfo load(String key) throws Exception {
-DictionaryInfo dictInfo = DictionaryManager.this.load(key, 
true);
-if (dictInfo == null) {
-return NONE_INDICATOR;
-} else {
-return dictInfo;
-}
-}
-});
+this.dictCache = 
CacheBuilder.newBuilder().maximumSize(KylinConfig.getInstanceFromEnv().getCachedDictMaxEntrySize())//
+.expireAfterWrite(1, TimeUnit.DAYS).build(new 
CacheLoader() {
+
+@Override
+public DictionaryInfo load(String key) throws Exception {
+DictionaryInfo dictInfo = 
DictionaryManager.this.load(key, true);
+if (dictInfo == null) {
+return NONE_INDICATOR;
+} else {
+return dictInfo;
+}
+}
+});
 }
 
 public Dictionary getDictionary(String resourcePath) throws IOException 
{

http://git-wip-us.apache.org/repos/asf/kylin/blob/eea69165/storage/src/main/java/org/apache/kylin/storage/hbase/CubeSegmentTupleIterator.java
--
diff --git 

kylin git commit: KYLIN-1356 use exec-maven-plugin for IT environment provision

2016-01-21 Thread mahongbin
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 6485324a2 -> ab853f9dc


KYLIN-1356 use exec-maven-plugin for IT environment provision


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

Branch: refs/heads/2.0-rc
Commit: ab853f9dc987549ac27dd2bb3db1732e3e474281
Parents: 6485324
Author: honma 
Authored: Thu Jan 21 18:20:10 2016 +0800
Committer: honma 
Committed: Thu Jan 21 18:20:19 2016 +0800

--
 .../engine/spark/BuildCubeWithSparkTest.java|   3 +
 .../apache/kylin/job/BuildCubeWithEngine.java   | 333 +++
 .../kylin/job/BuildCubeWithEngineTest.java  | 333 ---
 .../apache/kylin/job/BuildCubeWithStream.java   | 110 ++
 .../kylin/job/BuildCubeWithStreamTest.java  | 114 ---
 .../apache/kylin/job/BuildIIWithEngineTest.java |   7 +-
 .../org/apache/kylin/job/BuildIIWithStream.java | 292 
 .../apache/kylin/job/BuildIIWithStreamTest.java | 290 
 dev-support/test_all_against_hdp_2_2_4_2_2.sh   |   3 -
 pom.xml |  73 ++--
 10 files changed, 789 insertions(+), 769 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/ab853f9d/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
--
diff --git 
a/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
 
b/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
index f5b9741..f87fa99 100644
--- 
a/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
+++ 
b/assembly/src/test/java/org/apache/kylin/engine/spark/BuildCubeWithSparkTest.java
@@ -46,10 +46,13 @@ import 
org.apache.kylin.storage.hbase.steps.HBaseMetadataTestCase;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import com.google.common.collect.Lists;
 
+//TODO: convert it to a normal class rather than a test case, like in 
BuildCubeWithEngine 
+@Ignore
 public class BuildCubeWithSparkTest {
 
 private CubeManager cubeManager;

http://git-wip-us.apache.org/repos/asf/kylin/blob/ab853f9d/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngine.java
--
diff --git 
a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngine.java 
b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngine.java
new file mode 100644
index 000..2562a8b
--- /dev/null
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngine.java
@@ -0,0 +1,333 @@
+/*
+ * 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.
+*/
+
+package org.apache.kylin.job;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.TimeZone;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.util.ToolRunner;
+import org.apache.kylin.common.KylinConfig;
+import org.apache.kylin.common.util.AbstractKylinTestCase;
+import org.apache.kylin.common.util.ClassUtil;
+import org.apache.kylin.cube.CubeInstance;
+import org.apache.kylin.cube.CubeManager;
+import org.apache.kylin.cube.CubeSegment;
+import org.apache.kylin.cube.CubeUpdate;
+import org.apache.kylin.engine.EngineFactory;
+import org.apache.kylin.engine.mr.CubingJob;
+import org.apache.kylin.job.engine.JobEngineConfig;
+import org.apache.kylin.job.execution.AbstractExecutable;
+import 

[05/13] kylin git commit: KYLIN-1356 move all it to a seprate module

2016-01-21 Thread mahongbin
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f08dab5/query/src/test/resources/query/sql/query12.sql
--
diff --git a/query/src/test/resources/query/sql/query12.sql 
b/query/src/test/resources/query/sql/query12.sql
deleted file mode 100644
index 012ecfc..000
--- a/query/src/test/resources/query/sql/query12.sql
+++ /dev/null
@@ -1,29 +0,0 @@
---
--- 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_kylin_fact.lstg_format_name, 
test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV 
- , count(*) as TRANS_CNT 
- 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
- inner JOIN test_category_groupings
- ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
- inner JOIN edw.test_sites as test_sites
- ON test_kylin_fact.lstg_site_id = test_sites.site_id
- where test_cal_dt.week_beg_dt >= DATE '2013-02-10' 
- group by test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt 

http://git-wip-us.apache.org/repos/asf/kylin/blob/7f08dab5/query/src/test/resources/query/sql/query13.sql
--
diff --git a/query/src/test/resources/query/sql/query13.sql 
b/query/src/test/resources/query/sql/query13.sql
deleted file mode 100644
index 7d1c481..000
--- a/query/src/test/resources/query/sql/query13.sql
+++ /dev/null
@@ -1,28 +0,0 @@
---
--- 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 sum(test_kylin_fact.price) as GMV 
- , count(*) as TRANS_CNT 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
- inner JOIN test_category_groupings
- ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND 
test_kylin_fact.lstg_site_id = test_category_groupings.site_id
- inner JOIN edw.test_sites as test_sites
- ON test_kylin_fact.lstg_site_id = test_sites.site_id
- where test_kylin_fact.lstg_format_name='FP-GTC' 
- and test_cal_dt.week_beg_dt between DATE '2013-05-01' and DATE '2013-08-01' 

http://git-wip-us.apache.org/repos/asf/kylin/blob/7f08dab5/query/src/test/resources/query/sql/query14.sql
--
diff --git a/query/src/test/resources/query/sql/query14.sql 
b/query/src/test/resources/query/sql/query14.sql
deleted file mode 100644
index 9cca8f5..000
--- a/query/src/test/resources/query/sql/query14.sql
+++ /dev/null
@@ -1,36 +0,0 @@
---
--- 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 
- 

  1   2   3   4   5   6   7   8   9   >