kylin git commit: fix daemon thread

2016-12-28 Thread billyliu
Repository: kylin
Updated Branches:
  refs/heads/KYILN-2317 172b4279f -> 5b13287d8


fix daemon thread


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

Branch: refs/heads/KYILN-2317
Commit: 5b13287d8b112a42d749cfd35b6312a3df32bf6b
Parents: 172b427
Author: Billy Liu 
Authored: Thu Dec 29 14:23:51 2016 +0800
Committer: Billy Liu 
Committed: Thu Dec 29 14:23:51 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/5b13287d/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
index 70d3ea9..d00c490 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java
@@ -115,7 +115,7 @@ public class Broadcaster {
 for (String node : config.getRestServers()) {
 restClients.add(new RestClient(node));
 }
-final ExecutorService wipingCachePool = 
Executors.newFixedThreadPool(restClients.size());
+final ExecutorService wipingCachePool = 
Executors.newFixedThreadPool(restClients.size(), new DaemonThreadFactory());
 while (true) {
 try {
 final BroadcastEvent broadcastEvent = 
broadcastEvents.takeFirst();
@@ -228,7 +228,7 @@ public class Broadcaster {
 
 try {
 counter.incrementAndGet();
-broadcastEvents.putFirst(new BroadcastEvent(entity, event, key));
+broadcastEvents.putLast(new BroadcastEvent(entity, event, key));
 } catch (Exception e) {
 counter.decrementAndGet();
 logger.error("error putting BroadcastEvent", e);



kylin git commit: enhance LookupTable

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/yang22-391 fc9ce92b0 -> 3e725f50d


enhance LookupTable


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

Branch: refs/heads/yang22-391
Commit: 3e725f50d1a63fed7f8d253e68b7fc7b1064b76e
Parents: fc9ce92
Author: Li Yang 
Authored: Thu Dec 29 13:44:40 2016 +0800
Committer: Li Yang 
Committed: Thu Dec 29 13:44:40 2016 +0800

--
 .../src/main/java/org/apache/kylin/dict/lookup/LookupTable.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3e725f50/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupTable.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupTable.java 
b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupTable.java
index cd700e9..21221f4 100644
--- 
a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupTable.java
+++ 
b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupTable.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -46,7 +47,7 @@ abstract public class LookupTable {
 protected TableDesc tableDesc;
 protected String[] keyColumns;
 protected ReadableTable table;
-protected ConcurrentHashMap data;
+protected Map data;
 
 public LookupTable(TableDesc tableDesc, String[] keyColumns, ReadableTable 
table) throws IOException {
 this.tableDesc = tableDesc;



[kylin] Git Push Summary

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/yang22-391 [created] fc9ce92b0


kylin git commit: KYLIN-2332 Refactor TupleConverter a bit

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/master 687d5fd15 -> 13c34079d


KYLIN-2332 Refactor TupleConverter a bit


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

Branch: refs/heads/master
Commit: 13c34079daa0e102b817d15ccfe2d70b8b364c34
Parents: 687d5fd
Author: Li Yang 
Authored: Thu Dec 29 12:18:45 2016 +0800
Committer: Li Yang 
Committed: Thu Dec 29 13:38:19 2016 +0800

--
 .../org/apache/kylin/storage/IStorageQuery.java |  3 -
 .../apache/kylin/storage/StorageContext.java| 10 
 .../storage/gtrecord/CubeSegmentScanner.java|  3 +-
 .../storage/gtrecord/CubeTupleConverter.java| 60 +---
 .../gtrecord/GTCubeStorageQueryBase.java|  7 ++-
 .../kylin/storage/gtrecord/ITupleConverter.java | 30 ++
 .../gtrecord/SegmentCubeTupleIterator.java  |  8 +--
 .../gtrecord/SequentialCubeTupleIterator.java   | 55 +-
 .../storage/hbase/cube/v2/CubeStorageQuery.java |  1 +
 9 files changed, 108 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/13c34079/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
--
diff --git 
a/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java 
b/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
index 6b53b5b..5455cc3 100644
--- a/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
+++ b/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
@@ -23,9 +23,6 @@ import org.apache.kylin.metadata.tuple.ITupleIterator;
 import org.apache.kylin.metadata.tuple.TupleInfo;
 
 /**
- * 
- * @author xjiang
- * 
  */
 public interface IStorageQuery {
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/13c34079/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
--
diff --git 
a/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java 
b/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
index 9ef59fd..ec46f83 100644
--- a/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
+++ b/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
@@ -47,6 +47,7 @@ public class StorageContext {
 private boolean limitEnabled = false;
 private boolean enableCoprocessor = false;
 
+private IStorageQuery storageQuery;
 private AtomicLong totalScanCount = new AtomicLong();
 private Cuboid cuboid;
 private boolean partialResultReturned = false;
@@ -193,4 +194,13 @@ public class StorageContext {
 public void setReusedPeriod(Range reusedPeriod) {
 this.reusedPeriod = reusedPeriod;
 }
+
+public IStorageQuery getStorageQuery() {
+return storageQuery;
+}
+
+public void setStorageQuery(IStorageQuery storageQuery) {
+this.storageQuery = storageQuery;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/13c34079/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
index c6a6daa..9d6f946 100644
--- 
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
@@ -52,7 +52,7 @@ public class CubeSegmentScanner implements IGTScanner {
 final GTScanRequest scanRequest;
 
 public CubeSegmentScanner(CubeSegment cubeSeg, Cuboid cuboid, 
Set dimensions, Set groups, //
-Collection metrics, TupleFilter originalfilter, 
StorageContext context, String gtStorage) {
+Collection metrics, TupleFilter originalfilter, 
StorageContext context) {
 
 logger.info("Init CubeSegmentScanner for segment {}", 
cubeSeg.getName());
 
@@ -78,6 +78,7 @@ public class CubeSegmentScanner implements IGTScanner {
 throw new RuntimeException(e);
 }
 scanRequest = scanRangePlanner.planScanRequest();
+String gtStorage = ((GTCubeStorageQueryBase) 
context.getStorageQuery()).getGTStorage();
 scanner = new ScannerWorker(cubeSeg, cuboid, scanRequest, gtStorage);
 }
 


[kylin] Git Push Summary

2016-12-28 Thread shaofengshi
Repository: kylin
Updated Branches:
  refs/heads/sparkcubing [deleted] 2e0665c9d


kylin git commit: KYLIN-2333 Kylin doesn't need 0-D cuboid, can remove that step

2016-12-28 Thread shaofengshi
Repository: kylin
Updated Branches:
  refs/heads/master 1a190ecfc -> 687d5fd15


KYLIN-2333 Kylin doesn't need 0-D cuboid, can remove that step


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

Branch: refs/heads/master
Commit: 687d5fd150b6019e71db0f600307bbd4f7c749f9
Parents: 1a190ec
Author: shaofengshi 
Authored: Thu Dec 29 13:23:14 2016 +0800
Committer: shaofengshi 
Committed: Thu Dec 29 13:23:14 2016 +0800

--
 .../java/org/apache/kylin/engine/mr/BatchCubingJobBuilder2.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/687d5fd1/engine-mr/src/main/java/org/apache/kylin/engine/mr/BatchCubingJobBuilder2.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/BatchCubingJobBuilder2.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/BatchCubingJobBuilder2.java
index 6eba3c2..966bb1b 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/BatchCubingJobBuilder2.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/BatchCubingJobBuilder2.java
@@ -84,7 +84,7 @@ public class BatchCubingJobBuilder2 extends JobBuilderSupport 
{
 // base cuboid step
 result.addTask(createBaseCuboidStep(cuboidOutputTempPath, jobId));
 // n dim cuboid steps
-for (int i = 1; i <= groupRowkeyColumnsCount; i++) {
+for (int i = 1; i < groupRowkeyColumnsCount; i++) {
 int dimNum = totalRowkeyColumnsCount - i;
 result.addTask(createNDimensionCuboidStep(cuboidOutputTempPath, 
dimNum, totalRowkeyColumnsCount, jobId));
 }



kylin git commit: KYLIN-2332 Refactor TupleConverter a bit

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/yang22 4d35edd7b -> fc9ce92b0


KYLIN-2332 Refactor TupleConverter a bit


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

Branch: refs/heads/yang22
Commit: fc9ce92b0a5ad128a8f8fa4915457ae9ebc75d97
Parents: 4d35edd
Author: Li Yang 
Authored: Thu Dec 29 12:18:45 2016 +0800
Committer: Li Yang 
Committed: Thu Dec 29 12:18:45 2016 +0800

--
 .../org/apache/kylin/storage/IStorageQuery.java |  3 -
 .../apache/kylin/storage/StorageContext.java| 10 
 .../storage/gtrecord/CubeSegmentScanner.java|  3 +-
 .../storage/gtrecord/CubeTupleConverter.java| 60 +---
 .../gtrecord/GTCubeStorageQueryBase.java|  7 ++-
 .../kylin/storage/gtrecord/ITupleConverter.java | 30 ++
 .../gtrecord/SegmentCubeTupleIterator.java  |  8 +--
 .../gtrecord/SequentialCubeTupleIterator.java   | 55 +-
 .../storage/hbase/cube/v2/CubeStorageQuery.java |  1 +
 9 files changed, 108 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fc9ce92b/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
--
diff --git 
a/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java 
b/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
index 6b53b5b..5455cc3 100644
--- a/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
+++ b/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.java
@@ -23,9 +23,6 @@ import org.apache.kylin.metadata.tuple.ITupleIterator;
 import org.apache.kylin.metadata.tuple.TupleInfo;
 
 /**
- * 
- * @author xjiang
- * 
  */
 public interface IStorageQuery {
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/fc9ce92b/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
--
diff --git 
a/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java 
b/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
index 9ef59fd..ec46f83 100644
--- a/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
+++ b/core-storage/src/main/java/org/apache/kylin/storage/StorageContext.java
@@ -47,6 +47,7 @@ public class StorageContext {
 private boolean limitEnabled = false;
 private boolean enableCoprocessor = false;
 
+private IStorageQuery storageQuery;
 private AtomicLong totalScanCount = new AtomicLong();
 private Cuboid cuboid;
 private boolean partialResultReturned = false;
@@ -193,4 +194,13 @@ public class StorageContext {
 public void setReusedPeriod(Range reusedPeriod) {
 this.reusedPeriod = reusedPeriod;
 }
+
+public IStorageQuery getStorageQuery() {
+return storageQuery;
+}
+
+public void setStorageQuery(IStorageQuery storageQuery) {
+this.storageQuery = storageQuery;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/fc9ce92b/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
index c6a6daa..9d6f946 100644
--- 
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
@@ -52,7 +52,7 @@ public class CubeSegmentScanner implements IGTScanner {
 final GTScanRequest scanRequest;
 
 public CubeSegmentScanner(CubeSegment cubeSeg, Cuboid cuboid, 
Set dimensions, Set groups, //
-Collection metrics, TupleFilter originalfilter, 
StorageContext context, String gtStorage) {
+Collection metrics, TupleFilter originalfilter, 
StorageContext context) {
 
 logger.info("Init CubeSegmentScanner for segment {}", 
cubeSeg.getName());
 
@@ -78,6 +78,7 @@ public class CubeSegmentScanner implements IGTScanner {
 throw new RuntimeException(e);
 }
 scanRequest = scanRangePlanner.planScanRequest();
+String gtStorage = ((GTCubeStorageQueryBase) 
context.getStorageQuery()).getGTStorage();
 scanner = new ScannerWorker(cubeSeg, cuboid, scanRequest, gtStorage);
 }
 


[2/3] kylin git commit: KYLIN-2331 by layer spark cubing N-2331# modified: core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java

2016-12-28 Thread shaofengshi
http://git-wip-us.apache.org/repos/asf/kylin/blob/61bf8a12/core-metadata/src/main/java/org/apache/kylin/measure/MeasureAggregators.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureAggregators.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureAggregators.java
index 2b28302..78d4f7b 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureAggregators.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureAggregators.java
@@ -87,6 +87,24 @@ public class MeasureAggregators implements Serializable {
 }
 }
 
+public void aggregate(Object[] values1, Object[] values2, Object[] result) 
{
+assert values1.length == values2.length && values2.length == 
descLength && values1.length == result.length;
+
+for (int i = 0; i < descLength; i++) {
+result[i] = aggs[i].aggregate(values1[i], values2[i]);
+}
+
+}
+
+public void aggregate(Object[] values1, Object[] values2, Object[] result, 
boolean[] aggrMask) {
+assert values1.length == values2.length && values2.length == 
descLength && values1.length == result.length && result.length == 
aggrMask.length;
+for (int i = 0; i < descLength; i++) {
+if (aggrMask[i]) {
+result[i] = aggs[i].aggregate(values1[i], values2[i]);
+}
+}
+}
+
 public void collectStates(Object[] states) {
 for (int i = 0; i < descLength; i++) {
 states[i] = aggs[i].getState();

http://git-wip-us.apache.org/repos/asf/kylin/blob/61bf8a12/core-metadata/src/main/java/org/apache/kylin/measure/MeasureCodec.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureCodec.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureCodec.java
index edaf806..2d73e59 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureCodec.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureCodec.java
@@ -18,19 +18,19 @@
 
 package org.apache.kylin.measure;
 
-import java.nio.ByteBuffer;
-import java.util.Collection;
-
 import org.apache.kylin.metadata.datatype.DataType;
 import org.apache.kylin.metadata.datatype.DataTypeSerializer;
 import org.apache.kylin.metadata.model.MeasureDesc;
 
+import java.nio.ByteBuffer;
+import java.util.Collection;
+
 /**
  * @author yangli9
  * 
  */
 @SuppressWarnings({ "rawtypes" })
-public class MeasureCodec {
+public class MeasureCodec implements java.io.Serializable {
 
 private int nMeasures;
 private DataTypeSerializer[] serializers;

http://git-wip-us.apache.org/repos/asf/kylin/blob/61bf8a12/core-metadata/src/main/java/org/apache/kylin/measure/MeasureIngester.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureIngester.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureIngester.java
index 0076252..26b7298 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureIngester.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureIngester.java
@@ -18,14 +18,14 @@
 
 package org.apache.kylin.measure;
 
-import java.util.Collection;
-import java.util.Map;
-
 import org.apache.kylin.common.util.Dictionary;
 import org.apache.kylin.metadata.model.MeasureDesc;
 import org.apache.kylin.metadata.model.TblColRef;
 
-abstract public class MeasureIngester {
+import java.util.Collection;
+import java.util.Map;
+
+abstract public class MeasureIngester implements java.io.Serializable {
 
 public static MeasureIngester create(MeasureDesc measure) {
 return measure.getFunction().getMeasureType().newIngester();
@@ -42,6 +42,10 @@ abstract public class MeasureIngester {
 
 abstract public V valueOf(String[] values, MeasureDesc measureDesc, 
Map dictionaryMap);
 
+public void reset() {
+
+}
+
 public V reEncodeDictionary(V value, MeasureDesc measureDesc, 
Map oldDicts, Map 
newDicts) {
 throw new UnsupportedOperationException();
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/61bf8a12/core-metadata/src/main/java/org/apache/kylin/measure/MeasureType.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureType.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureType.java
index 89ff382..3338c8c 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureType.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureType.java
@@ -18,11 +18,6 @@
 
 package org.apache.kylin.measure;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;

[1/3] kylin git commit: KYLIN-2331 by layer spark cubing N-2331# modified: core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java [Forced Update!]

2016-12-28 Thread shaofengshi
Repository: kylin
Updated Branches:
  refs/heads/sparkcubing-rebase 55ba39afb -> 61bf8a12c (forced update)


http://git-wip-us.apache.org/repos/asf/kylin/blob/61bf8a12/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/BaseCuboidBuilder.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/BaseCuboidBuilder.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/BaseCuboidBuilder.java
new file mode 100644
index 000..07b636b
--- /dev/null
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/BaseCuboidBuilder.java
@@ -0,0 +1,173 @@
+/*
+ * 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.engine.mr.common;
+
+import com.google.common.collect.Sets;
+import org.apache.kylin.common.KylinConfig;
+import org.apache.kylin.common.util.Dictionary;
+import org.apache.kylin.cube.CubeSegment;
+import org.apache.kylin.cube.cuboid.Cuboid;
+import org.apache.kylin.cube.kv.AbstractRowKeyEncoder;
+import org.apache.kylin.cube.model.CubeDesc;
+import org.apache.kylin.cube.model.CubeJoinedFlatTableEnrich;
+import org.apache.kylin.measure.BufferedMeasureCodec;
+import org.apache.kylin.measure.MeasureIngester;
+import org.apache.kylin.metadata.model.FunctionDesc;
+import org.apache.kylin.metadata.model.MeasureDesc;
+import org.apache.kylin.metadata.model.ParameterDesc;
+import org.apache.kylin.metadata.model.TblColRef;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ */
+public class BaseCuboidBuilder implements java.io.Serializable {
+
+protected static final Logger logger = 
LoggerFactory.getLogger(BaseCuboidBuilder.class);
+public static final String HIVE_NULL = "\\N";
+protected String cubeName;
+protected Cuboid baseCuboid;
+protected CubeDesc cubeDesc;
+protected CubeSegment cubeSegment;
+protected Set nullStrs;
+protected CubeJoinedFlatTableEnrich intermediateTableDesc;
+protected MeasureIngester[] aggrIngesters;
+protected Map dictionaryMap;
+protected AbstractRowKeyEncoder rowKeyEncoder;
+protected BufferedMeasureCodec measureCodec;
+
+protected KylinConfig kylinConfig;
+
+public BaseCuboidBuilder(KylinConfig kylinConfig, CubeDesc cubeDesc, 
CubeSegment cubeSegment, CubeJoinedFlatTableEnrich intermediateTableDesc,
+ AbstractRowKeyEncoder rowKeyEncoder, 
MeasureIngester[] aggrIngesters, Map 
dictionaryMap) {
+this.kylinConfig = kylinConfig;
+this.cubeDesc = cubeDesc;
+this.cubeSegment = cubeSegment;
+this.intermediateTableDesc = intermediateTableDesc;
+this.rowKeyEncoder = rowKeyEncoder;
+this.aggrIngesters = aggrIngesters;
+this.dictionaryMap = dictionaryMap;
+
+init();
+measureCodec = new BufferedMeasureCodec(cubeDesc.getMeasures());
+}
+
+public BaseCuboidBuilder(KylinConfig kylinConfig, CubeDesc cubeDesc, 
CubeSegment cubeSegment, CubeJoinedFlatTableEnrich intermediateTableDesc) {
+this.kylinConfig = kylinConfig;
+this.cubeDesc = cubeDesc;
+this.cubeSegment = cubeSegment;
+this.intermediateTableDesc = intermediateTableDesc;
+
+init();
+rowKeyEncoder = AbstractRowKeyEncoder.createInstance(cubeSegment, 
baseCuboid);
+measureCodec = new BufferedMeasureCodec(cubeDesc.getMeasures());
+aggrIngesters = MeasureIngester.create(cubeDesc.getMeasures());
+dictionaryMap = cubeSegment.buildDictionaryMap();
+
+}
+
+private void init() {
+long baseCuboidId = Cuboid.getBaseCuboidId(cubeDesc);
+baseCuboid = Cuboid.findById(cubeDesc, baseCuboidId);
+initNullBytes();
+}
+
+private void initNullBytes() {
+nullStrs = Sets.newHashSet();
+nullStrs.add(HIVE_NULL);
+String[] nullStrings = cubeDesc.getNullStrings();
+if (nullStrings != null) {
+for (String s : nullStrings) {
+nullStrs.add(s);
+}
+}
+}
+
+protected 

[3/3] kylin git commit: KYLIN-2331 by layer spark cubing N-2331# modified: core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java

2016-12-28 Thread shaofengshi
KYLIN-2331 by layer spark cubing
N-2331# modified:   
core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java


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

Branch: refs/heads/sparkcubing-rebase
Commit: 61bf8a12c2daf359bb312607c2a941fb28e3c896
Parents: 73fbbb9
Author: shaofengshi 
Authored: Sun Dec 25 15:59:16 2016 +0800
Committer: shaofengshi 
Committed: Thu Dec 29 11:58:53 2016 +0800

--
 assembly/pom.xml|   5 +-
 .../main/config/assemblies/source-assembly.xml  |   3 -
 .../java/org/apache/kylin/job/DeployUtil.java   |   1 -
 build/conf/kylin-spark-conf.properties  |  26 ++
 build/conf/kylin.properties |  20 +
 .../apache/kylin/common/KylinConfigBase.java|  64 ++-
 .../kylin/common/persistence/ResourceStore.java |  35 ++
 .../org/apache/kylin/common/util/Array.java |   2 +-
 .../apache/kylin/common/util/SplittedBytes.java |   2 +-
 .../java/org/apache/kylin/cube/CubeSegment.java |   2 +-
 .../kylin/cube/common/RowKeySplitter.java   |  15 +-
 .../org/apache/kylin/cube/cuboid/Cuboid.java|  27 +-
 .../kylin/cube/cuboid/CuboidScheduler.java  |  15 +-
 .../cube/inmemcubing/InMemCubeBuilder.java  |   2 +
 .../kylin/cube/kv/AbstractRowKeyEncoder.java|   6 +-
 .../org/apache/kylin/cube/kv/CubeDimEncMap.java |   7 +-
 .../apache/kylin/cube/kv/RowKeyColumnIO.java|   2 +-
 .../org/apache/kylin/cube/kv/RowKeyEncoder.java |  19 +-
 .../kylin/cube/kv/RowKeyEncoderProvider.java|   2 +-
 .../kylin/cube/model/AggregationGroup.java  |   4 +-
 .../org/apache/kylin/cube/model/CubeDesc.java   |   2 +-
 .../cube/model/CubeJoinedFlatTableDesc.java |   2 +-
 .../cube/model/CubeJoinedFlatTableEnrich.java   |   6 +-
 .../apache/kylin/cube/model/DictionaryDesc.java |   2 +-
 .../apache/kylin/cube/model/DimensionDesc.java  |  13 +-
 .../kylin/cube/model/HBaseColumnDesc.java   |  11 +-
 .../kylin/cube/model/HBaseColumnFamilyDesc.java |   9 +-
 .../kylin/cube/model/HBaseMappingDesc.java  |  15 +-
 .../apache/kylin/cube/model/HierarchyDesc.java  |   2 +-
 .../apache/kylin/cube/model/RowKeyColDesc.java  |   2 +-
 .../org/apache/kylin/cube/model/RowKeyDesc.java |  17 +-
 .../org/apache/kylin/cube/model/SelectRule.java |   2 +-
 .../apache/kylin/gridtable/UnitTestSupport.java |  41 +-
 .../gridtable/AggregationCacheMemSizeTest.java  |   6 +-
 .../gridtable/AggregationCacheSpillTest.java|   5 +-
 .../kylin/gridtable/SimpleGridTableTest.java|  11 +-
 .../gridtable/SimpleInvertedIndexTest.java  |   2 +-
 .../metadata/measure/MeasureCodecTest.java  |   6 +-
 .../apache/kylin/dict/AppendTrieDictionary.java |   6 +-
 .../org/apache/kylin/dict/NumberDictionary.java |   2 +-
 .../apache/kylin/dict/NumberDictionary2.java|   2 +-
 .../dict/NumberDictionaryForestBuilder.java |   4 +-
 .../apache/kylin/dict/StringBytesConverter.java |   2 +-
 .../kylin/job/execution/ExecutableManager.java  |  21 +-
 .../kylin/dimension/AbstractDateDimEnc.java |  12 +-
 .../apache/kylin/dimension/BooleanDimEnc.java   |   4 +-
 .../kylin/dimension/DictionaryDimEnc.java   |  21 +-
 .../apache/kylin/dimension/FixedLenDimEnc.java  |   4 +-
 .../kylin/dimension/FixedLenHexDimEnc.java  |   4 +-
 .../org/apache/kylin/dimension/IntDimEnc.java   |   4 +-
 .../apache/kylin/dimension/IntegerDimEnc.java   |   4 +-
 .../kylin/dimension/OneMoreByteVLongDimEnc.java |  14 +-
 .../kylin/measure/BufferedMeasureCodec.java |  10 +-
 .../apache/kylin/measure/MeasureAggregator.java |   2 +
 .../kylin/measure/MeasureAggregators.java   |  18 +
 .../org/apache/kylin/measure/MeasureCodec.java  |   8 +-
 .../apache/kylin/measure/MeasureIngester.java   |  12 +-
 .../org/apache/kylin/measure/MeasureType.java   |  12 +-
 .../measure/basic/BigDecimalMaxAggregator.java  |  14 +
 .../measure/basic/BigDecimalMinAggregator.java  |  28 +-
 .../measure/basic/BigDecimalSumAggregator.java  |  18 +-
 .../kylin/measure/basic/DoubleIngester.java |  19 +-
 .../measure/basic/DoubleMaxAggregator.java  |  20 +-
 .../measure/basic/DoubleMinAggregator.java  |  20 +-
 .../measure/basic/DoubleSumAggregator.java  |  22 +-
 .../kylin/measure/basic/LongIngester.java   |  19 +-
 .../kylin/measure/basic/LongMaxAggregator.java  |  20 +-
 .../kylin/measure/basic/LongMinAggregator.java  |  20 +-
 .../kylin/measure/basic/LongSumAggregator.java  |  22 +-
 .../kylin/measure/bitmap/BitmapAggregator.java  |  13 +
 .../kylin/measure/bitmap/BitmapCounter.java |   8 +-
 .../kylin/measure/bitmap/BitmapMeasureType.java |   5 +
 .../kylin/measure/bitmap/BitmapSerializer.java  |   2 +-
 

[5/8] kylin git commit: KYLIN-2330 fix CubeDesc returning redundant DeriveInfo

2016-12-28 Thread liyang
KYLIN-2330 fix CubeDesc returning redundant DeriveInfo


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

Branch: refs/heads/yang22-hbase102
Commit: 4d35edd7b47af65e706465a7fe7c9f7ddd83fd9d
Parents: 17e323e
Author: Yang Li 
Authored: Thu Dec 29 07:13:12 2016 +0800
Committer: Yang Li 
Committed: Thu Dec 29 07:13:24 2016 +0800

--
 .../org/apache/kylin/cube/model/CubeDesc.java   | 46 +
 .../org/apache/kylin/cube/CubeDescTest.java | 53 ++--
 .../test_case_data/localmeta/cube_desc/ssb.json | 12 -
 3 files changed, 95 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/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 853571c..219435e 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
@@ -789,25 +789,49 @@ public class CubeDesc extends RootPersistentEntity 
implements IEngineAware {
 for (int i = 0; i < derivedCols.length; i++) {
 if (ArrayUtils.contains(hostCols, derivedCols[i])) {
 derivedCols = (TblColRef[]) ArrayUtils.remove(derivedCols, i);
-extra = (String[]) ArrayUtils.remove(extra, i);
+if (extra != null)
+extra = (String[]) ArrayUtils.remove(extra, i);
 i--;
 }
 }
+
+if (derivedCols.length == 0)
+return;
 
-Map toHostMap = derivedToHostMap;
-Map hostToMap = hostToDerivedMap;
+for (int i = 0; i < derivedCols.length; i++) {
+TblColRef derivedCol = derivedCols[i];
+boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
+derivedToHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+}
 
 Array hostColArray = new Array(hostCols);
-List infoList = hostToMap.get(hostColArray);
+List infoList = hostToDerivedMap.get(hostColArray);
 if (infoList == null) {
-hostToMap.put(hostColArray, infoList = new 
ArrayList());
+hostToDerivedMap.put(hostColArray, infoList = new 
ArrayList());
 }
-infoList.add(new DeriveInfo(type, dimension, derivedCols, false));
-
-for (int i = 0; i < derivedCols.length; i++) {
-TblColRef derivedCol = derivedCols[i];
-boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
-toHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+
+// Merged duplicated derived column
+List whatsLeft = new ArrayList<>();
+for (TblColRef derCol : derivedCols) {
+boolean merged = false;
+for (DeriveInfo existing : infoList) {
+if (existing.type == type && 
existing.dimension.getTableRef().equals(dimension.getTableRef())) {
+if (ArrayUtils.contains(existing.columns, derCol)) {
+merged = true;
+break;
+}
+if (type == DeriveType.LOOKUP) {
+existing.columns = (TblColRef[]) 
ArrayUtils.add(existing.columns, derCol);
+merged = true;
+break;
+}
+}
+}
+if (!merged)
+whatsLeft.add(derCol);
+}
+if (whatsLeft.size() > 0) {
+infoList.add(new DeriveInfo(type, dimension, (TblColRef[]) 
whatsLeft.toArray(new TblColRef[whatsLeft.size()]), false));
 }
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
--
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java 
b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
index 27c154b..c192da0 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
@@ -18,19 +18,29 @@
 
 package 

[4/8] kylin git commit: minor, fix wrong header

2016-12-28 Thread liyang
minor, fix wrong header


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

Branch: refs/heads/yang22-hbase102
Commit: 17e323eed9b6b2ef91b1badf230239280ff6d46d
Parents: 6762fae
Author: lidongsjtu 
Authored: Wed Dec 28 22:25:44 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:25:52 2016 +0800

--
 .../apache/kylin/tool/KylinConfigCLITest.java   | 34 
 1 file changed, 14 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/17e323ee/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
index 5c56b5f..7d1e248 100644
--- a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -1,26 +1,20 @@
 /*
- * Copyright (C) 2016 Kyligence Inc. All rights reserved.
+ * 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://kyligence.io
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * This software is the confidential and proprietary information of
- * Kyligence Inc. ("Confidential Information"). You shall not disclose
- * such Confidential Information and shall use it only in accordance
- * with the terms of the license agreement you entered into with
- * Kyligence Inc.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * 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.tool;
 



[2/8] kylin git commit: minor, fix could not parse issue for scheduler

2016-12-28 Thread liyang
minor, fix could not parse issue for scheduler


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

Branch: refs/heads/yang22-hbase102
Commit: fd1ed2ed2fe7ddf7bfeac489aaa550d5171c687b
Parents: 7e74783
Author: Billy Liu 
Authored: Wed Dec 28 19:00:00 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 19:00:00 2016 +0800

--
 .../kylin/job/impl/threadpool/DefaultScheduler.java  | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fd1ed2ed/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
index be8e7fe..ddb3a21 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
@@ -105,15 +105,18 @@ public class DefaultScheduler implements 
Scheduler, Connecti
 continue;
 }
 nReady++;
-AbstractExecutable executable = 
executableManager.getJob(id);
-String jobDesc = executable.toString();
-logger.info(jobDesc + " prepare to schedule");
+AbstractExecutable executable = null;
+String jobDesc = null;
 try {
+executable = executableManager.getJob(id);
+jobDesc = executable.toString();
+logger.info(jobDesc + " prepare to schedule");
 context.addRunningJob(executable);
 jobPool.execute(new JobRunner(executable));
 logger.info(jobDesc + " scheduled");
 } catch (Exception ex) {
-context.removeRunningJob(executable);
+if (executable != null)
+context.removeRunningJob(executable);
 logger.warn(jobDesc + " fail to schedule", ex);
 }
 }



[7/8] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API

2016-12-28 Thread liyang
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API


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

Branch: refs/heads/yang22-hbase102
Commit: 7a575955d766f5e75018181ff24863e10173ac1a
Parents: 4d35edd
Author: shaofengshi 
Authored: Wed Mar 23 17:07:05 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Dec 29 09:43:43 2016 +0800

--
 examples/test_case_data/sandbox/hbase-site.xml  | 19 +---
 .../kylin/provision/BuildCubeWithEngine.java| 12 +--
 pom.xml | 12 +--
 .../kylin/rest/security/AclHBaseStorage.java|  4 +-
 .../rest/security/MockAclHBaseStorage.java  |  8 +-
 .../apache/kylin/rest/security/MockHTable.java  | 95 
 .../rest/security/RealAclHBaseStorage.java  |  9 +-
 .../apache/kylin/rest/service/AclService.java   | 25 +++---
 .../apache/kylin/rest/service/CubeService.java  | 35 +++-
 .../apache/kylin/rest/service/QueryService.java | 24 +++--
 .../apache/kylin/rest/service/UserService.java  | 17 ++--
 .../kylin/storage/hbase/HBaseConnection.java| 44 -
 .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++
 .../kylin/storage/hbase/HBaseStorage.java   |  3 +-
 .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++---
 .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +--
 .../storage/hbase/cube/v1/CubeStorageQuery.java |  4 +-
 .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++-
 .../cube/v1/SerializedHBaseTupleIterator.java   |  4 +-
 .../observer/AggregateRegionObserver.java   |  4 +-
 .../observer/AggregationScanner.java| 14 ++-
 .../observer/ObserverAggregationCache.java  | 10 ++-
 .../coprocessor/observer/ObserverEnabler.java   |  4 +-
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +--
 .../storage/hbase/cube/v2/CubeHBaseScanRPC.java |  9 +-
 .../coprocessor/endpoint/CubeVisitService.java  |  4 +-
 .../storage/hbase/steps/CubeHTableUtil.java | 16 ++--
 .../storage/hbase/steps/DeprecatedGCStep.java   | 23 ++---
 .../storage/hbase/steps/HBaseCuboidWriter.java  |  7 +-
 .../kylin/storage/hbase/steps/MergeGCStep.java  | 23 ++---
 .../storage/hbase/util/CleanHtableCLI.java  | 12 +--
 .../storage/hbase/util/CubeMigrationCLI.java| 36 
 .../hbase/util/CubeMigrationCheckCLI.java   | 17 ++--
 .../hbase/util/DeployCoprocessorCLI.java| 27 +++---
 .../hbase/util/ExtendCubeToHybridCLI.java   |  8 +-
 .../hbase/util/GridTableHBaseBenchmark.java | 34 +++
 .../kylin/storage/hbase/util/HBaseClean.java| 18 ++--
 .../hbase/util/HBaseRegionSizeCalculator.java   | 35 
 .../kylin/storage/hbase/util/HBaseUsage.java|  9 +-
 .../storage/hbase/util/HbaseStreamingInput.java | 30 +++
 .../hbase/util/HtableAlterMetadataCLI.java  |  9 +-
 .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++--
 .../kylin/storage/hbase/util/PingHBaseCLI.java  | 15 ++--
 .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +--
 .../storage/hbase/util/StorageCleanupJob.java   | 20 +++--
 .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++--
 .../observer/AggregateRegionObserverTest.java   | 26 ++
 .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java |  5 +-
 .../org/apache/kylin/tool/CubeMigrationCLI.java | 19 ++--
 .../kylin/tool/ExtendCubeToHybridCLI.java   |  8 +-
 50 files changed, 417 insertions(+), 472 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/examples/test_case_data/sandbox/hbase-site.xml
--
diff --git a/examples/test_case_data/sandbox/hbase-site.xml 
b/examples/test_case_data/sandbox/hbase-site.xml
index 46d5345..734908e 100644
--- a/examples/test_case_data/sandbox/hbase-site.xml
+++ b/examples/test_case_data/sandbox/hbase-site.xml
@@ -190,22 +190,5 @@
 zookeeper.znode.parent
 /hbase-unsecure
 
-
-hbase.client.pause
-100
-General client pause value.  Used mostly as value to wait
-before running a retry of a failed get, region lookup, etc.
-See hbase.client.retries.number for description of how we backoff 
from
-this initial pause amount and how this pause works w/ 
retries.
-
-
-hbase.client.retries.number
-5
-Maximum retries.  Used as maximum for all retryable
-operations such as the getting of a cell's value, starting a row 
update,
-etc.  Retry interval is a rough function based on 
hbase.client.pause.  At
-first we retry at this interval but then with backoff, we pretty 
quickly reach
- 

[1/8] kylin git commit: minor, fix NPE when filter Non-Cubing Job [Forced Update!]

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/yang22-hbase102 58180883a -> 8ca0b1af3 (forced update)


minor, fix NPE when filter Non-Cubing Job


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

Branch: refs/heads/yang22-hbase102
Commit: 7e7478319e45532b4eae0de49ac14c4d7e1491b9
Parents: 1e0e9a6
Author: Billy Liu 
Authored: Wed Dec 28 18:47:58 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 18:47:58 2016 +0800

--
 .../main/java/org/apache/kylin/rest/service/JobService.java   | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7e747831/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
--
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java 
b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
index ca8659c..4709a91 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
@@ -536,10 +536,13 @@ public class JobService extends BasicService implements 
InitializingBean {
 @Override
 public boolean apply(AbstractExecutable executable) {
 if (executable instanceof CubingJob) {
-if (cubeName == null) {
+if (StringUtils.isEmpty(cubeName)) {
 return true;
 }
-return 
CubingExecutableUtil.getCubeName(executable.getParams()).equalsIgnoreCase(cubeName);
+String executableCubeName = 
CubingExecutableUtil.getCubeName(executable.getParams());
+if (executableCubeName == null)
+return true;
+return executableCubeName.contains(cubeName);
 } else {
 return false;
 }



[6/8] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API

2016-12-28 Thread liyang
http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
index a150607..56f867a 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
@@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util;
 import java.io.IOException;
 
 import org.apache.commons.cli.Options;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.AbstractApplication;
 import org.apache.kylin.common.util.OptionsHelper;
 import org.apache.kylin.metadata.realization.IRealizationConstants;
@@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication {
 protected static final Logger logger = 
LoggerFactory.getLogger(CleanHtableCLI.class);
 
 private void clean() throws IOException {
-Configuration conf = HBaseConnection.getCurrentHBaseConfiguration();
-HBaseAdmin hbaseAdmin = new HBaseAdmin(conf);
+Connection conn = 
HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl());
+Admin hbaseAdmin = conn.getAdmin();
 
 for (HTableDescriptor descriptor : hbaseAdmin.listTables()) {
 String name = descriptor.getNameAsString().toLowerCase();
@@ -50,7 +52,7 @@ public class CleanHtableCLI extends AbstractApplication {
 System.out.println();
 
 descriptor.setValue(IRealizationConstants.HTableOwner, 
"dl-ebay-ky...@ebay.com");
-hbaseAdmin.modifyTable(descriptor.getNameAsString(), 
descriptor);
+
hbaseAdmin.modifyTable(TableName.valueOf(descriptor.getNameAsString()), 
descriptor);
 }
 }
 hbaseAdmin.close();

http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/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 2e682b1..f47bf31 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
@@ -33,12 +33,13 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
-import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.Table;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.persistence.JsonSerializer;
 import org.apache.kylin.common.persistence.RawResource;
@@ -88,7 +89,7 @@ public class CubeMigrationCLI {
 private static ResourceStore srcStore;
 private static ResourceStore dstStore;
 private static FileSystem hdfsFS;
-private static HBaseAdmin hbaseAdmin;
+private static Admin hbaseAdmin;
 
 public static final String ACL_INFO_FAMILY = "i";
 private static final String ACL_TABLE_NAME = "_acl";
@@ -133,8 +134,8 @@ public class CubeMigrationCLI {
 
 checkAndGetHbaseUrl();
 
-Configuration conf = HBaseConnection.getCurrentHBaseConfiguration();
-hbaseAdmin = new HBaseAdmin(conf);
+Connection conn = HBaseConnection.get(srcConfig.getStorageUrl());
+hbaseAdmin = conn.getAdmin();
 
 hdfsFS = FileSystem.get(new Configuration());
 
@@ -232,6 +233,7 @@ public class CubeMigrationCLI {
 operations.add(new Opt(OptType.COPY_DICT_OR_SNAPSHOT, new Object[] 
{ item, cube.getName() }));
 }
 }
+
 private static void addCubeAndModelIntoProject(CubeInstance srcCube, 
String cubeName, String projectName) throws IOException {
 String projectResPath = 
ProjectInstance.concatResourcePath(projectName);
 if (!dstStore.exists(projectResPath))
@@ -325,8 +327,8 @@ public class 

[8/8] kylin git commit: KYLIN-2233 Support HBase 1.0.2

2016-12-28 Thread liyang
KYLIN-2233 Support HBase 1.0.2

Signed-off-by: Yang Li 


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

Branch: refs/heads/yang22-hbase102
Commit: 8ca0b1af3057229f67422c2067f97cde515d8c87
Parents: 7a57595
Author: Cheng Wang 
Authored: Wed Oct 12 14:39:24 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Dec 29 09:47:46 2016 +0800

--
 pom.xml   |  2 +-
 .../storage/hbase/cube/v1/RegionScannerAdapter.java   | 13 +++--
 .../coprocessor/observer/AggregateRegionObserver.java |  4 ++--
 .../v1/coprocessor/observer/AggregationScanner.java   | 14 --
 .../observer/ObserverAggregationCache.java| 10 ++
 .../observer/AggregateRegionObserverTest.java | 10 ++
 .../cube/v1/filter/TestFuzzyRowFilterV2EndToEnd.java  |  3 +--
 7 files changed, 15 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/8ca0b1af/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 6d3425e..ebc8c9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,7 @@
 1.2.1
 
 
-1.1.1
+1.0.2
 0.10.0.0
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/8ca0b1af/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/RegionScannerAdapter.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/RegionScannerAdapter.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/RegionScannerAdapter.java
index 3d30767..c07d47f 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/RegionScannerAdapter.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/RegionScannerAdapter.java
@@ -26,7 +26,6 @@ import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
-import org.apache.hadoop.hbase.regionserver.ScannerContext;
 
 /**
  * @author yangli9
@@ -51,7 +50,7 @@ public class RegionScannerAdapter implements RegionScanner {
 }
 
 @Override
-public boolean next(List result, ScannerContext scannerContext) 
throws IOException {
+public boolean next(List result, int limit) throws IOException {
 return next(result);
 }
 
@@ -61,7 +60,7 @@ public class RegionScannerAdapter implements RegionScanner {
 }
 
 @Override
-public boolean nextRaw(List result, ScannerContext scannerContext) 
throws IOException {
+public boolean nextRaw(List result, int limit) throws IOException {
 return next(result);
 }
 
@@ -94,10 +93,4 @@ public class RegionScannerAdapter implements RegionScanner {
 public long getMvccReadPoint() {
 return Long.MAX_VALUE;
 }
-
-@Override
-public int getBatch() {
-return -1;
-}
-
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/8ca0b1af/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserver.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserver.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserver.java
index 7e25e4c..7139ca7 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserver.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v1/coprocessor/observer/AggregateRegionObserver.java
@@ -26,7 +26,7 @@ import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
 import org.apache.hadoop.hbase.coprocessor.ObserverContext;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-import org.apache.hadoop.hbase.regionserver.Region;
+import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
 import org.apache.kylin.gridtable.StorageSideBehavior;
@@ -99,7 +99,7 @@ public class AggregateRegionObserver extends 
BaseRegionObserver {
 // start/end region operation & sync on scanner is suggested by the
 // javadoc of 

[3/8] kylin git commit: minor, get config by prefix in KylinConfigCLI

2016-12-28 Thread liyang
minor, get config by prefix in KylinConfigCLI


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

Branch: refs/heads/yang22-hbase102
Commit: 6762fae07f157d762bcafab6996b23dc35c91171
Parents: fd1ed2e
Author: lidongsjtu 
Authored: Wed Dec 28 22:17:35 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:22:26 2016 +0800

--
 .../test_case_data/localmeta/kylin.properties   |  3 +
 .../org/apache/kylin/tool/KylinConfigCLI.java   | 30 +++-
 .../apache/kylin/tool/KylinConfigCLITest.java   | 79 
 3 files changed, 108 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/examples/test_case_data/localmeta/kylin.properties
--
diff --git a/examples/test_case_data/localmeta/kylin.properties 
b/examples/test_case_data/localmeta/kylin.properties
index 1dfac32..f4c6772 100644
--- a/examples/test_case_data/localmeta/kylin.properties
+++ b/examples/test_case_data/localmeta/kylin.properties
@@ -131,3 +131,6 @@ kylin.test.bcc.new.key=some-value
 kylin.engine.mr.config-override.test1=test1
 kylin.engine.mr.config-override.test2=test2
 kylin.job.lock=org.apache.kylin.job.lock.MockJobLock
+
+kylin.engine.provider.0=org.apache.kylin.engine.mr.MRBatchCubingEngine
+kylin.cube.engine.2=org.apache.kylin.engine.mr.MRBatchCubingEngine2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java 
b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
index e1a5b99..b740beb 100644
--- a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
@@ -18,11 +18,14 @@
 
 package org.apache.kylin.tool;
 
+import java.util.Map;
 import java.util.Properties;
 
 import org.apache.kylin.common.BackwardCompatibilityConfig;
 import org.apache.kylin.common.KylinConfig;
 
+import com.google.common.collect.Maps;
+
 public class KylinConfigCLI {
 public static void main(String[] args) {
 if (args.length != 1) {
@@ -33,10 +36,29 @@ public class KylinConfigCLI {
 
 Properties config = KylinConfig.getKylinProperties();
 BackwardCompatibilityConfig bcc = new BackwardCompatibilityConfig();
-String value = config.getProperty(bcc.check(args[0]));
-if (value == null) {
-value = "";
+String key = bcc.check(args[0].trim());
+if (!key.endsWith(".")) {
+String value = config.getProperty(key);
+if (value == null) {
+value = "";
+}
+System.out.println(value);
+} else {
+Map props = getPropertiesByPrefix(config, key);
+for (Map.Entry prop : props.entrySet()) {
+System.out.println(prop.getKey() + "=" + prop.getValue());
+}
+}
+}
+
+static private Map getPropertiesByPrefix(Properties props, 
String prefix) {
+Map result = Maps.newLinkedHashMap();
+for (Map.Entry entry : props.entrySet()) {
+String entryKey = (String) entry.getKey();
+if (entryKey.startsWith(prefix)) {
+result.put(entryKey.substring(prefix.length()), (String) 
entry.getValue());
+}
 }
-System.out.println(value);
+return result;
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
new file mode 100644
index 000..5c56b5f
--- /dev/null
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2016 Kyligence Inc. All rights reserved.
+ *
+ * http://kyligence.io
+ *
+ * This software is the confidential and proprietary information of
+ * Kyligence Inc. ("Confidential Information"). You shall not disclose
+ * such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with
+ * Kyligence Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR 

[6/8] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API

2016-12-28 Thread liyang
http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
index a150607..56f867a 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
@@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util;
 import java.io.IOException;
 
 import org.apache.commons.cli.Options;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.AbstractApplication;
 import org.apache.kylin.common.util.OptionsHelper;
 import org.apache.kylin.metadata.realization.IRealizationConstants;
@@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication {
 protected static final Logger logger = 
LoggerFactory.getLogger(CleanHtableCLI.class);
 
 private void clean() throws IOException {
-Configuration conf = HBaseConnection.getCurrentHBaseConfiguration();
-HBaseAdmin hbaseAdmin = new HBaseAdmin(conf);
+Connection conn = 
HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl());
+Admin hbaseAdmin = conn.getAdmin();
 
 for (HTableDescriptor descriptor : hbaseAdmin.listTables()) {
 String name = descriptor.getNameAsString().toLowerCase();
@@ -50,7 +52,7 @@ public class CleanHtableCLI extends AbstractApplication {
 System.out.println();
 
 descriptor.setValue(IRealizationConstants.HTableOwner, 
"dl-ebay-ky...@ebay.com");
-hbaseAdmin.modifyTable(descriptor.getNameAsString(), 
descriptor);
+
hbaseAdmin.modifyTable(TableName.valueOf(descriptor.getNameAsString()), 
descriptor);
 }
 }
 hbaseAdmin.close();

http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/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 2e682b1..f47bf31 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
@@ -33,12 +33,13 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
-import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.Table;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.persistence.JsonSerializer;
 import org.apache.kylin.common.persistence.RawResource;
@@ -88,7 +89,7 @@ public class CubeMigrationCLI {
 private static ResourceStore srcStore;
 private static ResourceStore dstStore;
 private static FileSystem hdfsFS;
-private static HBaseAdmin hbaseAdmin;
+private static Admin hbaseAdmin;
 
 public static final String ACL_INFO_FAMILY = "i";
 private static final String ACL_TABLE_NAME = "_acl";
@@ -133,8 +134,8 @@ public class CubeMigrationCLI {
 
 checkAndGetHbaseUrl();
 
-Configuration conf = HBaseConnection.getCurrentHBaseConfiguration();
-hbaseAdmin = new HBaseAdmin(conf);
+Connection conn = HBaseConnection.get(srcConfig.getStorageUrl());
+hbaseAdmin = conn.getAdmin();
 
 hdfsFS = FileSystem.get(new Configuration());
 
@@ -232,6 +233,7 @@ public class CubeMigrationCLI {
 operations.add(new Opt(OptType.COPY_DICT_OR_SNAPSHOT, new Object[] 
{ item, cube.getName() }));
 }
 }
+
 private static void addCubeAndModelIntoProject(CubeInstance srcCube, 
String cubeName, String projectName) throws IOException {
 String projectResPath = 
ProjectInstance.concatResourcePath(projectName);
 if (!dstStore.exists(projectResPath))
@@ -325,8 +327,8 @@ public class 

[8/8] kylin git commit: KYLIN-1672 support kylin on cdh 5.7

2016-12-28 Thread liyang
KYLIN-1672 support kylin on cdh 5.7

Signed-off-by: Li Yang 


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

Branch: refs/heads/yang22-cdh5.7
Commit: 29f24100c2da627653f07e8b1ffc86824c417090
Parents: 7a57595
Author: Lynne Jiang 
Authored: Mon May 16 03:33:27 2016 -0700
Committer: Hongbin Ma 
Committed: Thu Dec 29 09:45:42 2016 +0800

--
 dev-support/test_all_against_hdp_2_2_4_2_2.sh   |   0
 .../kylin/engine/mr/steps/MockupMapContext.java |  15 +-
 examples/test_case_data/sandbox/core-site.xml   | 146 +++---
 examples/test_case_data/sandbox/hbase-site.xml  | 162 ++
 examples/test_case_data/sandbox/hdfs-site.xml   | 259 ++
 examples/test_case_data/sandbox/mapred-site.xml | 398 ++-
 examples/test_case_data/sandbox/yarn-site.xml   | 496 ++-
 pom.xml |  16 +-
 server/pom.xml  |  36 ++
 .../storage/hbase/steps/MockupMapContext.java   |  19 +-
 tool/pom.xml|  12 +
 11 files changed, 428 insertions(+), 1131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/29f24100/dev-support/test_all_against_hdp_2_2_4_2_2.sh
--
diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh 
b/dev-support/test_all_against_hdp_2_2_4_2_2.sh
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/kylin/blob/29f24100/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
--
diff --git 
a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
 
b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
index 847071d..9900465 100644
--- 
a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
+++ 
b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java
@@ -77,6 +77,7 @@ public class MockupMapContext {
 outKV[0] = key;
 outKV[1] = value;
 }
+
 }
 
 @Override
@@ -99,6 +100,7 @@ public class MockupMapContext {
 throw new NotImplementedException();
 }
 
+
 @Override
 public float getProgress() {
 throw new NotImplementedException();
@@ -195,17 +197,17 @@ public class MockupMapContext {
 }
 
 @Override
-public RawComparator getSortComparator() {
+public boolean userClassesTakesPrecedence() {
 throw new NotImplementedException();
 }
 
 @Override
-public String getJar() {
+public RawComparator getSortComparator() {
 throw new NotImplementedException();
 }
 
 @Override
-public RawComparator getGroupingComparator() {
+public String getJar() {
 throw new NotImplementedException();
 }
 
@@ -221,7 +223,7 @@ public class MockupMapContext {
 
 @Override
 public boolean getProfileEnabled() {
-throw new NotImplementedException();
+return false;
 }
 
 @Override
@@ -308,6 +310,11 @@ public class MockupMapContext {
 public RawComparator getCombinerKeyGroupingComparator() {
 throw new NotImplementedException();
 }
+
+@Override
+public RawComparator getGroupingComparator() {
+return null;
+}
 });
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/29f24100/examples/test_case_data/sandbox/core-site.xml
--
diff --git a/examples/test_case_data/sandbox/core-site.xml 
b/examples/test_case_data/sandbox/core-site.xml
index 9aa588c..6162406 100644
--- a/examples/test_case_data/sandbox/core-site.xml
+++ b/examples/test_case_data/sandbox/core-site.xml
@@ -14,152 +14,146 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+
 
-
 
 fs.defaultFS
-hdfs://sandbox.hortonworks.com:8020
-true
+hdfs://quickstart.cloudera:8020
 
-
 
 fs.trash.interval
-360
+1
 
-
 
-
ha.failover-controller.active-standby-elector.zk.op.retries
-120
+io.compression.codecs
+

[7/8] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API

2016-12-28 Thread liyang
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API


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

Branch: refs/heads/yang22-cdh5.7
Commit: 7a575955d766f5e75018181ff24863e10173ac1a
Parents: 4d35edd
Author: shaofengshi 
Authored: Wed Mar 23 17:07:05 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Dec 29 09:43:43 2016 +0800

--
 examples/test_case_data/sandbox/hbase-site.xml  | 19 +---
 .../kylin/provision/BuildCubeWithEngine.java| 12 +--
 pom.xml | 12 +--
 .../kylin/rest/security/AclHBaseStorage.java|  4 +-
 .../rest/security/MockAclHBaseStorage.java  |  8 +-
 .../apache/kylin/rest/security/MockHTable.java  | 95 
 .../rest/security/RealAclHBaseStorage.java  |  9 +-
 .../apache/kylin/rest/service/AclService.java   | 25 +++---
 .../apache/kylin/rest/service/CubeService.java  | 35 +++-
 .../apache/kylin/rest/service/QueryService.java | 24 +++--
 .../apache/kylin/rest/service/UserService.java  | 17 ++--
 .../kylin/storage/hbase/HBaseConnection.java| 44 -
 .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++
 .../kylin/storage/hbase/HBaseStorage.java   |  3 +-
 .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++---
 .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +--
 .../storage/hbase/cube/v1/CubeStorageQuery.java |  4 +-
 .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++-
 .../cube/v1/SerializedHBaseTupleIterator.java   |  4 +-
 .../observer/AggregateRegionObserver.java   |  4 +-
 .../observer/AggregationScanner.java| 14 ++-
 .../observer/ObserverAggregationCache.java  | 10 ++-
 .../coprocessor/observer/ObserverEnabler.java   |  4 +-
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +--
 .../storage/hbase/cube/v2/CubeHBaseScanRPC.java |  9 +-
 .../coprocessor/endpoint/CubeVisitService.java  |  4 +-
 .../storage/hbase/steps/CubeHTableUtil.java | 16 ++--
 .../storage/hbase/steps/DeprecatedGCStep.java   | 23 ++---
 .../storage/hbase/steps/HBaseCuboidWriter.java  |  7 +-
 .../kylin/storage/hbase/steps/MergeGCStep.java  | 23 ++---
 .../storage/hbase/util/CleanHtableCLI.java  | 12 +--
 .../storage/hbase/util/CubeMigrationCLI.java| 36 
 .../hbase/util/CubeMigrationCheckCLI.java   | 17 ++--
 .../hbase/util/DeployCoprocessorCLI.java| 27 +++---
 .../hbase/util/ExtendCubeToHybridCLI.java   |  8 +-
 .../hbase/util/GridTableHBaseBenchmark.java | 34 +++
 .../kylin/storage/hbase/util/HBaseClean.java| 18 ++--
 .../hbase/util/HBaseRegionSizeCalculator.java   | 35 
 .../kylin/storage/hbase/util/HBaseUsage.java|  9 +-
 .../storage/hbase/util/HbaseStreamingInput.java | 30 +++
 .../hbase/util/HtableAlterMetadataCLI.java  |  9 +-
 .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++--
 .../kylin/storage/hbase/util/PingHBaseCLI.java  | 15 ++--
 .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +--
 .../storage/hbase/util/StorageCleanupJob.java   | 20 +++--
 .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++--
 .../observer/AggregateRegionObserverTest.java   | 26 ++
 .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java |  5 +-
 .../org/apache/kylin/tool/CubeMigrationCLI.java | 19 ++--
 .../kylin/tool/ExtendCubeToHybridCLI.java   |  8 +-
 50 files changed, 417 insertions(+), 472 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/examples/test_case_data/sandbox/hbase-site.xml
--
diff --git a/examples/test_case_data/sandbox/hbase-site.xml 
b/examples/test_case_data/sandbox/hbase-site.xml
index 46d5345..734908e 100644
--- a/examples/test_case_data/sandbox/hbase-site.xml
+++ b/examples/test_case_data/sandbox/hbase-site.xml
@@ -190,22 +190,5 @@
 zookeeper.znode.parent
 /hbase-unsecure
 
-
-hbase.client.pause
-100
-General client pause value.  Used mostly as value to wait
-before running a retry of a failed get, region lookup, etc.
-See hbase.client.retries.number for description of how we backoff 
from
-this initial pause amount and how this pause works w/ 
retries.
-
-
-hbase.client.retries.number
-5
-Maximum retries.  Used as maximum for all retryable
-operations such as the getting of a cell's value, starting a row 
update,
-etc.  Retry interval is a rough function based on 
hbase.client.pause.  At
-first we retry at this interval but then with backoff, we pretty 
quickly reach
-   

[3/8] kylin git commit: minor, get config by prefix in KylinConfigCLI

2016-12-28 Thread liyang
minor, get config by prefix in KylinConfigCLI


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

Branch: refs/heads/yang22-cdh5.7
Commit: 6762fae07f157d762bcafab6996b23dc35c91171
Parents: fd1ed2e
Author: lidongsjtu 
Authored: Wed Dec 28 22:17:35 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:22:26 2016 +0800

--
 .../test_case_data/localmeta/kylin.properties   |  3 +
 .../org/apache/kylin/tool/KylinConfigCLI.java   | 30 +++-
 .../apache/kylin/tool/KylinConfigCLITest.java   | 79 
 3 files changed, 108 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/examples/test_case_data/localmeta/kylin.properties
--
diff --git a/examples/test_case_data/localmeta/kylin.properties 
b/examples/test_case_data/localmeta/kylin.properties
index 1dfac32..f4c6772 100644
--- a/examples/test_case_data/localmeta/kylin.properties
+++ b/examples/test_case_data/localmeta/kylin.properties
@@ -131,3 +131,6 @@ kylin.test.bcc.new.key=some-value
 kylin.engine.mr.config-override.test1=test1
 kylin.engine.mr.config-override.test2=test2
 kylin.job.lock=org.apache.kylin.job.lock.MockJobLock
+
+kylin.engine.provider.0=org.apache.kylin.engine.mr.MRBatchCubingEngine
+kylin.cube.engine.2=org.apache.kylin.engine.mr.MRBatchCubingEngine2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java 
b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
index e1a5b99..b740beb 100644
--- a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
@@ -18,11 +18,14 @@
 
 package org.apache.kylin.tool;
 
+import java.util.Map;
 import java.util.Properties;
 
 import org.apache.kylin.common.BackwardCompatibilityConfig;
 import org.apache.kylin.common.KylinConfig;
 
+import com.google.common.collect.Maps;
+
 public class KylinConfigCLI {
 public static void main(String[] args) {
 if (args.length != 1) {
@@ -33,10 +36,29 @@ public class KylinConfigCLI {
 
 Properties config = KylinConfig.getKylinProperties();
 BackwardCompatibilityConfig bcc = new BackwardCompatibilityConfig();
-String value = config.getProperty(bcc.check(args[0]));
-if (value == null) {
-value = "";
+String key = bcc.check(args[0].trim());
+if (!key.endsWith(".")) {
+String value = config.getProperty(key);
+if (value == null) {
+value = "";
+}
+System.out.println(value);
+} else {
+Map props = getPropertiesByPrefix(config, key);
+for (Map.Entry prop : props.entrySet()) {
+System.out.println(prop.getKey() + "=" + prop.getValue());
+}
+}
+}
+
+static private Map getPropertiesByPrefix(Properties props, 
String prefix) {
+Map result = Maps.newLinkedHashMap();
+for (Map.Entry entry : props.entrySet()) {
+String entryKey = (String) entry.getKey();
+if (entryKey.startsWith(prefix)) {
+result.put(entryKey.substring(prefix.length()), (String) 
entry.getValue());
+}
 }
-System.out.println(value);
+return result;
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
new file mode 100644
index 000..5c56b5f
--- /dev/null
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2016 Kyligence Inc. All rights reserved.
+ *
+ * http://kyligence.io
+ *
+ * This software is the confidential and proprietary information of
+ * Kyligence Inc. ("Confidential Information"). You shall not disclose
+ * such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with
+ * Kyligence Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED 

[5/8] kylin git commit: KYLIN-2330 fix CubeDesc returning redundant DeriveInfo

2016-12-28 Thread liyang
KYLIN-2330 fix CubeDesc returning redundant DeriveInfo


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

Branch: refs/heads/yang22-cdh5.7
Commit: 4d35edd7b47af65e706465a7fe7c9f7ddd83fd9d
Parents: 17e323e
Author: Yang Li 
Authored: Thu Dec 29 07:13:12 2016 +0800
Committer: Yang Li 
Committed: Thu Dec 29 07:13:24 2016 +0800

--
 .../org/apache/kylin/cube/model/CubeDesc.java   | 46 +
 .../org/apache/kylin/cube/CubeDescTest.java | 53 ++--
 .../test_case_data/localmeta/cube_desc/ssb.json | 12 -
 3 files changed, 95 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/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 853571c..219435e 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
@@ -789,25 +789,49 @@ public class CubeDesc extends RootPersistentEntity 
implements IEngineAware {
 for (int i = 0; i < derivedCols.length; i++) {
 if (ArrayUtils.contains(hostCols, derivedCols[i])) {
 derivedCols = (TblColRef[]) ArrayUtils.remove(derivedCols, i);
-extra = (String[]) ArrayUtils.remove(extra, i);
+if (extra != null)
+extra = (String[]) ArrayUtils.remove(extra, i);
 i--;
 }
 }
+
+if (derivedCols.length == 0)
+return;
 
-Map toHostMap = derivedToHostMap;
-Map hostToMap = hostToDerivedMap;
+for (int i = 0; i < derivedCols.length; i++) {
+TblColRef derivedCol = derivedCols[i];
+boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
+derivedToHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+}
 
 Array hostColArray = new Array(hostCols);
-List infoList = hostToMap.get(hostColArray);
+List infoList = hostToDerivedMap.get(hostColArray);
 if (infoList == null) {
-hostToMap.put(hostColArray, infoList = new 
ArrayList());
+hostToDerivedMap.put(hostColArray, infoList = new 
ArrayList());
 }
-infoList.add(new DeriveInfo(type, dimension, derivedCols, false));
-
-for (int i = 0; i < derivedCols.length; i++) {
-TblColRef derivedCol = derivedCols[i];
-boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
-toHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+
+// Merged duplicated derived column
+List whatsLeft = new ArrayList<>();
+for (TblColRef derCol : derivedCols) {
+boolean merged = false;
+for (DeriveInfo existing : infoList) {
+if (existing.type == type && 
existing.dimension.getTableRef().equals(dimension.getTableRef())) {
+if (ArrayUtils.contains(existing.columns, derCol)) {
+merged = true;
+break;
+}
+if (type == DeriveType.LOOKUP) {
+existing.columns = (TblColRef[]) 
ArrayUtils.add(existing.columns, derCol);
+merged = true;
+break;
+}
+}
+}
+if (!merged)
+whatsLeft.add(derCol);
+}
+if (whatsLeft.size() > 0) {
+infoList.add(new DeriveInfo(type, dimension, (TblColRef[]) 
whatsLeft.toArray(new TblColRef[whatsLeft.size()]), false));
 }
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
--
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java 
b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
index 27c154b..c192da0 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
@@ -18,19 +18,29 @@
 
 package 

[2/8] kylin git commit: minor, fix could not parse issue for scheduler

2016-12-28 Thread liyang
minor, fix could not parse issue for scheduler


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

Branch: refs/heads/yang22-cdh5.7
Commit: fd1ed2ed2fe7ddf7bfeac489aaa550d5171c687b
Parents: 7e74783
Author: Billy Liu 
Authored: Wed Dec 28 19:00:00 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 19:00:00 2016 +0800

--
 .../kylin/job/impl/threadpool/DefaultScheduler.java  | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fd1ed2ed/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
index be8e7fe..ddb3a21 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
@@ -105,15 +105,18 @@ public class DefaultScheduler implements 
Scheduler, Connecti
 continue;
 }
 nReady++;
-AbstractExecutable executable = 
executableManager.getJob(id);
-String jobDesc = executable.toString();
-logger.info(jobDesc + " prepare to schedule");
+AbstractExecutable executable = null;
+String jobDesc = null;
 try {
+executable = executableManager.getJob(id);
+jobDesc = executable.toString();
+logger.info(jobDesc + " prepare to schedule");
 context.addRunningJob(executable);
 jobPool.execute(new JobRunner(executable));
 logger.info(jobDesc + " scheduled");
 } catch (Exception ex) {
-context.removeRunningJob(executable);
+if (executable != null)
+context.removeRunningJob(executable);
 logger.warn(jobDesc + " fail to schedule", ex);
 }
 }



[7/7] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API

2016-12-28 Thread liyang
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API


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

Branch: refs/heads/yang22-hbase1.x
Commit: 7a575955d766f5e75018181ff24863e10173ac1a
Parents: 4d35edd
Author: shaofengshi 
Authored: Wed Mar 23 17:07:05 2016 +0800
Committer: Hongbin Ma 
Committed: Thu Dec 29 09:43:43 2016 +0800

--
 examples/test_case_data/sandbox/hbase-site.xml  | 19 +---
 .../kylin/provision/BuildCubeWithEngine.java| 12 +--
 pom.xml | 12 +--
 .../kylin/rest/security/AclHBaseStorage.java|  4 +-
 .../rest/security/MockAclHBaseStorage.java  |  8 +-
 .../apache/kylin/rest/security/MockHTable.java  | 95 
 .../rest/security/RealAclHBaseStorage.java  |  9 +-
 .../apache/kylin/rest/service/AclService.java   | 25 +++---
 .../apache/kylin/rest/service/CubeService.java  | 35 +++-
 .../apache/kylin/rest/service/QueryService.java | 24 +++--
 .../apache/kylin/rest/service/UserService.java  | 17 ++--
 .../kylin/storage/hbase/HBaseConnection.java| 44 -
 .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++
 .../kylin/storage/hbase/HBaseStorage.java   |  3 +-
 .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++---
 .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +--
 .../storage/hbase/cube/v1/CubeStorageQuery.java |  4 +-
 .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++-
 .../cube/v1/SerializedHBaseTupleIterator.java   |  4 +-
 .../observer/AggregateRegionObserver.java   |  4 +-
 .../observer/AggregationScanner.java| 14 ++-
 .../observer/ObserverAggregationCache.java  | 10 ++-
 .../coprocessor/observer/ObserverEnabler.java   |  4 +-
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +--
 .../storage/hbase/cube/v2/CubeHBaseScanRPC.java |  9 +-
 .../coprocessor/endpoint/CubeVisitService.java  |  4 +-
 .../storage/hbase/steps/CubeHTableUtil.java | 16 ++--
 .../storage/hbase/steps/DeprecatedGCStep.java   | 23 ++---
 .../storage/hbase/steps/HBaseCuboidWriter.java  |  7 +-
 .../kylin/storage/hbase/steps/MergeGCStep.java  | 23 ++---
 .../storage/hbase/util/CleanHtableCLI.java  | 12 +--
 .../storage/hbase/util/CubeMigrationCLI.java| 36 
 .../hbase/util/CubeMigrationCheckCLI.java   | 17 ++--
 .../hbase/util/DeployCoprocessorCLI.java| 27 +++---
 .../hbase/util/ExtendCubeToHybridCLI.java   |  8 +-
 .../hbase/util/GridTableHBaseBenchmark.java | 34 +++
 .../kylin/storage/hbase/util/HBaseClean.java| 18 ++--
 .../hbase/util/HBaseRegionSizeCalculator.java   | 35 
 .../kylin/storage/hbase/util/HBaseUsage.java|  9 +-
 .../storage/hbase/util/HbaseStreamingInput.java | 30 +++
 .../hbase/util/HtableAlterMetadataCLI.java  |  9 +-
 .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++--
 .../kylin/storage/hbase/util/PingHBaseCLI.java  | 15 ++--
 .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +--
 .../storage/hbase/util/StorageCleanupJob.java   | 20 +++--
 .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++--
 .../observer/AggregateRegionObserverTest.java   | 26 ++
 .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java |  5 +-
 .../org/apache/kylin/tool/CubeMigrationCLI.java | 19 ++--
 .../kylin/tool/ExtendCubeToHybridCLI.java   |  8 +-
 50 files changed, 417 insertions(+), 472 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/examples/test_case_data/sandbox/hbase-site.xml
--
diff --git a/examples/test_case_data/sandbox/hbase-site.xml 
b/examples/test_case_data/sandbox/hbase-site.xml
index 46d5345..734908e 100644
--- a/examples/test_case_data/sandbox/hbase-site.xml
+++ b/examples/test_case_data/sandbox/hbase-site.xml
@@ -190,22 +190,5 @@
 zookeeper.znode.parent
 /hbase-unsecure
 
-
-hbase.client.pause
-100
-General client pause value.  Used mostly as value to wait
-before running a retry of a failed get, region lookup, etc.
-See hbase.client.retries.number for description of how we backoff 
from
-this initial pause amount and how this pause works w/ 
retries.
-
-
-hbase.client.retries.number
-5
-Maximum retries.  Used as maximum for all retryable
-operations such as the getting of a cell's value, starting a row 
update,
-etc.  Retry interval is a rough function based on 
hbase.client.pause.  At
-first we retry at this interval but then with backoff, we pretty 
quickly reach
- 

[2/7] kylin git commit: minor, fix could not parse issue for scheduler

2016-12-28 Thread liyang
minor, fix could not parse issue for scheduler


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

Branch: refs/heads/yang22-hbase1.x
Commit: fd1ed2ed2fe7ddf7bfeac489aaa550d5171c687b
Parents: 7e74783
Author: Billy Liu 
Authored: Wed Dec 28 19:00:00 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 19:00:00 2016 +0800

--
 .../kylin/job/impl/threadpool/DefaultScheduler.java  | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fd1ed2ed/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
index be8e7fe..ddb3a21 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
@@ -105,15 +105,18 @@ public class DefaultScheduler implements 
Scheduler, Connecti
 continue;
 }
 nReady++;
-AbstractExecutable executable = 
executableManager.getJob(id);
-String jobDesc = executable.toString();
-logger.info(jobDesc + " prepare to schedule");
+AbstractExecutable executable = null;
+String jobDesc = null;
 try {
+executable = executableManager.getJob(id);
+jobDesc = executable.toString();
+logger.info(jobDesc + " prepare to schedule");
 context.addRunningJob(executable);
 jobPool.execute(new JobRunner(executable));
 logger.info(jobDesc + " scheduled");
 } catch (Exception ex) {
-context.removeRunningJob(executable);
+if (executable != null)
+context.removeRunningJob(executable);
 logger.warn(jobDesc + " fail to schedule", ex);
 }
 }



[5/7] kylin git commit: KYLIN-2330 fix CubeDesc returning redundant DeriveInfo

2016-12-28 Thread liyang
KYLIN-2330 fix CubeDesc returning redundant DeriveInfo


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

Branch: refs/heads/yang22-hbase1.x
Commit: 4d35edd7b47af65e706465a7fe7c9f7ddd83fd9d
Parents: 17e323e
Author: Yang Li 
Authored: Thu Dec 29 07:13:12 2016 +0800
Committer: Yang Li 
Committed: Thu Dec 29 07:13:24 2016 +0800

--
 .../org/apache/kylin/cube/model/CubeDesc.java   | 46 +
 .../org/apache/kylin/cube/CubeDescTest.java | 53 ++--
 .../test_case_data/localmeta/cube_desc/ssb.json | 12 -
 3 files changed, 95 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/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 853571c..219435e 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
@@ -789,25 +789,49 @@ public class CubeDesc extends RootPersistentEntity 
implements IEngineAware {
 for (int i = 0; i < derivedCols.length; i++) {
 if (ArrayUtils.contains(hostCols, derivedCols[i])) {
 derivedCols = (TblColRef[]) ArrayUtils.remove(derivedCols, i);
-extra = (String[]) ArrayUtils.remove(extra, i);
+if (extra != null)
+extra = (String[]) ArrayUtils.remove(extra, i);
 i--;
 }
 }
+
+if (derivedCols.length == 0)
+return;
 
-Map toHostMap = derivedToHostMap;
-Map hostToMap = hostToDerivedMap;
+for (int i = 0; i < derivedCols.length; i++) {
+TblColRef derivedCol = derivedCols[i];
+boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
+derivedToHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+}
 
 Array hostColArray = new Array(hostCols);
-List infoList = hostToMap.get(hostColArray);
+List infoList = hostToDerivedMap.get(hostColArray);
 if (infoList == null) {
-hostToMap.put(hostColArray, infoList = new 
ArrayList());
+hostToDerivedMap.put(hostColArray, infoList = new 
ArrayList());
 }
-infoList.add(new DeriveInfo(type, dimension, derivedCols, false));
-
-for (int i = 0; i < derivedCols.length; i++) {
-TblColRef derivedCol = derivedCols[i];
-boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
-toHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+
+// Merged duplicated derived column
+List whatsLeft = new ArrayList<>();
+for (TblColRef derCol : derivedCols) {
+boolean merged = false;
+for (DeriveInfo existing : infoList) {
+if (existing.type == type && 
existing.dimension.getTableRef().equals(dimension.getTableRef())) {
+if (ArrayUtils.contains(existing.columns, derCol)) {
+merged = true;
+break;
+}
+if (type == DeriveType.LOOKUP) {
+existing.columns = (TblColRef[]) 
ArrayUtils.add(existing.columns, derCol);
+merged = true;
+break;
+}
+}
+}
+if (!merged)
+whatsLeft.add(derCol);
+}
+if (whatsLeft.size() > 0) {
+infoList.add(new DeriveInfo(type, dimension, (TblColRef[]) 
whatsLeft.toArray(new TblColRef[whatsLeft.size()]), false));
 }
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
--
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java 
b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
index 27c154b..c192da0 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
+++ b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
@@ -18,19 +18,29 @@
 
 package 

[3/7] kylin git commit: minor, get config by prefix in KylinConfigCLI

2016-12-28 Thread liyang
minor, get config by prefix in KylinConfigCLI


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

Branch: refs/heads/yang22-hbase1.x
Commit: 6762fae07f157d762bcafab6996b23dc35c91171
Parents: fd1ed2e
Author: lidongsjtu 
Authored: Wed Dec 28 22:17:35 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:22:26 2016 +0800

--
 .../test_case_data/localmeta/kylin.properties   |  3 +
 .../org/apache/kylin/tool/KylinConfigCLI.java   | 30 +++-
 .../apache/kylin/tool/KylinConfigCLITest.java   | 79 
 3 files changed, 108 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/examples/test_case_data/localmeta/kylin.properties
--
diff --git a/examples/test_case_data/localmeta/kylin.properties 
b/examples/test_case_data/localmeta/kylin.properties
index 1dfac32..f4c6772 100644
--- a/examples/test_case_data/localmeta/kylin.properties
+++ b/examples/test_case_data/localmeta/kylin.properties
@@ -131,3 +131,6 @@ kylin.test.bcc.new.key=some-value
 kylin.engine.mr.config-override.test1=test1
 kylin.engine.mr.config-override.test2=test2
 kylin.job.lock=org.apache.kylin.job.lock.MockJobLock
+
+kylin.engine.provider.0=org.apache.kylin.engine.mr.MRBatchCubingEngine
+kylin.cube.engine.2=org.apache.kylin.engine.mr.MRBatchCubingEngine2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java 
b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
index e1a5b99..b740beb 100644
--- a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
@@ -18,11 +18,14 @@
 
 package org.apache.kylin.tool;
 
+import java.util.Map;
 import java.util.Properties;
 
 import org.apache.kylin.common.BackwardCompatibilityConfig;
 import org.apache.kylin.common.KylinConfig;
 
+import com.google.common.collect.Maps;
+
 public class KylinConfigCLI {
 public static void main(String[] args) {
 if (args.length != 1) {
@@ -33,10 +36,29 @@ public class KylinConfigCLI {
 
 Properties config = KylinConfig.getKylinProperties();
 BackwardCompatibilityConfig bcc = new BackwardCompatibilityConfig();
-String value = config.getProperty(bcc.check(args[0]));
-if (value == null) {
-value = "";
+String key = bcc.check(args[0].trim());
+if (!key.endsWith(".")) {
+String value = config.getProperty(key);
+if (value == null) {
+value = "";
+}
+System.out.println(value);
+} else {
+Map props = getPropertiesByPrefix(config, key);
+for (Map.Entry prop : props.entrySet()) {
+System.out.println(prop.getKey() + "=" + prop.getValue());
+}
+}
+}
+
+static private Map getPropertiesByPrefix(Properties props, 
String prefix) {
+Map result = Maps.newLinkedHashMap();
+for (Map.Entry entry : props.entrySet()) {
+String entryKey = (String) entry.getKey();
+if (entryKey.startsWith(prefix)) {
+result.put(entryKey.substring(prefix.length()), (String) 
entry.getValue());
+}
 }
-System.out.println(value);
+return result;
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
new file mode 100644
index 000..5c56b5f
--- /dev/null
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2016 Kyligence Inc. All rights reserved.
+ *
+ * http://kyligence.io
+ *
+ * This software is the confidential and proprietary information of
+ * Kyligence Inc. ("Confidential Information"). You shall not disclose
+ * such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with
+ * Kyligence Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR 

[6/7] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API

2016-12-28 Thread liyang
http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
index a150607..56f867a 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java
@@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util;
 import java.io.IOException;
 
 import org.apache.commons.cli.Options;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.AbstractApplication;
 import org.apache.kylin.common.util.OptionsHelper;
 import org.apache.kylin.metadata.realization.IRealizationConstants;
@@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication {
 protected static final Logger logger = 
LoggerFactory.getLogger(CleanHtableCLI.class);
 
 private void clean() throws IOException {
-Configuration conf = HBaseConnection.getCurrentHBaseConfiguration();
-HBaseAdmin hbaseAdmin = new HBaseAdmin(conf);
+Connection conn = 
HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl());
+Admin hbaseAdmin = conn.getAdmin();
 
 for (HTableDescriptor descriptor : hbaseAdmin.listTables()) {
 String name = descriptor.getNameAsString().toLowerCase();
@@ -50,7 +52,7 @@ public class CleanHtableCLI extends AbstractApplication {
 System.out.println();
 
 descriptor.setValue(IRealizationConstants.HTableOwner, 
"dl-ebay-ky...@ebay.com");
-hbaseAdmin.modifyTable(descriptor.getNameAsString(), 
descriptor);
+
hbaseAdmin.modifyTable(TableName.valueOf(descriptor.getNameAsString()), 
descriptor);
 }
 }
 hbaseAdmin.close();

http://git-wip-us.apache.org/repos/asf/kylin/blob/7a575955/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 2e682b1..f47bf31 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
@@ -33,12 +33,13 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
-import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.Table;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.persistence.JsonSerializer;
 import org.apache.kylin.common.persistence.RawResource;
@@ -88,7 +89,7 @@ public class CubeMigrationCLI {
 private static ResourceStore srcStore;
 private static ResourceStore dstStore;
 private static FileSystem hdfsFS;
-private static HBaseAdmin hbaseAdmin;
+private static Admin hbaseAdmin;
 
 public static final String ACL_INFO_FAMILY = "i";
 private static final String ACL_TABLE_NAME = "_acl";
@@ -133,8 +134,8 @@ public class CubeMigrationCLI {
 
 checkAndGetHbaseUrl();
 
-Configuration conf = HBaseConnection.getCurrentHBaseConfiguration();
-hbaseAdmin = new HBaseAdmin(conf);
+Connection conn = HBaseConnection.get(srcConfig.getStorageUrl());
+hbaseAdmin = conn.getAdmin();
 
 hdfsFS = FileSystem.get(new Configuration());
 
@@ -232,6 +233,7 @@ public class CubeMigrationCLI {
 operations.add(new Opt(OptType.COPY_DICT_OR_SNAPSHOT, new Object[] 
{ item, cube.getName() }));
 }
 }
+
 private static void addCubeAndModelIntoProject(CubeInstance srcCube, 
String cubeName, String projectName) throws IOException {
 String projectResPath = 
ProjectInstance.concatResourcePath(projectName);
 if (!dstStore.exists(projectResPath))
@@ -325,8 +327,8 @@ public class 

[1/7] kylin git commit: minor, fix NPE when filter Non-Cubing Job [Forced Update!]

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/yang22-hbase1.x 3f3f0b9d6 -> 7a575955d (forced update)


minor, fix NPE when filter Non-Cubing Job


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

Branch: refs/heads/yang22-hbase1.x
Commit: 7e7478319e45532b4eae0de49ac14c4d7e1491b9
Parents: 1e0e9a6
Author: Billy Liu 
Authored: Wed Dec 28 18:47:58 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 18:47:58 2016 +0800

--
 .../main/java/org/apache/kylin/rest/service/JobService.java   | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7e747831/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
--
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java 
b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
index ca8659c..4709a91 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
@@ -536,10 +536,13 @@ public class JobService extends BasicService implements 
InitializingBean {
 @Override
 public boolean apply(AbstractExecutable executable) {
 if (executable instanceof CubingJob) {
-if (cubeName == null) {
+if (StringUtils.isEmpty(cubeName)) {
 return true;
 }
-return 
CubingExecutableUtil.getCubeName(executable.getParams()).equalsIgnoreCase(cubeName);
+String executableCubeName = 
CubingExecutableUtil.getCubeName(executable.getParams());
+if (executableCubeName == null)
+return true;
+return executableCubeName.contains(cubeName);
 } else {
 return false;
 }



[4/7] kylin git commit: minor, fix wrong header

2016-12-28 Thread liyang
minor, fix wrong header


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

Branch: refs/heads/yang22-hbase1.x
Commit: 17e323eed9b6b2ef91b1badf230239280ff6d46d
Parents: 6762fae
Author: lidongsjtu 
Authored: Wed Dec 28 22:25:44 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:25:52 2016 +0800

--
 .../apache/kylin/tool/KylinConfigCLITest.java   | 34 
 1 file changed, 14 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/17e323ee/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
index 5c56b5f..7d1e248 100644
--- a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -1,26 +1,20 @@
 /*
- * Copyright (C) 2016 Kyligence Inc. All rights reserved.
+ * 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://kyligence.io
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * This software is the confidential and proprietary information of
- * Kyligence Inc. ("Confidential Information"). You shall not disclose
- * such Confidential Information and shall use it only in accordance
- * with the terms of the license agreement you entered into with
- * Kyligence Inc.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * 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.tool;
 



Build failed in Jenkins: Kylin-SonarQube #17

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 40110 lines...]
[WARNING] Resource not found: 
org.apache.kylin.storage.hbase.steps.RowValueDecoderTest
[WARNING] Resource not found: 
org.apache.kylin.engine.mr.steps.NDCuboidMapperTest
[WARNING] Resource not found: 
org.apache.kylin.engine.mr.steps.FactDistinctColumnsReducerTest
[WARNING] Resource not found: 
org.apache.kylin.cube.model.validation.rule.FunctionRuleTest
[WARNING] Resource not found: org.apache.kylin.dimension.IntDimEncTest
[WARNING] Resource not found: org.apache.kylin.cube.CubeManagerCacheTest
[WARNING] Resource not found: org.apache.kylin.cube.kv.RowKeyDecoderTest
[WARNING] Resource not found: org.apache.kylin.gridtable.GTScanReqSerDerTest
[WARNING] Resource not found: org.apache.kylin.jdbc.SQLResonseStubTest
[WARNING] Resource not found: org.apache.kylin.common.util.BitSetsTest
[WARNING] Resource not found: org.apache.kylin.rest.metrics.QueryMetricsTest
[WARNING] Resource not found: org.apache.kylin.engine.mr.steps.CubeReducerTest
[WARNING] Resource not found: org.apache.kylin.rest.service.JobServiceTest
[WARNING] Resource not found: 
org.apache.kylin.measure.extendedcolumn.ExtendedColumnSerializerTest
[WARNING] Resource not found: org.apache.kylin.dimension.IntegerDimEncTest
[WARNING] Resource not found: org.apache.kylin.measure.raw.RawSerializerTest
[WARNING] Resource not found: 
org.apache.kylin.measure.bitmap.BitmapAggregatorTest
[WARNING] Resource not found: 
org.apache.kylin.engine.mr.steps.HiveToBaseCuboidMapperPerformanceTest
[WARNING] Resource not found: 
org.apache.kylin.metadata.datatype.BigDecimalSerializerTest
[WARNING] Resource not found: 
org.apache.kylin.cube.model.validation.rule.DictionaryRuleTest
[WARNING] Resource not found: org.apache.kylin.rest.service.CubeServiceTest
[WARNING] Resource not found: org.apache.kylin.cube.AggregationGroupRuleTest
[WARNING] Resource not found: org.apache.kylin.common.util.RandomSamplerTest
[WARNING] Resource not found: 
org.apache.kylin.rest.controller.CubeControllerTest
[WARNING] Resource not found: org.apache.kylin.jdbc.DriverTest
[WARNING] Resource not found: 
org.apache.kylin.engine.mr.steps.NumberDictionaryForestTest
[WARNING] Resource not found: org.apache.kylin.cube.CubeSegmentsTest
[WARNING] Resource not found: org.apache.kylin.cube.cuboid.CuboidTest
[WARNING] Resource not found: 
org.apache.kylin.engine.mr.steps.MergeCuboidMapperTest
[WARNING] Resource not found: 
org.apache.kylin.rest.controller.BaseControllerTest
[WARNING] Resource not found: 
org.apache.kylin.storage.hbase.steps.RangeKeyDistributionReducerTest
[WARNING] Resource not found: org.apache.kylin.gridtable.SimpleGridTableTest
[WARNING] Resource not found: org.apache.kylin.rest.bean.BeanTest
[WARNING] Resource not found: 
org.apache.kylin.rest.controller.AccessControllerTest
[WARNING] Resource not found: org.apache.kylin.common.util.CacheBuilderTest
[WARNING] Resource not found: org.apache.kylin.dict.TrieDictionaryForestTest
[WARNING] Resource not found: org.apache.kylin.common.KylinConfigTest
[WARNING] Resource not found: 
org.apache.kylin.storage.hbase.cube.MeasureTypeOnlyAggrInBaseTest
[WARNING] Resource not found: 
org.apache.kylin.rest.security.PasswordPlaceHolderConfigurerTest
[WARNING] Resource not found: org.apache.kylin.cube.inmemcubing.MemDiskStoreTest
[WARNING] Resource not found: 
org.apache.kylin.storage.hbase.common.FuzzyValueCombinationTest
[WARNING] Resource not found: org.apache.kylin.storage.cache.EhcacheTest
[WARNING] Resource not found: 
org.apache.kylin.measure.hllc.NewHyperLogLogBenchmarkTest
[WARNING] Resource not found: org.apache.kylin.cube.CubeManagerTest
[WARNING] Resource not found: 
org.apache.kylin.measure.topn.TopNCounterSerializerTest
[WARNING] Resource not found: org.apache.kylin.rest.service.UserServiceTest
[WARNING] Resource not found: org.apache.kylin.rest.service.CacheServiceTest
[WARNING] Resource not found: 
org.apache.kylin.source.hive.cardinality.ColumnCardinalityReducerTest
[WARNING] Resource not found: org.apache.kylin.dimension.FixedLenHexDimEncTest
[WARNING] Resource not found: org.apache.kylin.rest.util.QueryUtilTest
[WARNING] Resource not found: org.apache.kylin.job.BasicLocalMetaTest
[WARNING] Resource not found: 
org.apache.kylin.metadata.tuple.EmptyTupleIteratorTest
[WARNING] Resource not found: 
org.apache.kylin.dict.MultipleDictionaryValueEnumeratorTest
[WARNING] Resource not found: 
org.apache.kylin.metadata.badquery.BadQueryHistoryManagerTest
[WARNING] Resource not found: org.apache.kylin.common.util.SSHClientTest
[WARNING] Resource not found: 
org.apache.kylin.engine.mr.steps.MergeCuboidJobTest
[WARNING] Resource not found: org.apache.kylin.job.DeployLocalMetaToRemoteTest
[WARNING] Resource not found: org.apache.kylin.common.restclient.RestClientTest
[WARNING] Resource not found: 
org.apache.kylin.storage.gtrecord.SortedIteratorMergerWithLimitTest
[WARNING] Resource not found: 

Build failed in Jenkins: Kylin-SonarQube #15

2016-12-28 Thread Apache Jenkins Server
See 

--
Started by user billyliu
[EnvInject] - Loading node environment variables.
Building remotely on H18 (ubuntu) in workspace 

Cloning the remote Git repository
Cloning repository https://git-wip-us.apache.org/repos/asf/kylin.git
 > git init  # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 1a190ecfcaad88e2551c5aff3bd4938719ba46a6 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 1a190ecfcaad88e2551c5aff3bd4938719ba46a6
 > git rev-list 1a190ecfcaad88e2551c5aff3bd4938719ba46a6 # timeout=10
Injecting SonarQube environment variables using the configuration: ASF Sonar 
Analysis
Unpacking 
https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8/sonar-scanner-cli-2.8.zip
 to 
/home/jenkins/jenkins-slave/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner_2.8
 on H18
ERROR: Failed to parse POMs
java.io.IOException: Remote call on H18 failed
at hudson.remoting.Channel.call(Channel.java:789)
at 
hudson.plugins.sonar.SonarRunnerInstallation.getExecutable(SonarRunnerInstallation.java:74)
at 
hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:278)
at 
hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:259)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:671)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.ClassFormatError: Failed to load 
hudson.plugins.sonar.SonarRunnerInstallation$1
at 
hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:340)
at 
hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:278)
at 
hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:114)
at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
at hudson.remoting.UserRequest.perform(UserRequest.java:131)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ..remote call to H18(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at 

Build failed in Jenkins: Kylin-Master-SonarQube #14

2016-12-28 Thread Apache Jenkins Server
See 

Changes:

[liyang] KYLIN-2330 fix CubeDesc returning redundant DeriveInfo

--
Started by upstream project "Kylin-Master-JDK-1.7" build number 14
originally caused by:
 Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H18 (ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 1a190ecfcaad88e2551c5aff3bd4938719ba46a6 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 1a190ecfcaad88e2551c5aff3bd4938719ba46a6
 > git rev-list fdecf0937802a2d17418595e6c0543c9668ac8a4 # timeout=10
Injecting SonarQube environment variables using the configuration: ASF Sonar 
Analysis
Parsing POMs
Established TCP socket on 38795
maven32-agent.jar already up to date
maven32-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[Kylin-Master-SonarQube] $ /home/jenkins/tools/java/latest1.7/bin/java -Xmx2g 
-Xms256m -XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven32-agent.jar:/home/jenkins/tools/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/jenkins/tools/maven/latest3/conf/logging
 jenkins.maven3.agent.Maven32Main /home/jenkins/tools/maven/latest3/ 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven32-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 38795
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/1 clean 
compile
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Kylin
[INFO] Apache Kylin - Calcite Overrides
[INFO] Apache Kylin - Core Common
[INFO] Apache Kylin - Core Metadata
[INFO] Apache Kylin - Core Dictionary
[INFO] Apache Kylin - Core Cube
[INFO] Apache Kylin - Core Job
[INFO] Apache Kylin - Core Storage
[INFO] Apache Kylin - MapReduce Engine
[INFO] Apache Kylin - HBase Storage
[INFO] Apache Kylin - Spark Engine
[INFO] Apache Kylin - Hive Source
[INFO] Apache Kylin - Kafka Source
[INFO] Apache Kylin - Query
[INFO] Apache Kylin - Tool
[INFO] Apache Kylin - REST Server Base
[INFO] Apache Kylin - REST Server
[INFO] Apache Kylin - JDBC Driver
[INFO] Apache Kylin - Assembly
[INFO] Apache Kylin - Integration Test
[INFO] Apache Kylin - Tomcat Extension
[INFO] 
[INFO] 
[INFO] Building Apache Kylin 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin ---
[INFO] Deleting 
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ kylin ---
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files 

kylin git commit: KYLIN-2330 fix CubeDesc returning redundant DeriveInfo

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/master fdecf0937 -> 1a190ecfc


KYLIN-2330 fix CubeDesc returning redundant DeriveInfo


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

Branch: refs/heads/master
Commit: 1a190ecfcaad88e2551c5aff3bd4938719ba46a6
Parents: fdecf09
Author: Yang Li 
Authored: Thu Dec 29 07:13:12 2016 +0800
Committer: Yang Li 
Committed: Thu Dec 29 07:31:17 2016 +0800

--
 .../org/apache/kylin/common/QueryContext.java   |  2 +-
 .../org/apache/kylin/cube/model/CubeDesc.java   | 46 +++-
 .../org/apache/kylin/cube/CubeDescTest.java | 45 ++-
 .../test_case_data/localmeta/cube_desc/ssb.json | 12 -
 4 files changed, 91 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/1a190ecf/core-common/src/main/java/org/apache/kylin/common/QueryContext.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/QueryContext.java 
b/core-common/src/main/java/org/apache/kylin/common/QueryContext.java
index ef0cb14..93b8556 100644
--- a/core-common/src/main/java/org/apache/kylin/common/QueryContext.java
+++ b/core-common/src/main/java/org/apache/kylin/common/QueryContext.java
@@ -23,7 +23,7 @@ import java.util.Map;
 import com.google.common.collect.Maps;
 
 /**
- * checkout {@link org.apache.kylin.common.debug.BackdoorToggles} for 
comparision
+ * checkout {@link org.apache.kylin.common.debug.BackdoorToggles} for 
comparison
  */
 public class QueryContext {
 private static final ThreadLocal> _queryContext = new 
ThreadLocal>();

http://git-wip-us.apache.org/repos/asf/kylin/blob/1a190ecf/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 3b8d034..4686a15 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
@@ -807,25 +807,49 @@ public class CubeDesc extends RootPersistentEntity 
implements IEngineAware {
 for (int i = 0; i < derivedCols.length; i++) {
 if (ArrayUtils.contains(hostCols, derivedCols[i])) {
 derivedCols = (TblColRef[]) ArrayUtils.remove(derivedCols, i);
-extra = (String[]) ArrayUtils.remove(extra, i);
+if (extra != null)
+extra = (String[]) ArrayUtils.remove(extra, i);
 i--;
 }
 }
+
+if (derivedCols.length == 0)
+return;
 
-Map toHostMap = derivedToHostMap;
-Map hostToMap = hostToDerivedMap;
+for (int i = 0; i < derivedCols.length; i++) {
+TblColRef derivedCol = derivedCols[i];
+boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
+derivedToHostMap.put(derivedCol, new DeriveInfo(type, join, 
hostCols, isOneToOne));
+}
 
 Array hostColArray = new Array(hostCols);
-List infoList = hostToMap.get(hostColArray);
+List infoList = hostToDerivedMap.get(hostColArray);
 if (infoList == null) {
-hostToMap.put(hostColArray, infoList = new 
ArrayList());
+hostToDerivedMap.put(hostColArray, infoList = new 
ArrayList());
 }
-infoList.add(new DeriveInfo(type, join, derivedCols, false));
-
-for (int i = 0; i < derivedCols.length; i++) {
-TblColRef derivedCol = derivedCols[i];
-boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
-toHostMap.put(derivedCol, new DeriveInfo(type, join, hostCols, 
isOneToOne));
+
+// Merged duplicated derived column
+List whatsLeft = new ArrayList<>();
+for (TblColRef derCol : derivedCols) {
+boolean merged = false;
+for (DeriveInfo existing : infoList) {
+if (existing.type == type && 
existing.join.getPKSide().equals(join.getPKSide())) {
+if (ArrayUtils.contains(existing.columns, derCol)) {
+merged = true;
+break;
+}
+if (type == DeriveType.LOOKUP) {
+

Build failed in Jenkins: Kylin-Master-SonarQube #13

2016-12-28 Thread Apache Jenkins Server
See 

--
Started by upstream project "Kylin-Master-JDK-1.7" build number 13
originally caused by:
 Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-4 (ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision fdecf0937802a2d17418595e6c0543c9668ac8a4 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fdecf0937802a2d17418595e6c0543c9668ac8a4
 > git rev-list fdecf0937802a2d17418595e6c0543c9668ac8a4 # timeout=10
Injecting SonarQube environment variables using the configuration: ASF Sonar 
Analysis
Parsing POMs
Established TCP socket on 37041
maven32-agent.jar already up to date
maven32-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[Kylin-Master-SonarQube] $ /home/jenkins/tools/java/latest1.7/bin/java -Xmx2g 
-Xms256m -XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven32-agent.jar:/home/jenkins/tools/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/jenkins/tools/maven/latest3/conf/logging
 jenkins.maven3.agent.Maven32Main /home/jenkins/tools/maven/latest3/ 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven32-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 37041
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/0 clean 
compile
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Kylin
[INFO] Apache Kylin - Calcite Overrides
[INFO] Apache Kylin - Core Common
[INFO] Apache Kylin - Core Metadata
[INFO] Apache Kylin - Core Dictionary
[INFO] Apache Kylin - Core Cube
[INFO] Apache Kylin - Core Job
[INFO] Apache Kylin - Core Storage
[INFO] Apache Kylin - MapReduce Engine
[INFO] Apache Kylin - HBase Storage
[INFO] Apache Kylin - Spark Engine
[INFO] Apache Kylin - Hive Source
[INFO] Apache Kylin - Kafka Source
[INFO] Apache Kylin - Query
[INFO] Apache Kylin - Tool
[INFO] Apache Kylin - REST Server Base
[INFO] Apache Kylin - REST Server
[INFO] Apache Kylin - JDBC Driver
[INFO] Apache Kylin - Assembly
[INFO] Apache Kylin - Integration Test
[INFO] Apache Kylin - Tomcat Extension
[INFO] 
[INFO] 
[INFO] Building Apache Kylin 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin ---
[INFO] Deleting 
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ kylin ---
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to 

kylin git commit: KYLIN-2330 fix CubeDesc returning redundant DeriveInfo

2016-12-28 Thread liyang
Repository: kylin
Updated Branches:
  refs/heads/yang22 17e323eed -> 4d35edd7b


KYLIN-2330 fix CubeDesc returning redundant DeriveInfo


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

Branch: refs/heads/yang22
Commit: 4d35edd7b47af65e706465a7fe7c9f7ddd83fd9d
Parents: 17e323e
Author: Yang Li 
Authored: Thu Dec 29 07:13:12 2016 +0800
Committer: Yang Li 
Committed: Thu Dec 29 07:13:24 2016 +0800

--
 .../org/apache/kylin/cube/model/CubeDesc.java   | 46 +
 .../org/apache/kylin/cube/CubeDescTest.java | 53 ++--
 .../test_case_data/localmeta/cube_desc/ssb.json | 12 -
 3 files changed, 95 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/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 853571c..219435e 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
@@ -789,25 +789,49 @@ public class CubeDesc extends RootPersistentEntity 
implements IEngineAware {
 for (int i = 0; i < derivedCols.length; i++) {
 if (ArrayUtils.contains(hostCols, derivedCols[i])) {
 derivedCols = (TblColRef[]) ArrayUtils.remove(derivedCols, i);
-extra = (String[]) ArrayUtils.remove(extra, i);
+if (extra != null)
+extra = (String[]) ArrayUtils.remove(extra, i);
 i--;
 }
 }
+
+if (derivedCols.length == 0)
+return;
 
-Map toHostMap = derivedToHostMap;
-Map hostToMap = hostToDerivedMap;
+for (int i = 0; i < derivedCols.length; i++) {
+TblColRef derivedCol = derivedCols[i];
+boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
+derivedToHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+}
 
 Array hostColArray = new Array(hostCols);
-List infoList = hostToMap.get(hostColArray);
+List infoList = hostToDerivedMap.get(hostColArray);
 if (infoList == null) {
-hostToMap.put(hostColArray, infoList = new 
ArrayList());
+hostToDerivedMap.put(hostColArray, infoList = new 
ArrayList());
 }
-infoList.add(new DeriveInfo(type, dimension, derivedCols, false));
-
-for (int i = 0; i < derivedCols.length; i++) {
-TblColRef derivedCol = derivedCols[i];
-boolean isOneToOne = type == DeriveType.PK_FK || 
ArrayUtils.contains(hostCols, derivedCol) || (extra != null && 
extra[i].contains("1-1"));
-toHostMap.put(derivedCol, new DeriveInfo(type, dimension, 
hostCols, isOneToOne));
+
+// Merged duplicated derived column
+List whatsLeft = new ArrayList<>();
+for (TblColRef derCol : derivedCols) {
+boolean merged = false;
+for (DeriveInfo existing : infoList) {
+if (existing.type == type && 
existing.dimension.getTableRef().equals(dimension.getTableRef())) {
+if (ArrayUtils.contains(existing.columns, derCol)) {
+merged = true;
+break;
+}
+if (type == DeriveType.LOOKUP) {
+existing.columns = (TblColRef[]) 
ArrayUtils.add(existing.columns, derCol);
+merged = true;
+break;
+}
+}
+}
+if (!merged)
+whatsLeft.add(derCol);
+}
+if (whatsLeft.size() > 0) {
+infoList.add(new DeriveInfo(type, dimension, (TblColRef[]) 
whatsLeft.toArray(new TblColRef[whatsLeft.size()]), false));
 }
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4d35edd7/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
--
diff --git a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java 
b/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
index 27c154b..c192da0 100644
--- a/core-cube/src/test/java/org/apache/kylin/cube/CubeDescTest.java
+++ 

Build failed in Jenkins: Kylin-Master-SonarQube #12

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 64 lines...]
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to 

[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Common 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-core-common ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-core-common 
---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-core-common ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-core-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-core-common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 73 source files to 

[WARNING] 
:[44,15]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1033,25]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1041,29]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1045,38]
 Unsafe is internal proprietary API and may be removed in a future release
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Metadata 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-core-metadata 
---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ 
kylin-core-metadata ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-core-metadata ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-core-metadata ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-core-metadata ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 167 source files to 

[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Dictionary 

Build failed in Jenkins: Kylin-Master-SonarQube #11

2016-12-28 Thread Apache Jenkins Server
See 

--
Started by upstream project "Kylin-Master-JDK-1.7" build number 11
originally caused by:
 Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H18 (ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision fdecf0937802a2d17418595e6c0543c9668ac8a4 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fdecf0937802a2d17418595e6c0543c9668ac8a4
 > git rev-list fdecf0937802a2d17418595e6c0543c9668ac8a4 # timeout=10
Injecting SonarQube environment variables using the configuration: ASF Sonar 
Analysis
Parsing POMs
Established TCP socket on 46845
maven32-agent.jar already up to date
maven32-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[Kylin-Master-SonarQube] $ /home/jenkins/tools/java/latest1.7/bin/java -Xmx2g 
-Xms256m -XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven32-agent.jar:/home/jenkins/tools/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/jenkins/tools/maven/latest3/conf/logging
 jenkins.maven3.agent.Maven32Main /home/jenkins/tools/maven/latest3/ 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven32-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 46845
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/1 clean 
compile
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Kylin
[INFO] Apache Kylin - Calcite Overrides
[INFO] Apache Kylin - Core Common
[INFO] Apache Kylin - Core Metadata
[INFO] Apache Kylin - Core Dictionary
[INFO] Apache Kylin - Core Cube
[INFO] Apache Kylin - Core Job
[INFO] Apache Kylin - Core Storage
[INFO] Apache Kylin - MapReduce Engine
[INFO] Apache Kylin - HBase Storage
[INFO] Apache Kylin - Spark Engine
[INFO] Apache Kylin - Hive Source
[INFO] Apache Kylin - Kafka Source
[INFO] Apache Kylin - Query
[INFO] Apache Kylin - Tool
[INFO] Apache Kylin - REST Server Base
[INFO] Apache Kylin - REST Server
[INFO] Apache Kylin - JDBC Driver
[INFO] Apache Kylin - Assembly
[INFO] Apache Kylin - Integration Test
[INFO] Apache Kylin - Tomcat Extension
[INFO] 
[INFO] 
[INFO] Building Apache Kylin 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin ---
[INFO] Deleting 
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ kylin ---
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to 

Jenkins build is back to stable : Kylin-Master-JDK-1.7 #11

2016-12-28 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Kylin-Master-SonarQube #10

2016-12-28 Thread Apache Jenkins Server
See 

--
Started by upstream project "Kylin-Master-JDK-1.7" build number 10
originally caused by:
 Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-4 (ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision fdecf0937802a2d17418595e6c0543c9668ac8a4 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fdecf0937802a2d17418595e6c0543c9668ac8a4
 > git rev-list fdecf0937802a2d17418595e6c0543c9668ac8a4 # timeout=10
Injecting SonarQube environment variables using the configuration: ASF Sonar 
Analysis
Parsing POMs
Established TCP socket on 60731
maven32-agent.jar already up to date
maven32-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[Kylin-Master-SonarQube] $ /home/jenkins/tools/java/latest1.7/bin/java -Xmx2g 
-Xms256m -XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven32-agent.jar:/home/jenkins/tools/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/jenkins/tools/maven/latest3/conf/logging
 jenkins.maven3.agent.Maven32Main /home/jenkins/tools/maven/latest3/ 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven32-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 60731
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/0 clean 
compile
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Kylin
[INFO] Apache Kylin - Calcite Overrides
[INFO] Apache Kylin - Core Common
[INFO] Apache Kylin - Core Metadata
[INFO] Apache Kylin - Core Dictionary
[INFO] Apache Kylin - Core Cube
[INFO] Apache Kylin - Core Job
[INFO] Apache Kylin - Core Storage
[INFO] Apache Kylin - MapReduce Engine
[INFO] Apache Kylin - HBase Storage
[INFO] Apache Kylin - Spark Engine
[INFO] Apache Kylin - Hive Source
[INFO] Apache Kylin - Kafka Source
[INFO] Apache Kylin - Query
[INFO] Apache Kylin - Tool
[INFO] Apache Kylin - REST Server Base
[INFO] Apache Kylin - REST Server
[INFO] Apache Kylin - JDBC Driver
[INFO] Apache Kylin - Assembly
[INFO] Apache Kylin - Integration Test
[INFO] Apache Kylin - Tomcat Extension
[INFO] 
[INFO] 
[INFO] Building Apache Kylin 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin ---
[INFO] Deleting 
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ kylin ---
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to 

Jenkins build became unstable: Kylin-Master-JDK-1.7 #10

2016-12-28 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Kylin-Master-SonarQube #9

2016-12-28 Thread Apache Jenkins Server
See 

--
Started by upstream project "Kylin-Master-JDK-1.7" build number 9
originally caused by:
 Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-4 (ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision fdecf0937802a2d17418595e6c0543c9668ac8a4 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fdecf0937802a2d17418595e6c0543c9668ac8a4
 > git rev-list fdecf0937802a2d17418595e6c0543c9668ac8a4 # timeout=10
Injecting SonarQube environment variables using the configuration: ASF Sonar 
Analysis
Parsing POMs
Established TCP socket on 53577
maven32-agent.jar already up to date
maven32-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[Kylin-Master-SonarQube] $ /home/jenkins/tools/java/latest1.7/bin/java -Xmx2g 
-Xms256m -XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven32-agent.jar:/home/jenkins/tools/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/jenkins/tools/maven/latest3/conf/logging
 jenkins.maven3.agent.Maven32Main /home/jenkins/tools/maven/latest3/ 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven32-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 53577
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/0 clean 
compile
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Kylin
[INFO] Apache Kylin - Calcite Overrides
[INFO] Apache Kylin - Core Common
[INFO] Apache Kylin - Core Metadata
[INFO] Apache Kylin - Core Dictionary
[INFO] Apache Kylin - Core Cube
[INFO] Apache Kylin - Core Job
[INFO] Apache Kylin - Core Storage
[INFO] Apache Kylin - MapReduce Engine
[INFO] Apache Kylin - HBase Storage
[INFO] Apache Kylin - Spark Engine
[INFO] Apache Kylin - Hive Source
[INFO] Apache Kylin - Kafka Source
[INFO] Apache Kylin - Query
[INFO] Apache Kylin - Tool
[INFO] Apache Kylin - REST Server Base
[INFO] Apache Kylin - REST Server
[INFO] Apache Kylin - JDBC Driver
[INFO] Apache Kylin - Assembly
[INFO] Apache Kylin - Integration Test
[INFO] Apache Kylin - Tomcat Extension
[INFO] 
[INFO] 
[INFO] Building Apache Kylin 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin ---
[INFO] Deleting 
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ kylin ---
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to 

Jenkins build is back to stable : Kylin-Master-JDK-1.7 #9

2016-12-28 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Kylin-Master-SonarQube #8

2016-12-28 Thread Apache Jenkins Server
See 

--
Started by upstream project "Kylin-Master-JDK-1.7" build number 8
originally caused by:
 Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-4 (ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/kylin.git # timeout=10
Fetching upstream changes from https://git-wip-us.apache.org/repos/asf/kylin.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/kylin.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision fdecf0937802a2d17418595e6c0543c9668ac8a4 
(refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fdecf0937802a2d17418595e6c0543c9668ac8a4
 > git rev-list fdecf0937802a2d17418595e6c0543c9668ac8a4 # timeout=10
Injecting SonarQube environment variables using the configuration: ASF Sonar 
Analysis
Parsing POMs
Established TCP socket on 34874
maven32-agent.jar already up to date
maven32-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[Kylin-Master-SonarQube] $ /home/jenkins/tools/java/latest1.7/bin/java -Xmx2g 
-Xms256m -XX:MaxPermSize=512m -cp 
/home/jenkins/jenkins-slave/maven32-agent.jar:/home/jenkins/tools/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/jenkins/tools/maven/latest3/conf/logging
 jenkins.maven3.agent.Maven32Main /home/jenkins/tools/maven/latest3/ 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven32-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 34874
<===[JENKINS REMOTING CAPACITY]===>   channel started
Executing Maven:  -B -f 
 
-Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/0 clean 
compile
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Kylin
[INFO] Apache Kylin - Calcite Overrides
[INFO] Apache Kylin - Core Common
[INFO] Apache Kylin - Core Metadata
[INFO] Apache Kylin - Core Dictionary
[INFO] Apache Kylin - Core Cube
[INFO] Apache Kylin - Core Job
[INFO] Apache Kylin - Core Storage
[INFO] Apache Kylin - MapReduce Engine
[INFO] Apache Kylin - HBase Storage
[INFO] Apache Kylin - Spark Engine
[INFO] Apache Kylin - Hive Source
[INFO] Apache Kylin - Kafka Source
[INFO] Apache Kylin - Query
[INFO] Apache Kylin - Tool
[INFO] Apache Kylin - REST Server Base
[INFO] Apache Kylin - REST Server
[INFO] Apache Kylin - JDBC Driver
[INFO] Apache Kylin - Assembly
[INFO] Apache Kylin - Integration Test
[INFO] Apache Kylin - Tomcat Extension
[INFO] 
[INFO] 
[INFO] Building Apache Kylin 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin ---
[INFO] Deleting 
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ kylin ---
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/calcite/calcite-core/1.10.0/calcite-core-1.10.0.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/calcite/calcite-core/1.10.0/calcite-core-1.10.0.pom
 (16 KB at 102.8 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/calcite/calcite/1.10.0/calcite-1.10.0.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/calcite/calcite/1.10.0/calcite-1.10.0.pom
 (36 KB at 1540.5 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.2.4/jackson-databind-2.2.4.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.2.4/jackson-databind-2.2.4.pom
 (6 KB at 160.2 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.2.4/jackson-annotations-2.2.4.pom
[INFO] 

Jenkins build became unstable: Kylin-Master-JDK-1.7 #8

2016-12-28 Thread Apache Jenkins Server
See 



Jenkins build is back to normal : Kylin-Master-SonarQube #7

2016-12-28 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Kylin-Master-SonarQube #6

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 63 lines...]
[INFO] 
[INFO] Building Apache Kylin - Calcite Overrides 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to 

[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Common 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-core-common ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-core-common 
---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-core-common ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-core-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-core-common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 73 source files to 

[WARNING] 
:[44,15]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1033,25]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1041,29]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1045,38]
 Unsafe is internal proprietary API and may be removed in a future release
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Metadata 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-core-metadata 
---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ 
kylin-core-metadata ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-core-metadata ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-core-metadata ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-core-metadata ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 167 source files to 

[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Dictionary 1.6.1-SNAPSHOT
[INFO] 

Build failed in Jenkins: Kylin-Master-SonarQube #5

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 250 lines...]
[INFO] Downloading: 
http://repository.apache.org/snapshots/org/apache/kylin/kylin-core-storage/1.6.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: 
http://conjars.org/repo/org/apache/kylin/kylin-core-storage/1.6.1-SNAPSHOT/kylin-core-storage-1.6.1-SNAPSHOT-tests.jar
[INFO] Downloading: 
http://repository.apache.org/snapshots/org/apache/kylin/kylin-core-storage/1.6.1-SNAPSHOT/kylin-core-storage-1.6.1-SNAPSHOT-tests.jar
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Spark Engine
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Hive Source 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-source-hive ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-source-hive 
---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-source-hive ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-source-hive ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-source-hive ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 18 source files to 

[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Kafka Source 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-source-kafka ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ 
kylin-source-kafka ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-source-kafka ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-source-kafka ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-source-kafka ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 23 source files to 

[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Query
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Tool
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - REST Server Base
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - REST Server
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO]  

Build failed in Jenkins: Kylin-Master-SonarQube #4

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 604 lines...]
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/101tec/zkclient/0.9/zkclient-0.9.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar
 (65 KB at 3606.2 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/101tec/zkclient/0.9/zkclient-0.9.jar 
(73 KB at 4051.9 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/kafka/kafka-clients/0.10.1.0/kafka-clients-0.10.1.0.jar
 (781 KB at 22947.4 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/kafka/kafka_2.10/0.10.1.0/kafka_2.10-0.10.1.0.jar
 (5392 KB at 25797.0 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-source-kafka ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ 
kylin-source-kafka ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-source-kafka ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-source-kafka ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-source-kafka ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 23 source files to 

[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Query
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Tool
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - REST Server Base
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - REST Server
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - JDBC Driver 1.6.1-SNAPSHOT
[INFO] 
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.0.0-beta-1/protobuf-java-3.0.0-beta-1.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.0.0-beta-1/protobuf-java-3.0.0-beta-1.pom
 (15 KB at 917.8 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.0.0-beta-1/protobuf-java-3.0.0-beta-1.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.0.0-beta-1/protobuf-java-3.0.0-beta-1.jar
 (994 KB at 21136.4 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-jdbc ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-jdbc ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ kylin-jdbc ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-jdbc ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ kylin-jdbc 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to 

[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Assembly
[INFO] This project 

Jenkins build is back to normal : Kylin-Master-JDK-1.7 #4

2016-12-28 Thread Apache Jenkins Server
See 



Jenkins build is back to normal : Kylin-Master-JDK-1.8 #3

2016-12-28 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Kylin-Master-JDK-1.8 #2

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 38021 lines...]
Time elapsed: 0 sec - in org.apache.kylin.provision.BuildCubeWithEngine
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit 
value: 1)
at 
org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at 
org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at 
org.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Tomcat Extension 1.6.1-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-tomcat-ext ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-tomcat-ext 
---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-tomcat-ext ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-tomcat-ext ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-tomcat-ext ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to 

[INFO] 
[INFO] --- maven-dependency-plugin:2.10:copy (copy-jamm) @ kylin-tomcat-ext ---
[INFO] Configured Artifact: com.github.jbellis:jamm:?:jar
[INFO] Copying jamm-0.3.1.jar to 

Build failed in Jenkins: Kylin-Master-JDK-1.8 #1

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 38280 lines...]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Tomcat Extension 1.6.1-SNAPSHOT
[INFO] 
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-tomcat-ext ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-tomcat-ext 
---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-tomcat-ext ---
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-tomcat-ext ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-tomcat-ext ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to 

[INFO] 
[INFO] --- maven-dependency-plugin:2.10:copy (copy-jamm) @ kylin-tomcat-ext ---
[INFO] Configured Artifact: com.github.jbellis:jamm:?:jar
[INFO] Copying jamm-0.3.1.jar to 

Build failed in Jenkins: Kylin-Master-JDK-1.7 #3

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 38985 lines...]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Tomcat Extension 1.6.1-SNAPSHOT
[INFO] 
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.jar
 (0 B at 0.0 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-tomcat-ext ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-tomcat-ext 
---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-tomcat-ext ---
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-catalina/7.0.69/tomcat-catalina-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-servlet-api/7.0.69/tomcat-servlet-api-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-juli/7.0.69/tomcat-juli-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-annotations-api/7.0.69/tomcat-annotations-api-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-api/7.0.69/tomcat-api-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat-util/7.0.69/tomcat-util-7.0.69.pom
 (0 B at 0.0 KB/sec)
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-tomcat-ext ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-tomcat-ext ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to 

[INFO] 
[INFO] --- maven-dependency-plugin:2.10:copy (copy-jamm) @ kylin-tomcat-ext ---
[INFO] Configured Artifact: com.github.jbellis:jamm:?:jar
[INFO] 

Build failed in Jenkins: Apache Kylin » Apache Kylin - Core Common #2

2016-12-28 Thread Apache Jenkins Server
See 


--
[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Common 1.6.1-SNAPSHOT
[INFO] 
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.pom
 (5 KB at 233.2 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/sun/mail/all/1.5.2/all-1.5.2.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/sun/mail/all/1.5.2/all-1.5.2.pom (20 KB 
at 1127.9 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.2.4/jackson-annotations-2.2.4.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.2.4/jackson-core-2.2.4.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.2.4/jackson-annotations-2.2.4.jar
 (34 KB at 1769.9 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.2.4/jackson-core-2.2.4.jar
 (191 KB at 7040.7 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar
 (558 KB at 11382.0 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-core-common ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-core-common 
---
[INFO] Starting audit...
Audit done.
[CHECKSTYLE] Parsing file 

[CHECKSTYLE] Successfully parsed file 

 of module Apache Kylin - Core Common with 0 unique warnings and 0 duplicates.
[PMD] No report found for mojo check
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-core-common ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-core-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-core-common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 73 source files to 

[WARNING] 
:[44,15]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1033,25]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1041,29]
 Unsafe is internal proprietary API and may be removed in a future release
[WARNING] 
:[1045,38]
 Unsafe is internal proprietary API and may be removed in a future release
[INFO] 
[INFO] --- maven-dependency-plugin:2.10:copy (copy-jamm) @ kylin-core-common ---
[INFO] Configured Artifact: com.github.jbellis:jamm:?:jar
[INFO] Copying jamm-0.3.1.jar to 

[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ 
kylin-core-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ 
kylin-core-common ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 26 source files to 

[WARNING] 

Build failed in Jenkins: Apache Kylin #2

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 444 lines...]
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-tomcat-ext ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
kylin-tomcat-ext ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ 
kylin-tomcat-ext ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to 

[INFO] 
[INFO] --- maven-dependency-plugin:2.10:copy (copy-jamm) @ kylin-tomcat-ext ---
[INFO] Configured Artifact: com.github.jbellis:jamm:?:jar
[INFO] Copying jamm-0.3.1.jar to 

[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ 
kylin-tomcat-ext ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ 
kylin-tomcat-ext ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ kylin-tomcat-ext 
---
[JENKINS] Recording test results
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ kylin-tomcat-ext ---
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ 
kylin-tomcat-ext ---
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:test-jar (default) @ kylin-tomcat-ext ---
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ 
kylin-tomcat-ext ---
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/kylin/kylin-tomcat-ext/1.6.1-SNAPSHOT/kylin-tomcat-ext-1.6.1-SNAPSHOT.jar
[INFO] Installing 
 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/kylin/kylin-tomcat-ext/1.6.1-SNAPSHOT/kylin-tomcat-ext-1.6.1-SNAPSHOT.pom
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/1/org/apache/kylin/kylin-tomcat-ext/1.6.1-SNAPSHOT/kylin-tomcat-ext-1.6.1-SNAPSHOT-tests.jar
[INFO] 
[INFO] >>> maven-source-plugin:3.0.1:jar (default-cli) > generate-sources @ 
kylin-tomcat-ext >>>
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-tomcat-ext 
---
[INFO] Starting audit...
Audit done.
[PMD] No report found for mojo check[WARNING] Failed to getClass for 
org.apache.maven.plugins.source.SourceJarMojo

[INFO] 
[INFO] <<< maven-source-plugin:3.0.1:jar (default-cli) < generate-sources @ 
kylin-tomcat-ext <<<
[INFO] 
[INFO] --- maven-source-plugin:3.0.1:jar (default-cli) @ kylin-tomcat-ext ---
[INFO] Building jar: 

[INFO] 
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Kylin ... SUCCESS [ 12.942 s]
[INFO] Apache Kylin - Calcite Overrides ... SUCCESS [  9.721 s]
[INFO] Apache Kylin - Core Common . FAILURE [  7.425 s]
[INFO] Apache Kylin - Core Metadata ... SKIPPED
[INFO] Apache Kylin - Core Dictionary . SKIPPED
[INFO] Apache Kylin - Core Cube ... SKIPPED
[INFO] Apache Kylin - Core Job  SKIPPED
[INFO] Apache Kylin - Core Storage  SKIPPED
[INFO] Apache Kylin - MapReduce Engine  SKIPPED
[INFO] Apache Kylin - HBase Storage ... SKIPPED
[INFO] Apache Kylin - Spark Engine  SKIPPED
[INFO] Apache Kylin - Hive Source . SKIPPED
[INFO] Apache Kylin - Kafka Source  SKIPPED
[INFO] Apache Kylin - Query ... SKIPPED
[INFO] Apache Kylin - Tool  SKIPPED
[INFO] Apache Kylin - REST Server Base  SKIPPED
[INFO] Apache Kylin - REST Server 

Build failed in Jenkins: Apache Kylin » Apache Kylin - JDBC Driver #2

2016-12-28 Thread Apache Jenkins Server
See 


--
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Core Metadata
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Core Dictionary
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Core Cube
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Core Job
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Core Storage
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - MapReduce Engine
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - HBase Storage
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Spark Engine
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Hive Source
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Kafka Source
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Query
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - Tool
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin - REST Server Base
[INFO] This project has been banned from the build due to previous failures.
[INFO] 
[INFO] 
[INFO] 
[INFO] Skipping Apache Kylin 

Build failed in Jenkins: Apache Kylin #1

2016-12-28 Thread Apache Jenkins Server
See 

--
[...truncated 146 lines...]
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ atopcalcite ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ atopcalcite ---
[INFO] Starting audit...
Audit done.
[CHECKSTYLE] Parsing file 

[CHECKSTYLE] Successfully parsed file 

 of module Apache Kylin - Calcite Overrides with 0 unique warnings and 0 
duplicates.
[PMD] No report found for mojo check
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ atopcalcite ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ atopcalcite 
---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to 

[INFO] 
[INFO] --- maven-dependency-plugin:2.10:copy (copy-jamm) @ atopcalcite ---
[INFO] Configured Artifact: com.github.jbellis:jamm:?:jar
[INFO] Copying jamm-0.3.1.jar to 

[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ 
atopcalcite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ 
atopcalcite ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ atopcalcite ---
[JENKINS] Recording test results
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ atopcalcite ---
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) @ 
atopcalcite ---
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:test-jar (default) @ atopcalcite ---
[INFO] Building jar: 

[INFO] 
[INFO] 
[INFO] Building Apache Kylin - Core Common 1.6.1-SNAPSHOT
[INFO] 
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.pom
 (5 KB at 220.9 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/sun/mail/all/1.5.2/all-1.5.2.pom
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/sun/mail/all/1.5.2/all-1.5.2.pom (20 KB 
at 1127.9 KB/sec)
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.2.4/jackson-annotations-2.2.4.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.2.4/jackson-core-2.2.4.jar
[INFO] Downloading: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.2.4/jackson-annotations-2.2.4.jar
 (34 KB at 1868.3 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.2.4/jackson-core-2.2.4.jar
 (191 KB at 7311.5 KB/sec)
[INFO] Downloaded: 
http://repo.maven.apache.org/maven2/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar
 (558 KB at 10140.3 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ kylin-core-common ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (check-style) @ kylin-core-common 
---
[INFO] Starting audit...
Audit done.
[CHECKSTYLE] Parsing file 

[CHECKSTYLE] Successfully parsed file 

 of module Apache Kylin - Core Common with 0 unique warnings and 0 duplicates.
[PMD] No report found for mojo check
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
kylin-core-common ---
[INFO] 
[INFO] --- 

kylin git commit: minor, get config by prefix in KylinConfigCLI

2016-12-28 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 08eda7b71 -> fdecf0937


minor, get config by prefix in KylinConfigCLI


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

Branch: refs/heads/master
Commit: fdecf0937802a2d17418595e6c0543c9668ac8a4
Parents: 08eda7b
Author: lidongsjtu 
Authored: Wed Dec 28 22:17:35 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:45:57 2016 +0800

--
 .../test_case_data/localmeta/kylin.properties   |  3 +
 .../org/apache/kylin/tool/KylinConfigCLI.java   | 30 ++--
 .../apache/kylin/tool/KylinConfigCLITest.java   | 73 
 3 files changed, 102 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fdecf093/examples/test_case_data/localmeta/kylin.properties
--
diff --git a/examples/test_case_data/localmeta/kylin.properties 
b/examples/test_case_data/localmeta/kylin.properties
index 1dfac32..f4c6772 100644
--- a/examples/test_case_data/localmeta/kylin.properties
+++ b/examples/test_case_data/localmeta/kylin.properties
@@ -131,3 +131,6 @@ kylin.test.bcc.new.key=some-value
 kylin.engine.mr.config-override.test1=test1
 kylin.engine.mr.config-override.test2=test2
 kylin.job.lock=org.apache.kylin.job.lock.MockJobLock
+
+kylin.engine.provider.0=org.apache.kylin.engine.mr.MRBatchCubingEngine
+kylin.cube.engine.2=org.apache.kylin.engine.mr.MRBatchCubingEngine2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/fdecf093/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java 
b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
index e1a5b99..b740beb 100644
--- a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
@@ -18,11 +18,14 @@
 
 package org.apache.kylin.tool;
 
+import java.util.Map;
 import java.util.Properties;
 
 import org.apache.kylin.common.BackwardCompatibilityConfig;
 import org.apache.kylin.common.KylinConfig;
 
+import com.google.common.collect.Maps;
+
 public class KylinConfigCLI {
 public static void main(String[] args) {
 if (args.length != 1) {
@@ -33,10 +36,29 @@ public class KylinConfigCLI {
 
 Properties config = KylinConfig.getKylinProperties();
 BackwardCompatibilityConfig bcc = new BackwardCompatibilityConfig();
-String value = config.getProperty(bcc.check(args[0]));
-if (value == null) {
-value = "";
+String key = bcc.check(args[0].trim());
+if (!key.endsWith(".")) {
+String value = config.getProperty(key);
+if (value == null) {
+value = "";
+}
+System.out.println(value);
+} else {
+Map props = getPropertiesByPrefix(config, key);
+for (Map.Entry prop : props.entrySet()) {
+System.out.println(prop.getKey() + "=" + prop.getValue());
+}
+}
+}
+
+static private Map getPropertiesByPrefix(Properties props, 
String prefix) {
+Map result = Maps.newLinkedHashMap();
+for (Map.Entry entry : props.entrySet()) {
+String entryKey = (String) entry.getKey();
+if (entryKey.startsWith(prefix)) {
+result.put(entryKey.substring(prefix.length()), (String) 
entry.getValue());
+}
 }
-System.out.println(value);
+return result;
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/fdecf093/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
new file mode 100644
index 000..7d1e248
--- /dev/null
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -0,0 +1,73 @@
+/*
+ * 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 

kylin git commit: minor, fix wrong header

2016-12-28 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang22 6762fae07 -> 17e323eed


minor, fix wrong header


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

Branch: refs/heads/yang22
Commit: 17e323eed9b6b2ef91b1badf230239280ff6d46d
Parents: 6762fae
Author: lidongsjtu 
Authored: Wed Dec 28 22:25:44 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:25:52 2016 +0800

--
 .../apache/kylin/tool/KylinConfigCLITest.java   | 34 
 1 file changed, 14 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/17e323ee/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
index 5c56b5f..7d1e248 100644
--- a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -1,26 +1,20 @@
 /*
- * Copyright (C) 2016 Kyligence Inc. All rights reserved.
+ * 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://kyligence.io
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * This software is the confidential and proprietary information of
- * Kyligence Inc. ("Confidential Information"). You shall not disclose
- * such Confidential Information and shall use it only in accordance
- * with the terms of the license agreement you entered into with
- * Kyligence Inc.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * 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.tool;
 



kylin git commit: minor, get config by prefix in KylinConfigCLI

2016-12-28 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang22 fd1ed2ed2 -> 6762fae07


minor, get config by prefix in KylinConfigCLI


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

Branch: refs/heads/yang22
Commit: 6762fae07f157d762bcafab6996b23dc35c91171
Parents: fd1ed2e
Author: lidongsjtu 
Authored: Wed Dec 28 22:17:35 2016 +0800
Committer: lidongsjtu 
Committed: Wed Dec 28 22:22:26 2016 +0800

--
 .../test_case_data/localmeta/kylin.properties   |  3 +
 .../org/apache/kylin/tool/KylinConfigCLI.java   | 30 +++-
 .../apache/kylin/tool/KylinConfigCLITest.java   | 79 
 3 files changed, 108 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/examples/test_case_data/localmeta/kylin.properties
--
diff --git a/examples/test_case_data/localmeta/kylin.properties 
b/examples/test_case_data/localmeta/kylin.properties
index 1dfac32..f4c6772 100644
--- a/examples/test_case_data/localmeta/kylin.properties
+++ b/examples/test_case_data/localmeta/kylin.properties
@@ -131,3 +131,6 @@ kylin.test.bcc.new.key=some-value
 kylin.engine.mr.config-override.test1=test1
 kylin.engine.mr.config-override.test2=test2
 kylin.job.lock=org.apache.kylin.job.lock.MockJobLock
+
+kylin.engine.provider.0=org.apache.kylin.engine.mr.MRBatchCubingEngine
+kylin.cube.engine.2=org.apache.kylin.engine.mr.MRBatchCubingEngine2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java 
b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
index e1a5b99..b740beb 100644
--- a/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/KylinConfigCLI.java
@@ -18,11 +18,14 @@
 
 package org.apache.kylin.tool;
 
+import java.util.Map;
 import java.util.Properties;
 
 import org.apache.kylin.common.BackwardCompatibilityConfig;
 import org.apache.kylin.common.KylinConfig;
 
+import com.google.common.collect.Maps;
+
 public class KylinConfigCLI {
 public static void main(String[] args) {
 if (args.length != 1) {
@@ -33,10 +36,29 @@ public class KylinConfigCLI {
 
 Properties config = KylinConfig.getKylinProperties();
 BackwardCompatibilityConfig bcc = new BackwardCompatibilityConfig();
-String value = config.getProperty(bcc.check(args[0]));
-if (value == null) {
-value = "";
+String key = bcc.check(args[0].trim());
+if (!key.endsWith(".")) {
+String value = config.getProperty(key);
+if (value == null) {
+value = "";
+}
+System.out.println(value);
+} else {
+Map props = getPropertiesByPrefix(config, key);
+for (Map.Entry prop : props.entrySet()) {
+System.out.println(prop.getKey() + "=" + prop.getValue());
+}
+}
+}
+
+static private Map getPropertiesByPrefix(Properties props, 
String prefix) {
+Map result = Maps.newLinkedHashMap();
+for (Map.Entry entry : props.entrySet()) {
+String entryKey = (String) entry.getKey();
+if (entryKey.startsWith(prefix)) {
+result.put(entryKey.substring(prefix.length()), (String) 
entry.getValue());
+}
 }
-System.out.println(value);
+return result;
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/6762fae0/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
--
diff --git a/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java 
b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
new file mode 100644
index 000..5c56b5f
--- /dev/null
+++ b/tool/src/test/java/org/apache/kylin/tool/KylinConfigCLITest.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2016 Kyligence Inc. All rights reserved.
+ *
+ * http://kyligence.io
+ *
+ * This software is the confidential and proprietary information of
+ * Kyligence Inc. ("Confidential Information"). You shall not disclose
+ * such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with
+ * Kyligence Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE 

[1/2] kylin git commit: KYLIN-2323 Refine Table load/unload

2016-12-28 Thread billyliu
Repository: kylin
Updated Branches:
  refs/heads/KYLIN-2323 [created] 5bd47a1a5


KYLIN-2323 Refine Table load/unload


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

Branch: refs/heads/KYLIN-2323
Commit: f01aad29ec2a3eb7476c545a2e0911eabcd340d5
Parents: 74c2d6b
Author: Billy Liu 
Authored: Tue Dec 27 10:27:53 2016 +0800
Committer: Billy Liu 
Committed: Tue Dec 27 10:27:53 2016 +0800

--
 .../hive/ITHiveSourceTableLoaderTest.java   |   2 +-
 .../rest/controller/StreamingController.java|  22 +-
 .../kylin/rest/controller/TableController.java  | 257 +++
 .../apache/kylin/rest/service/CubeService.java  |  96 --
 .../apache/kylin/rest/service/TableService.java | 317 +++
 .../source/hive/HiveSourceTableLoader.java  |   2 +-
 webapp/app/js/controllers/sourceMeta.js |  16 +-
 webapp/app/js/services/tables.js|   1 -
 8 files changed, 379 insertions(+), 334 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/f01aad29/kylin-it/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
--
diff --git 
a/kylin-it/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
 
b/kylin-it/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
index c4f0777..7aff3ba 100644
--- 
a/kylin-it/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
+++ 
b/kylin-it/src/test/java/org/apache/kylin/source/hive/ITHiveSourceTableLoaderTest.java
@@ -45,7 +45,7 @@ public class ITHiveSourceTableLoaderTest extends 
HBaseMetadataTestCase {
 public void test() throws IOException {
 KylinConfig config = getTestConfig();
 String[] toLoad = new String[] { "DEFAULT.TEST_KYLIN_FACT", 
"EDW.TEST_CAL_DT" };
-Set loaded = HiveSourceTableLoader.reloadHiveTables(toLoad, 
config);
+Set loaded = HiveSourceTableLoader.loadHiveTables(toLoad, 
config);
 
 assertTrue(loaded.size() == toLoad.length);
 for (String str : toLoad)

http://git-wip-us.apache.org/repos/asf/kylin/blob/f01aad29/server-base/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
--
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
 
b/server-base/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
index e04ebc8..0ced9ad 100644
--- 
a/server-base/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
+++ 
b/server-base/src/main/java/org/apache/kylin/rest/controller/StreamingController.java
@@ -23,10 +23,8 @@ import java.util.List;
 import java.util.UUID;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.JsonUtil;
 import org.apache.kylin.engine.mr.HadoopUtil;
-import org.apache.kylin.metadata.MetadataManager;
 import org.apache.kylin.metadata.model.TableDesc;
 import org.apache.kylin.metadata.streaming.StreamingConfig;
 import org.apache.kylin.rest.exception.BadRequestException;
@@ -34,9 +32,9 @@ import org.apache.kylin.rest.exception.ForbiddenException;
 import org.apache.kylin.rest.exception.InternalErrorException;
 import org.apache.kylin.rest.exception.NotFoundException;
 import org.apache.kylin.rest.request.StreamingRequest;
-import org.apache.kylin.rest.service.CubeService;
 import org.apache.kylin.rest.service.KafkaConfigService;
 import org.apache.kylin.rest.service.StreamingService;
+import org.apache.kylin.rest.service.TableService;
 import org.apache.kylin.source.kafka.config.KafkaConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -69,7 +67,7 @@ public class StreamingController extends BasicController {
 @Autowired
 private KafkaConfigService kafkaConfigService;
 @Autowired
-private CubeService cubeMgmtService;
+private TableService tableService;
 
 @RequestMapping(value = "/getConfig", method = { RequestMethod.GET })
 @ResponseBody
@@ -113,10 +111,7 @@ public class StreamingController extends BasicController {
 boolean saveStreamingSuccess = false, saveKafkaSuccess = false;
 
 try {
-tableDesc.setUuid(UUID.randomUUID().toString());
-MetadataManager metaMgr = 
MetadataManager.getInstance(KylinConfig.getInstanceFromEnv());
-metaMgr.saveSourceTable(tableDesc);
-cubeMgmtService.syncTableToProject(new String[] { 
tableDesc.getIdentity() }, project);
+

[2/2] kylin git commit: KYLIN-2323 add unloaded tables

2016-12-28 Thread billyliu
KYLIN-2323 add unloaded tables


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

Branch: refs/heads/KYLIN-2323
Commit: 5bd47a1a532ea7c8c72202e9c708611c08372fcb
Parents: f01aad2
Author: Billy Liu 
Authored: Wed Dec 28 22:20:01 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 22:20:01 2016 +0800

--
 .../kylin/rest/controller/TableController.java | 11 +++
 .../apache/kylin/rest/service/TableService.java| 17 +
 2 files changed, 20 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5bd47a1a/server-base/src/main/java/org/apache/kylin/rest/controller/TableController.java
--
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/controller/TableController.java
 
b/server-base/src/main/java/org/apache/kylin/rest/controller/TableController.java
index 964cd4c..eed5413 100644
--- 
a/server-base/src/main/java/org/apache/kylin/rest/controller/TableController.java
+++ 
b/server-base/src/main/java/org/apache/kylin/rest/controller/TableController.java
@@ -20,6 +20,7 @@ package org.apache.kylin.rest.controller;
 
 import java.io.IOException;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -97,6 +98,16 @@ public class TableController extends BasicController {
 try {
 String[] loaded = tableService.loadHiveTablesToProject(tableNames, 
project);
 result.put("result.loaded", loaded);
+Set allTables = new HashSet();
+for (String tableName : tableNames) {
+allTables.add(tableService.normalizeHiveTableName(tableName));
+}
+for (String loadedTableName : loaded) {
+allTables.remove(loadedTableName);
+}
+String[] unloaded = new String[allTables.size()];
+allTables.toArray(unloaded);
+result.put("result.unloaded", unloaded);
 if (request.isCalculate()) {
 tableService.calculateCardinalityIfNotPresent(loaded, 
submitter);
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/5bd47a1a/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java
--
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java 
b/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java
index 8868bff..461800e 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java
@@ -101,8 +101,7 @@ public class TableService extends BasicService {
 
 @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN)
 private void unLoadHiveTable(String tableName) throws IOException {
-String[] dbTableName = HadoopUtil.parseHiveTableName(tableName);
-tableName = dbTableName[0] + "." + dbTableName[1];
+tableName = normalizeHiveTableName(tableName);
 HiveSourceTableLoader.unLoadHiveTable(tableName.toUpperCase());
 }
 
@@ -113,8 +112,7 @@ public class TableService extends BasicService {
 
 @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN)
 private void removeTableFromProject(String tableName, String projectName) 
throws IOException {
-String[] dbTableName = HadoopUtil.parseHiveTableName(tableName);
-tableName = dbTableName[0] + "." + dbTableName[1];
+tableName = normalizeHiveTableName(tableName);
 getProjectManager().removeTableDescFromProject(tableName, projectName);
 }
 
@@ -130,8 +128,7 @@ public class TableService extends BasicService {
 int tableType = 0;
 
 //remove streaming info
-String[] dbTableName = HadoopUtil.parseHiveTableName(tableName);
-tableName = dbTableName[0] + "." + dbTableName[1];
+tableName = normalizeHiveTableName(tableName);
 TableDesc desc = getMetadataManager().getTableDesc(tableName);
 if (desc == null)
 return false;
@@ -276,8 +273,7 @@ public class TableService extends BasicService {
  */
 @PreAuthorize(Constant.ACCESS_HAS_ROLE_MODELER + " or " + 
Constant.ACCESS_HAS_ROLE_ADMIN)
 public void calculateCardinality(String tableName, String submitter) 
throws IOException {
-String[] dbTableName = HadoopUtil.parseHiveTableName(tableName);
-tableName = dbTableName[0] + "." + dbTableName[1];
+tableName = normalizeHiveTableName(tableName);
 TableDesc 

[1/2] kylin git commit: minor, fix NPE when filter Non-Cubing Job

2016-12-28 Thread billyliu
Repository: kylin
Updated Branches:
  refs/heads/master 73a7c25df -> 08eda7b71


minor, fix NPE when filter Non-Cubing Job


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

Branch: refs/heads/master
Commit: fd745c8804848a60ac96eff1bd9b30bbe38bdafc
Parents: 73a7c25
Author: Billy Liu 
Authored: Wed Dec 28 18:47:58 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 22:00:25 2016 +0800

--
 .../main/java/org/apache/kylin/rest/service/JobService.java   | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fd745c88/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
--
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java 
b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
index ca8659c..4709a91 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
@@ -536,10 +536,13 @@ public class JobService extends BasicService implements 
InitializingBean {
 @Override
 public boolean apply(AbstractExecutable executable) {
 if (executable instanceof CubingJob) {
-if (cubeName == null) {
+if (StringUtils.isEmpty(cubeName)) {
 return true;
 }
-return 
CubingExecutableUtil.getCubeName(executable.getParams()).equalsIgnoreCase(cubeName);
+String executableCubeName = 
CubingExecutableUtil.getCubeName(executable.getParams());
+if (executableCubeName == null)
+return true;
+return executableCubeName.contains(cubeName);
 } else {
 return false;
 }



[2/2] kylin git commit: minor, fix could not parse issue for scheduler

2016-12-28 Thread billyliu
minor, fix could not parse issue for scheduler


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

Branch: refs/heads/master
Commit: 08eda7b714a30c665bdd777c296d15c7650c9ea9
Parents: fd745c8
Author: Billy Liu 
Authored: Wed Dec 28 19:00:00 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 22:01:39 2016 +0800

--
 .../kylin/job/impl/threadpool/DefaultScheduler.java  | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/08eda7b7/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
index be8e7fe..ddb3a21 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
@@ -105,15 +105,18 @@ public class DefaultScheduler implements 
Scheduler, Connecti
 continue;
 }
 nReady++;
-AbstractExecutable executable = 
executableManager.getJob(id);
-String jobDesc = executable.toString();
-logger.info(jobDesc + " prepare to schedule");
+AbstractExecutable executable = null;
+String jobDesc = null;
 try {
+executable = executableManager.getJob(id);
+jobDesc = executable.toString();
+logger.info(jobDesc + " prepare to schedule");
 context.addRunningJob(executable);
 jobPool.execute(new JobRunner(executable));
 logger.info(jobDesc + " scheduled");
 } catch (Exception ex) {
-context.removeRunningJob(executable);
+if (executable != null)
+context.removeRunningJob(executable);
 logger.warn(jobDesc + " fail to schedule", ex);
 }
 }



kylin git commit: minor, fix could not parse issue for scheduler

2016-12-28 Thread billyliu
Repository: kylin
Updated Branches:
  refs/heads/yang22 7e7478319 -> fd1ed2ed2


minor, fix could not parse issue for scheduler


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

Branch: refs/heads/yang22
Commit: fd1ed2ed2fe7ddf7bfeac489aaa550d5171c687b
Parents: 7e74783
Author: Billy Liu 
Authored: Wed Dec 28 19:00:00 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 19:00:00 2016 +0800

--
 .../kylin/job/impl/threadpool/DefaultScheduler.java  | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/fd1ed2ed/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
--
diff --git 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
index be8e7fe..ddb3a21 100644
--- 
a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
+++ 
b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java
@@ -105,15 +105,18 @@ public class DefaultScheduler implements 
Scheduler, Connecti
 continue;
 }
 nReady++;
-AbstractExecutable executable = 
executableManager.getJob(id);
-String jobDesc = executable.toString();
-logger.info(jobDesc + " prepare to schedule");
+AbstractExecutable executable = null;
+String jobDesc = null;
 try {
+executable = executableManager.getJob(id);
+jobDesc = executable.toString();
+logger.info(jobDesc + " prepare to schedule");
 context.addRunningJob(executable);
 jobPool.execute(new JobRunner(executable));
 logger.info(jobDesc + " scheduled");
 } catch (Exception ex) {
-context.removeRunningJob(executable);
+if (executable != null)
+context.removeRunningJob(executable);
 logger.warn(jobDesc + " fail to schedule", ex);
 }
 }



kylin git commit: minor, fix NPE when filter Non-Cubing Job

2016-12-28 Thread billyliu
Repository: kylin
Updated Branches:
  refs/heads/yang22 1e0e9a64f -> 7e7478319


minor, fix NPE when filter Non-Cubing Job


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

Branch: refs/heads/yang22
Commit: 7e7478319e45532b4eae0de49ac14c4d7e1491b9
Parents: 1e0e9a6
Author: Billy Liu 
Authored: Wed Dec 28 18:47:58 2016 +0800
Committer: Billy Liu 
Committed: Wed Dec 28 18:47:58 2016 +0800

--
 .../main/java/org/apache/kylin/rest/service/JobService.java   | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7e747831/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
--
diff --git 
a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java 
b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
index ca8659c..4709a91 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/JobService.java
@@ -536,10 +536,13 @@ public class JobService extends BasicService implements 
InitializingBean {
 @Override
 public boolean apply(AbstractExecutable executable) {
 if (executable instanceof CubingJob) {
-if (cubeName == null) {
+if (StringUtils.isEmpty(cubeName)) {
 return true;
 }
-return 
CubingExecutableUtil.getCubeName(executable.getParams()).equalsIgnoreCase(cubeName);
+String executableCubeName = 
CubingExecutableUtil.getCubeName(executable.getParams());
+if (executableCubeName == null)
+return true;
+return executableCubeName.contains(cubeName);
 } else {
 return false;
 }



kylin git commit: minor,cube measures add dimensions

2016-12-28 Thread zhongjian
Repository: kylin
Updated Branches:
  refs/heads/master 76e321b2d -> 73a7c25df


minor,cube measures add dimensions

Signed-off-by: zhongjian 


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

Branch: refs/heads/master
Commit: 73a7c25dfeb28764658af3e73065aa04cc1b92cd
Parents: 76e321b
Author: chenzhx <346839...@qq.com>
Authored: Wed Dec 28 16:18:01 2016 +0800
Committer: zhongjian 
Committed: Wed Dec 28 16:31:30 2016 +0800

--
 webapp/app/js/controllers/cubeMeasures.js  | 11 ++-
 webapp/app/partials/cubeDesigner/measures.html |  6 --
 2 files changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/73a7c25d/webapp/app/js/controllers/cubeMeasures.js
--
diff --git a/webapp/app/js/controllers/cubeMeasures.js 
b/webapp/app/js/controllers/cubeMeasures.js
index 15c330a..c8548ce 100644
--- a/webapp/app/js/controllers/cubeMeasures.js
+++ b/webapp/app/js/controllers/cubeMeasures.js
@@ -84,6 +84,15 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, 
$modal,MetaModel,cubes
 if(!!measure && measure.function.parameter.next_parameter){
   $scope.nextPara.value = measure.function.parameter.next_parameter.value;
 }
+if($scope.newMeasure.function.parameter.value){
+  
if($scope.metaModel.model.metrics&&$scope.metaModel.model.metrics.indexOf($scope.newMeasure.function.parameter.value)!=-1){
+  $scope.newMeasure.showDim=false;
+  }else{
+  $scope.newMeasure.showDim=true;
+  }
+}else{
+  $scope.newMeasure.showDim=false;
+}
 if($scope.newMeasure.function.expression=="TOP_N"){
   $scope.convertedColumns=[];
   if($scope.newMeasure.function.configuration==null){
@@ -353,7 +362,7 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, 
$modal,MetaModel,cubes
 
if($scope.newMeasure.function.parameter.type=="column"&&$scope.newMeasure.function.expression!=="COUNT_DISTINCT"){
 
   var column = $scope.newMeasure.function.parameter.value;
-  if(column){
+  if(column&&(typeof column=="string")){
 var colType = $scope.getColumnType(VdmUtil.removeNameSpace(column), 
VdmUtil.getNameSpaceAliasName(column)); // $scope.getColumnType defined in 
cubeEdit.js
   }
   if(colType==""||!colType){

http://git-wip-us.apache.org/repos/asf/kylin/blob/73a7c25d/webapp/app/partials/cubeDesigner/measures.html
--
diff --git a/webapp/app/partials/cubeDesigner/measures.html 
b/webapp/app/partials/cubeDesigner/measures.html
index 9eb04c3..4d2d8ab 100755
--- a/webapp/app/partials/cubeDesigner/measures.html
+++ b/webapp/app/partials/cubeDesigner/measures.html
@@ -150,14 +150,15 @@
 
 
 
   -- Select a Column 
--
 
+
 
@@ -171,6 +172,7 @@
   -- Select a Column 
--
 
   
+  Also Show 
Dimensions