kylin git commit: minor, update website to remove duplicated information on community page

2015-12-07 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging a1c940dd5 -> a39fb27bc


minor, update website to remove duplicated information on community page


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

Branch: refs/heads/1.x-staging
Commit: a39fb27bce01f2a362387ef6b0f67f49b73bba2c
Parents: a1c940d
Author: lidongsjtu <don...@ebay.com>
Authored: Tue Dec 8 15:21:28 2015 +0800
Committer: lidongsjtu <don...@ebay.com>
Committed: Tue Dec 8 15:24:23 2015 +0800

--
 website/_data/contributors.yml | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/a39fb27b/website/_data/contributors.yml
--
diff --git a/website/_data/contributors.yml b/website/_data/contributors.yml
index 17b9e38..41145f3 100644
--- a/website/_data/contributors.yml
+++ b/website/_data/contributors.yml
@@ -101,20 +101,15 @@
   org: MiningLAMP
   role: PMC 
 - name: Dong Li (李栋)
-  apacheId: 
-  githubId: 
+  apacheId: lidong 
+  githubId: lidongsjtu
   org: eBay
   role: committer   
 - name: Xiaoyu Wang (王晓雨)
-  apacheId: 
+  apacheId: wangxiaoyu
   githubId: 
   org: JD.com
   role: committer 
-- name: Dong Li (李栋)
-  apacheId: 
-  githubId: lidongsjtu
-  org: eBay
-  role: committer 
 - name: Yerui Sun (孙叶锐)
   apacheId: sunyerui
   githubId: 



kylin git commit: minor, fix clean-up function in metastore.sh

2016-01-04 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 04df0cbb8 -> 255cfb73d


minor, fix clean-up function in metastore.sh


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

Branch: refs/heads/2.x-staging
Commit: 255cfb73d0c9b4f8ee3a0272152c1df8539d3595
Parents: 04df0cb
Author: lidongsjtu 
Authored: Mon Jan 4 23:02:56 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 5 11:28:05 2016 +0800

--
 build/bin/metastore.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/255cfb73/build/bin/metastore.sh
--
diff --git a/build/bin/metastore.sh b/build/bin/metastore.sh
index ed6e8d3..8f237aa 100755
--- a/build/bin/metastore.sh
+++ b/build/bin/metastore.sh
@@ -55,7 +55,7 @@ then
 elif [ $1 == "clean" ]
 then
 
-${KYLIN_HOME}/bin/kylin.sh 
org.apache.kylin.job.hadoop.cube.MetadataCleanupJob "${@:2}"
+${KYLIN_HOME}/bin/kylin.sh 
org.apache.kylin.engine.mr.steps.MetadataCleanupJob "${@:2}"
 
 else
 echo "usage: metastore.sh backup"



[2/2] kylin git commit: KYLIN-1277 Upgrade tool to put old-version cube and new-version cube into a hybrid model

2016-01-04 Thread lidong
KYLIN-1277 Upgrade tool to put old-version cube and new-version cube into a 
hybrid model


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

Branch: refs/heads/2.0-rc
Commit: 88cb7b92fd082e33f5ddb3e1b1717e692d5a0f35
Parents: 34466c0
Author: lidongsjtu 
Authored: Mon Jan 4 10:09:05 2016 +0800
Committer: lidongsjtu 
Committed: Mon Jan 4 23:03:16 2016 +0800

--
 .../org/apache/kylin/cube/CubeInstance.java |  15 ++
 .../java/org/apache/kylin/cube/CubeManager.java |  15 ++
 .../org/apache/kylin/cube/model/CubeDesc.java   |  21 ++
 .../cube/upgrade/v2/CubeMetadataUpgradeV2.java  |   2 +-
 .../kylin/metadata/model/DataModelDesc.java |  31 ++-
 .../kylin/metadata/model/PartitionDesc.java |   9 +
 .../metadata/project/RealizationEntry.java  |   7 +
 .../storage/hybrid/ExtendCubeToHybridTool.java  | 196 +++
 .../kylin/storage/hybrid/HybridInstance.java|  19 ++
 9 files changed, 306 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/88cb7b92/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
index 41c1f41..6139a2e 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
@@ -427,4 +427,19 @@ public class CubeInstance extends RootPersistentEntity 
implements IRealization,
 return getDescriptor().getEngineType();
 }
 
+public static CubeInstance getCopyOf(CubeInstance cubeInstance) {
+CubeInstance newCube = new CubeInstance();
+newCube.setName(cubeInstance.getName());
+newCube.setSegments(cubeInstance.getSegments());
+newCube.setDescName(cubeInstance.getDescName());
+newCube.setConfig(cubeInstance.getConfig());
+newCube.setStatus(cubeInstance.getStatus());
+newCube.setOwner(cubeInstance.getOwner());
+newCube.setVersion(cubeInstance.getVersion());
+newCube.setCost(cubeInstance.getCost());
+newCube.setCreateTimeUTC(System.currentTimeMillis());
+newCube.updateRandomUuid();
+return newCube;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/88cb7b92/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
index 50dc166..04a447c 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
@@ -254,6 +254,21 @@ public class CubeManager implements IRealizationProvider {
 return cube;
 }
 
+public CubeInstance createCube(CubeInstance cube, String projectName, 
String owner) throws IOException {
+logger.info("Creating cube '" + projectName + "-->" + cube.getName() + 
"' from instance object. '");
+
+// save cube resource
+cube.setOwner(owner);
+
+updateCubeWithRetry(new CubeUpdate(cube), 0);
+
ProjectManager.getInstance(config).moveRealizationToProject(RealizationType.CUBE,
 cube.getName(), projectName, owner);
+
+if (listener != null)
+listener.afterCubeCreate(cube);
+
+return cube;
+}
+
 public CubeInstance updateCube(CubeUpdate update) throws IOException {
 CubeInstance cube = updateCubeWithRetry(update, 0);
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/88cb7b92/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 57179ae..3c2527a 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
@@ -856,4 +856,25 @@ public class CubeDesc extends RootPersistentEntity {
 return result;
 }
 
+public static CubeDesc getCopyOf(CubeDesc cubeDesc) {
+CubeDesc newCubeDesc = new CubeDesc();
+newCubeDesc.setName(cubeDesc.getName());
+newCubeDesc.setModelName(cubeDesc.getModelName());
+newCubeDesc.setDescription(cubeDesc.getDescription());
+

kylin git commit: KYLIN-1277 Upgrade tool to put old-version cube and new-version cube into a hybrid model

2016-01-05 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 9161c5801 -> 63dfe0d65


KYLIN-1277 Upgrade tool to put old-version cube and new-version cube into a 
hybrid model


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

Branch: refs/heads/2.x-staging
Commit: 63dfe0d65dc7648089c7eb5a71cae3d2ed5b26dc
Parents: 9161c58
Author: lidongsjtu 
Authored: Mon Jan 4 10:09:05 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jan 6 11:32:13 2016 +0800

--
 .../org/apache/kylin/cube/CubeInstance.java |  15 ++
 .../java/org/apache/kylin/cube/CubeManager.java |  15 ++
 .../org/apache/kylin/cube/model/CubeDesc.java   |  23 +++
 .../kylin/metadata/model/DataModelDesc.java |  31 ++-
 .../kylin/metadata/model/PartitionDesc.java |   9 +
 .../metadata/project/RealizationEntry.java  |   7 +
 .../storage/hybrid/ExtendCubeToHybridTool.java  | 196 +++
 .../kylin/storage/hybrid/HybridInstance.java|  19 ++
 8 files changed, 307 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/63dfe0d6/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
index 8363a2b..8ca3ebc 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeInstance.java
@@ -429,4 +429,19 @@ public class CubeInstance extends RootPersistentEntity 
implements IRealization,
 return getDescriptor().getEngineType();
 }
 
+public static CubeInstance getCopyOf(CubeInstance cubeInstance) {
+CubeInstance newCube = new CubeInstance();
+newCube.setName(cubeInstance.getName());
+newCube.setSegments(cubeInstance.getSegments());
+newCube.setDescName(cubeInstance.getDescName());
+newCube.setConfig(cubeInstance.getConfig());
+newCube.setStatus(cubeInstance.getStatus());
+newCube.setOwner(cubeInstance.getOwner());
+newCube.setVersion(cubeInstance.getVersion());
+newCube.setCost(cubeInstance.getCost());
+newCube.setCreateTimeUTC(System.currentTimeMillis());
+newCube.updateRandomUuid();
+return newCube;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/63dfe0d6/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java 
b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
index 5bdbe8f..2643833 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
@@ -255,6 +255,21 @@ public class CubeManager implements IRealizationProvider {
 return cube;
 }
 
+public CubeInstance createCube(CubeInstance cube, String projectName, 
String owner) throws IOException {
+logger.info("Creating cube '" + projectName + "-->" + cube.getName() + 
"' from instance object. '");
+
+// save cube resource
+cube.setOwner(owner);
+
+updateCubeWithRetry(new CubeUpdate(cube), 0);
+
ProjectManager.getInstance(config).moveRealizationToProject(RealizationType.CUBE,
 cube.getName(), projectName, owner);
+
+if (listener != null)
+listener.afterCubeCreate(cube);
+
+return cube;
+}
+
 public CubeInstance updateCube(CubeUpdate update) throws IOException {
 CubeInstance cube = updateCubeWithRetry(update, 0);
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/63dfe0d6/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 737d4bd..2f37044 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
@@ -791,4 +791,27 @@ public class CubeDesc extends RootPersistentEntity {
 return result;
 }
 
+public static CubeDesc getCopyOf(CubeDesc cubeDesc) {
+CubeDesc newCubeDesc = new CubeDesc();
+newCubeDesc.setName(cubeDesc.getName());
+newCubeDesc.setModelName(cubeDesc.getModelName());
+newCubeDesc.setDescription(cubeDesc.getDescription());
+

kylin git commit: minor, clean up odbc driver text files

2016-01-09 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc e7515679a -> f67ab7aea


minor, clean up odbc driver text files


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

Branch: refs/heads/2.0-rc
Commit: f67ab7aeae261f0aa8fda87ba74aa6088c8d848e
Parents: e751567
Author: lidongsjtu 
Authored: Sat Jan 9 20:57:36 2016 +0800
Committer: lidongsjtu 
Committed: Sat Jan 9 20:57:36 2016 +0800

--
 odbc/Installer(64bit)/Installer(64bit).isl | 17 +
 odbc/Installer/Installer.isl   | 17 +
 odbc/README.md | 24 +++-
 3 files changed, 41 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/f67ab7ae/odbc/Installer(64bit)/Installer(64bit).isl
--
diff --git a/odbc/Installer(64bit)/Installer(64bit).isl 
b/odbc/Installer(64bit)/Installer(64bit).isl
index e3f0bfc..90332f7 100644
--- a/odbc/Installer(64bit)/Installer(64bit).isl
+++ b/odbc/Installer(64bit)/Installer(64bit).isl
@@ -1,4 +1,21 @@
 
+
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/f67ab7ae/odbc/Installer/Installer.isl
--
diff --git a/odbc/Installer/Installer.isl b/odbc/Installer/Installer.isl
index 1a4c4f9..7fd01fa 100644
--- a/odbc/Installer/Installer.isl
+++ b/odbc/Installer/Installer.isl
@@ -1,4 +1,21 @@
 
+
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/f67ab7ae/odbc/README.md
--
diff --git a/odbc/README.md b/odbc/README.md
index ccee034..b06d304 100644
--- a/odbc/README.md
+++ b/odbc/README.md
@@ -11,17 +11,15 @@ The projects are organized as a Visual Studio 2012 
solution. The entry of the so
 
 KylinODBC  - Root folder containing the workspace. All the 
projects are part of this single workspace
 
-KylinODBC\TestDll - Contains a simple ODBC client that can be used to 
test your driver as well as connect to any ODBC data source. 
+KylinODBC\TestDll  - Contains a simple ODBC client that can be used to 
test your driver as well as connect to any ODBC data source. 
 
 KylinODBC\Common   - Shared data types, utility tools, etc.
 
 KylinODBC\Driver   - Contains code for Kylin ODBC driver. Note that 
the entire functionality has not been implemented but is enough to get you data 
into most standard ODBC clients like Tableau, provided you have set up a rest 
server to serve the query requests. Note that the header file is a very 
important starting point for understanding this driver.
 
-KylinODBC\Installer- Contains a MSI installer for kylin odbc driver(x86)
+KylinODBC\Installer   - Contains a MSI installer for kylin odbc driver(x86)
 
-KylinODBC\Installer(64bit)  - Contains a MSI installer for kylin odbc 
driver(x64)
-
-KylinODBC\doc   - Totorials for ODBC development starters.
+KylinODBC\Installer(64bit) - Contains a MSI installer for kylin odbc 
driver(x64)
 
 # How to compile
 
@@ -39,11 +37,11 @@ KylinODBC\doc   - Totorials for ODBC 
development starters.
 
 KylinODBC uses zlib for data compression and Casablanca as REST client. 
KylinODBC requires its libraries to be static libs, so we need to download 
source codes and compile it manually.  Remember if you want to build 64 bit 
odbc driver, you'll have to build 64 bit dependency libaries, the same goes for 
32 bit. It is recommended that you build Release|x64, Debug|x64, Release|Win32, 
Debug|Win32 for all the libraries.
 
-### set ZLIB_HOME and CPPREST_HOME
+### Set ZLIB_HOME and CPPREST_HOME
 
 Go to "Control Panel" -> "System" -> "Advanced system settings" -> 
"Environment Variables" -> "System variables", add two variables "ZLIB_HOME" 
and "CPPREST_HOME", their value being set to the home directory of zlib and 
Casablanca.
 
-### compile zlib
+### Compile zlib
 
 Download zlib 1.2.8 source code from its official website: 
http://www.zlib.net, refer to 
http://www.helyar.net/2010/compiling-zlib-lib-on-windows/ or 
http://blog.sina.com.cn/s/blog_6e0693f70100sjgj.html (this doc is in Chinese, 
but it's clearer) Notice that actually you only need to compile project 
"zlibstat"
 
@@ -52,18 +50,10 @@ Here're some tips when compiling zlib:
  *  To avoid issue like 
http://stackoverflow.com/questions/20021950/def-file-syntax-error-in-visual-studio-2012,
 change "VERSION 1.2.8" in $ZLIB_HOME/zlibvc.def to "VERSION 1.2"
  *  Select All Configurations and All Platforms from the drop-downs at the top 
of the Properties dialog 

kylin git commit: minor, fix typo

2016-01-08 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging ebecfcef8 -> abd53e124


minor, fix typo


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

Branch: refs/heads/1.x-staging
Commit: abd53e124aec4c85d509e6cdf055c2ec6ba446f7
Parents: ebecfce
Author: lidongsjtu 
Authored: Sat Jan 9 12:17:14 2016 +0800
Committer: lidongsjtu 
Committed: Sat Jan 9 12:17:19 2016 +0800

--
 docs/README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/abd53e12/docs/README.md
--
diff --git a/docs/README.md b/docs/README.md
index 22b84f9..a4c802d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,6 +1,6 @@
 # Apache Kylin Documentation
 
-__All documentations have been moved to Kylin website at:__  
+__All documens have been moved to Kylin website at:__  
 [http://kylin.apache.org/docs](http://kylin.apache.org/docs)
 
-Please visit there for furthe reference.
\ No newline at end of file
+Please visit there for further reference.



[1/3] kylin git commit: KYLIN-1233 Spill to disk when AggregationCache need too much memory

2015-12-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 35a5d87af -> e58326999


KYLIN-1233 Spill to disk when AggregationCache need too much memory


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

Branch: refs/heads/2.x-staging
Commit: eaed4f6bdf63385590b02360e0f5834478088db2
Parents: 35a5d87
Author: lidongsjtu 
Authored: Sun Dec 27 11:05:11 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 11:05:11 2015 +0800

--
 .../common/hll/HyperLogLogPlusCounter.java  |   2 +-
 .../java/org/apache/kylin/common/util/Pair.java |  46 ++-
 .../cube/inmemcubing/InMemCubeBuilder.java  |   2 +-
 .../org/apache/kylin/cube/util/KryoUtils.java   |   2 +-
 .../kylin/gridtable/GTAggregateScanner.java | 406 +++
 .../apache/kylin/gridtable/GTScanRequest.java   |  17 +-
 .../coprocessor/endpoint/CubeVisitService.java  |  10 +-
 7 files changed, 377 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/eaed4f6b/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
 
b/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
index ef91509..11ae78f 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
@@ -42,7 +42,7 @@ public class HyperLogLogPlusCounter implements Serializable, 
Comparablehttp://git-wip-us.apache.org/repos/asf/kylin/blob/eaed4f6b/core-common/src/main/java/org/apache/kylin/common/util/Pair.java
--
diff --git a/core-common/src/main/java/org/apache/kylin/common/util/Pair.java 
b/core-common/src/main/java/org/apache/kylin/common/util/Pair.java
index d28b05f..9e4e9ee 100644
--- a/core-common/src/main/java/org/apache/kylin/common/util/Pair.java
+++ b/core-common/src/main/java/org/apache/kylin/common/util/Pair.java
@@ -28,7 +28,7 @@ import java.io.Serializable;
  */
 public class Pair implements Serializable {
 private static final long serialVersionUID = -3986244606585552569L;
-
+
 protected T1 first = null;
 protected T2 second = null;
 
@@ -60,6 +60,18 @@ public class Pair implements Serializable {
 return new Pair(a, b);
 }
 
+private static boolean equals(Object x, Object y) {
+return (x == null && y == null) || (x != null && x.equals(y));
+}
+
+/**
+ * Return the first element stored in the pair.
+ * @return T1
+ */
+public T1 getFirst() {
+return first;
+}
+
 /**
  * Replace the first element of the pair.
  * @param a operand
@@ -68,20 +80,12 @@ public class Pair implements Serializable {
 this.first = a;
 }
 
-/**
- * Replace the second element of the pair.
- * @param b operand
- */
-public void setSecond(T2 b) {
-this.second = b;
+public T1 getKey() {
+return getFirst();
 }
 
-/**
- * Return the first element stored in the pair.
- * @return T1
- */
-public T1 getFirst() {
-return first;
+public void setKey(T1 a) {
+setFirst(a);
 }
 
 /**
@@ -92,8 +96,20 @@ public class Pair implements Serializable {
 return second;
 }
 
-private static boolean equals(Object x, Object y) {
-return (x == null && y == null) || (x != null && x.equals(y));
+/**
+ * Replace the second element of the pair.
+ * @param b operand
+ */
+public void setSecond(T2 b) {
+this.second = b;
+}
+
+public T2 getValue() {
+return getSecond();
+}
+
+public void setValue(T2 b) {
+setSecond(b);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/kylin/blob/eaed4f6b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
index 575583f..4bad818 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
@@ -330,7 +330,7 @@ public class InMemCubeBuilder extends 
AbstractInMemCubeBuilder {
 
 

[2/3] kylin git commit: KYLIN-1233 Add testcases for spill and in-mem of AggregationCache

2015-12-26 Thread lidong
KYLIN-1233 Add testcases for spill and in-mem of AggregationCache


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

Branch: refs/heads/2.x-staging
Commit: a46a25dd096ad54add369e9067401229a797d11f
Parents: eaed4f6
Author: lidongsjtu 
Authored: Sun Dec 27 14:34:06 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 14:34:06 2015 +0800

--
 .../apache/kylin/gridtable/UnitTestSupport.java |  44 +-
 .../gridtable/AggregationCacheSpillTest.java| 140 +++
 2 files changed, 182 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/a46a25dd/core-cube/src/main/java/org/apache/kylin/gridtable/UnitTestSupport.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/UnitTestSupport.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/UnitTestSupport.java
index ff71b4f..08187e9 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/UnitTestSupport.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/UnitTestSupport.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.List;
 
+import org.apache.kylin.common.hll.HyperLogLogPlusCounter;
 import org.apache.kylin.common.util.DateFormat;
 import org.apache.kylin.common.util.ImmutableBitSet;
 import org.apache.kylin.gridtable.GTInfo.Builder;
@@ -44,6 +45,23 @@ public class UnitTestSupport {
 return info;
 }
 
+public static GTInfo hllInfo() {
+Builder builder = GTInfo.builder();
+builder.setCodeSystem(new GTSampleCodeSystem());
+builder.setColumns( //
+DataType.getType("varchar(10)"), //
+DataType.getType("varchar(10)"), //
+DataType.getType("varchar(10)"), //
+DataType.getType("bigint"), //
+DataType.getType("decimal"), //
+DataType.getType("hllc14") //
+);
+builder.setPrimaryKey(setOf(0));
+builder.setColumnPreferIndex(setOf(0));
+GTInfo info = builder.build();
+return info;
+}
+
 private static Builder infoBuilder() {
 Builder builder = GTInfo.builder();
 builder.setCodeSystem(new GTSampleCodeSystem());
@@ -81,15 +99,37 @@ public class UnitTestSupport {
 return result;
 }
 
+public static List mockupHllData(GTInfo info, int nRows) {
+List result = new ArrayList(nRows);
+int round = nRows / 10;
+for (int i = 0; i < round; i++) {
+String d_01_14 = datePlus("2015-01-14", i * 4);
+String d_01_15 = datePlus("2015-01-15", i * 4);
+String d_01_16 = datePlus("2015-01-16", i * 4);
+String d_01_17 = datePlus("2015-01-17", i * 4);
+result.add(newRec(info, d_01_14, "Yang", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_14, "Luke", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_15, "Xu", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_15, "Dong", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_15, "Jason", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_16, "Mahone", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_16, "Shaofeng", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_16, "Qianhao", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_16, "George", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+result.add(newRec(info, d_01_17, "Kejia", "Food", new 
LongMutable(10), new BigDecimal("10.5"), new HyperLogLogPlusCounter(14)));
+}
+return result;
+}
+
 private static String datePlus(String date, int plusDays) {
 long millis = DateFormat.stringToMillis(date);
 millis += (1000L * 3600L * 24L) * plusDays;
 return DateFormat.formatToDateStr(millis);
 }
 
-private static GTRecord newRec(GTInfo info, String date, String name, 
String category, LongMutable amount, 

[3/3] kylin git commit: minor, fix typo

2015-12-26 Thread lidong
minor, fix typo


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

Branch: refs/heads/2.x-staging
Commit: e58326999711bef09a823026038ec3adf0acf2ad
Parents: a46a25d
Author: lidongsjtu 
Authored: Sun Dec 27 14:35:10 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 14:35:10 2015 +0800

--
 webapp/app/partials/admin/admin.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/e5832699/webapp/app/partials/admin/admin.html
--
diff --git a/webapp/app/partials/admin/admin.html 
b/webapp/app/partials/admin/admin.html
index 3e063a6..0ed5ab5 100644
--- a/webapp/app/partials/admin/admin.html
+++ b/webapp/app/partials/admin/admin.html
@@ -61,7 +61,7 @@
 
   
 
-  Enable 
Cache
+  Enable 
Cache
 
   
   



kylin git commit: KYLIN-976 Minor change for DataType validation

2015-12-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging e58326999 -> 11d5dc90c


KYLIN-976 Minor change for DataType validation


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

Branch: refs/heads/2.x-staging
Commit: 11d5dc90c21364eb6cdd8b1da353553056d4fa02
Parents: e583269
Author: lidongsjtu 
Authored: Sun Dec 27 15:12:36 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 15:12:36 2015 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/11d5dc90/core-metadata/src/main/java/org/apache/kylin/measure/MeasureTypeFactory.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureTypeFactory.java 
b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureTypeFactory.java
index 06645a9..5c2e6ed 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/measure/MeasureTypeFactory.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/measure/MeasureTypeFactory.java
@@ -106,7 +106,7 @@ abstract public class MeasureTypeFactory {
 String funcName = factory.getAggrFunctionName();
 if (funcName.equals(funcName.toUpperCase()) == false)
 throw new IllegalArgumentException("Aggregation function name 
'" + funcName + "' must be in upper case");
-String dataTypeName = factory.getAggrDataTypeName().toLowerCase();
+String dataTypeName = factory.getAggrDataTypeName();
 if (dataTypeName.equals(dataTypeName.toLowerCase()) == false)
 throw new IllegalArgumentException("Aggregation data type name 
'" + dataTypeName + "' must be in lower case");
 Class> serializer = 
factory.getAggrDataTypeSerializer();



kylin git commit: minor, fix typo

2015-12-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 39e82bd89 -> d8a964b4b


minor, fix typo


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

Branch: refs/heads/2.0-rc
Commit: d8a964b4b66868a962b6fd76ffd6a0285cf194d4
Parents: 39e82bd
Author: lidongsjtu 
Authored: Sun Dec 27 15:40:46 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 15:40:46 2015 +0800

--
 webapp/app/partials/admin/admin.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/d8a964b4/webapp/app/partials/admin/admin.html
--
diff --git a/webapp/app/partials/admin/admin.html 
b/webapp/app/partials/admin/admin.html
index addc8ed..59fe9ae 100644
--- a/webapp/app/partials/admin/admin.html
+++ b/webapp/app/partials/admin/admin.html
@@ -61,7 +61,7 @@
 
   
 
-  Enable 
Cache
+  Enable 
Cache
 
   
 



kylin git commit: KYLIN-1233 Spill to disk when AggregationCache need too much memory

2015-12-19 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc e6b55540a -> cd30e48e3


KYLIN-1233 Spill to disk when AggregationCache need too much memory


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

Branch: refs/heads/2.0-rc
Commit: cd30e48e387e4de44428eb508740dff18642a9c4
Parents: e6b5554
Author: lidongsjtu 
Authored: Sat Dec 19 22:19:13 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 20 11:47:42 2015 +0800

--
 .../common/hll/HyperLogLogPlusCounter.java  |   2 +-
 .../org/apache/kylin/cube/util/KryoUtils.java   |   2 +-
 .../kylin/gridtable/GTAggregateScanner.java | 306 ---
 .../apache/kylin/gridtable/UnitTestSupport.java |  44 ++-
 .../gridtable/AggregationCacheSpillTest.java|  83 +
 5 files changed, 384 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/cd30e48e/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
 
b/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
index ef91509..11ae78f 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/hll/HyperLogLogPlusCounter.java
@@ -42,7 +42,7 @@ public class HyperLogLogPlusCounter implements Serializable, 
Comparablehttp://git-wip-us.apache.org/repos/asf/kylin/blob/cd30e48e/core-cube/src/main/java/org/apache/kylin/cube/util/KryoUtils.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/util/KryoUtils.java 
b/core-cube/src/main/java/org/apache/kylin/cube/util/KryoUtils.java
index 9dbe0d2..48f925a 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/util/KryoUtils.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/util/KryoUtils.java
@@ -48,7 +48,7 @@ public class KryoUtils {
 return deserialize(bytes, clazz);
 }
 
-private static Kryo getKryo() {
+public static Kryo getKryo() {
 if (_Kryo.get() == null) {
 Kryo kryo = new Kryo();
 kryo.setInstantiatorStrategy(new 
Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));

http://git-wip-us.apache.org/repos/asf/kylin/blob/cd30e48e/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
index 0ed320c..46d51a4 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
@@ -1,20 +1,33 @@
 package org.apache.kylin.gridtable;
 
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.Comparator;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map.Entry;
+import java.util.PriorityQueue;
 import java.util.SortedMap;
 
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.kylin.common.util.ByteArray;
 import org.apache.kylin.common.util.ImmutableBitSet;
 import org.apache.kylin.common.util.MemoryBudgetController;
 import org.apache.kylin.common.util.MemoryBudgetController.MemoryWaterLevel;
+import org.apache.kylin.cube.util.KryoUtils;
 import org.apache.kylin.metadata.measure.MeasureAggregator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.esotericsoftware.kryo.Kryo;
+import com.esotericsoftware.kryo.io.Input;
+import com.esotericsoftware.kryo.io.Output;
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
 @SuppressWarnings({ "rawtypes", "unchecked" })
@@ -36,7 +49,7 @@ public class GTAggregateScanner implements IGTScanner {
 private MemoryWaterLevel memTracker;
 
 public GTAggregateScanner(IGTScanner inputScanner, GTScanRequest req, 
boolean enableMemCheck) {
-if (req.hasAggregation() == false)
+if (!req.hasAggregation())
 throw new IllegalStateException();
 
 this.info = inputScanner.getInfo();
@@ -49,6 +62,30 @@ public class GTAggregateScanner implements IGTScanner {
 this.enableMemCheck = 

kylin git commit: minor, tutorial for DSN configuration of ODBC Driver

2015-12-27 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 54fbce4c9 -> 97c2eac79


minor, tutorial for DSN configuration of ODBC Driver


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

Branch: refs/heads/1.x-staging
Commit: 97c2eac79b8eea09dda5d8aaa3703860d4ec08c7
Parents: 54fbce4
Author: lidongsjtu 
Authored: Sun Dec 27 23:37:49 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 23:38:53 2015 +0800

--
 website/_docs/tutorial/odbc.md  |  17 -
 website/images/Kylin-ODBC-DSN/1.png | Bin 0 -> 103154 bytes
 website/images/Kylin-ODBC-DSN/2.png | Bin 0 -> 147630 bytes
 website/images/Kylin-ODBC-DSN/3.png | Bin 0 -> 71034 bytes
 website/images/Kylin-ODBC-DSN/4.png | Bin 0 -> 113661 bytes
 5 files changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/97c2eac7/website/_docs/tutorial/odbc.md
--
diff --git a/website/_docs/tutorial/odbc.md b/website/_docs/tutorial/odbc.md
index a41f41c..96957ee 100644
--- a/website/_docs/tutorial/odbc.md
+++ b/website/_docs/tutorial/odbc.md
@@ -13,7 +13,7 @@ since: v0.7.1
 > 
 > Tested Operation System: Windows 7, Windows Server 2008 R2
 > 
-> Tested Application: Tableau 8.0.4 and Tableau 8.1.3
+> Tested Application: Tableau 8.0.4, Tableau 8.1.3 and Tableau 9.1
 
 ## Prerequisites
 1. Microsoft Visual C++ 2012 Redistributable 
@@ -31,5 +31,20 @@ since: v0.7.1
 
 3. Both drivers already be installed on Tableau Server, you properly should be 
able to publish to there without issues
 
+## DSN configuration
+1. Open ODBCAD to configure DSN.
+   * For 32 bit driver, please use the 32bit version in 
C:\Windows\SysWOW64\odbcad32.exe
+   * For 64 bit driver, please use the default "Data Sources (ODBC)" in 
Control Panel/Administrator Tools
+![]( /images/Kylin-ODBC-DSN/1.png)
+
+2. Open "System DSN" tab, and click "Add", you will see KylinODBCDriver listed 
as an option, Click "Finish" to continue.
+![]( /images/Kylin-ODBC-DSN/2.png)
+
+3. In the pop up dialog, fill in all the blanks, The server host is where your 
Kylin Rest Server is started.
+![]( /images/Kylin-ODBC-DSN/3.png)
+
+4. Click "Done", and you will see your new DSN listed in the "System Data 
Sources", you can use this DSN afterwards.
+![]( /images/Kylin-ODBC-DSN/4.png)
+
 ## Bug Report
 Please open Apache Kylin JIRA to report bug, or send to dev mailing list.

http://git-wip-us.apache.org/repos/asf/kylin/blob/97c2eac7/website/images/Kylin-ODBC-DSN/1.png
--
diff --git a/website/images/Kylin-ODBC-DSN/1.png 
b/website/images/Kylin-ODBC-DSN/1.png
new file mode 100644
index 000..dfaaeee
Binary files /dev/null and b/website/images/Kylin-ODBC-DSN/1.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/97c2eac7/website/images/Kylin-ODBC-DSN/2.png
--
diff --git a/website/images/Kylin-ODBC-DSN/2.png 
b/website/images/Kylin-ODBC-DSN/2.png
new file mode 100644
index 000..30fe4e5
Binary files /dev/null and b/website/images/Kylin-ODBC-DSN/2.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/97c2eac7/website/images/Kylin-ODBC-DSN/3.png
--
diff --git a/website/images/Kylin-ODBC-DSN/3.png 
b/website/images/Kylin-ODBC-DSN/3.png
new file mode 100644
index 000..8e4ac09
Binary files /dev/null and b/website/images/Kylin-ODBC-DSN/3.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/97c2eac7/website/images/Kylin-ODBC-DSN/4.png
--
diff --git a/website/images/Kylin-ODBC-DSN/4.png 
b/website/images/Kylin-ODBC-DSN/4.png
new file mode 100644
index 000..5c0255f
Binary files /dev/null and b/website/images/Kylin-ODBC-DSN/4.png differ



kylin git commit: minor, fix typo

2015-12-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 2d60c7896 -> 54fbce4c9


minor, fix typo


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

Branch: refs/heads/1.x-staging
Commit: 54fbce4c9ddf6d374eca338945201116548bcf56
Parents: 2d60c78
Author: lidongsjtu 
Authored: Sun Dec 27 15:17:24 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 15:17:24 2015 +0800

--
 webapp/app/partials/admin/admin.html | 2 +-
 website/_dev/howto_release.md| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/54fbce4c/webapp/app/partials/admin/admin.html
--
diff --git a/webapp/app/partials/admin/admin.html 
b/webapp/app/partials/admin/admin.html
index 8e32409..a51b011 100644
--- a/webapp/app/partials/admin/admin.html
+++ b/webapp/app/partials/admin/admin.html
@@ -61,7 +61,7 @@
 
   
 
-  Enable 
Cache
+  Enable 
Cache
 
   
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/54fbce4c/website/_dev/howto_release.md
--
diff --git a/website/_dev/howto_release.md b/website/_dev/howto_release.md
index 6978493..f11425b 100644
--- a/website/_dev/howto_release.md
+++ b/website/_dev/howto_release.md
@@ -10,7 +10,7 @@ _Shell commands is on Mac OS X as sample._
 _For people in China, please aware using proxy to avoid potential firewall 
issue._  
 
 ## Setup Account
-Make sure you have avaliable account and privlidge for following applications:
+Make sure you have avaliable account and privilege for following applications:
 
 * Apache account: [https://id.apache.org](https://id.apache.org/)
 * Apache Kylin git repo (main cobe base): 
[https://git-wip-us.apache.org/repos/asf/kylin.git](https://git-wip-us.apache.org/repos/asf/kylin.git)
  



kylin git commit: KYLIN-1233 Improve testcase

2015-12-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 94b0c8f0a -> 39e82bd89


KYLIN-1233 Improve testcase


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

Branch: refs/heads/2.0-rc
Commit: 39e82bd8962566ed5b9320337b94dc3455386708
Parents: 94b0c8f
Author: lidongsjtu 
Authored: Sun Dec 27 15:26:34 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 15:26:34 2015 +0800

--
 .../gridtable/AggregationCacheSpillTest.java| 76 +---
 1 file changed, 65 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/39e82bd8/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
--
diff --git 
a/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
 
b/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
index e6d0258..ad9c9b9 100644
--- 
a/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
+++ 
b/core-cube/src/test/java/org/apache/kylin/gridtable/AggregationCacheSpillTest.java
@@ -19,12 +19,15 @@
 package org.apache.kylin.gridtable;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.util.Iterator;
 import java.util.List;
 
 import org.apache.kylin.common.util.ImmutableBitSet;
+import org.apache.kylin.metadata.measure.LongMutable;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -35,24 +38,69 @@ import com.google.common.collect.Lists;
  */
 public class AggregationCacheSpillTest {
 
-final GTInfo info = UnitTestSupport.hllInfo();
-final List data = UnitTestSupport.mockupHllData(info, 4); // 
converts to about 34 MB data
+final static int DATA_CARDINALITY = 4;
+final static int DATA_REPLICATION = 2;
+
+final static GTInfo INFO = UnitTestSupport.hllInfo();
+final static List TEST_DATA = 
Lists.newArrayListWithCapacity(DATA_CARDINALITY * DATA_REPLICATION);;
 
 @BeforeClass
 public static void beforeClass() {
 System.setProperty("log4j.configuration", "kylin-log4j.properties");
+
+final List data = UnitTestSupport.mockupHllData(INFO, 
DATA_CARDINALITY);
+for (int i = 0; i < DATA_REPLICATION; i++)
+TEST_DATA.addAll(data);
 }
 
 @Test
 public void testAggregationCacheSpill() throws IOException {
-final List testData = 
Lists.newArrayListWithCapacity(data.size() * 2);
-testData.addAll(data);
-testData.addAll(data);
+IGTScanner inputScanner = new IGTScanner() {
+@Override
+public GTInfo getInfo() {
+return INFO;
+}
 
+@Override
+public int getScannedRowCount() {
+throw new UnsupportedOperationException();
+}
+
+@Override
+public void close() throws IOException {
+}
+
+@Override
+public Iterator iterator() {
+return TEST_DATA.iterator();
+}
+};
+
+GTScanRequest scanRequest = new GTScanRequest(INFO, null, new 
ImmutableBitSet(0, 3), new ImmutableBitSet(0, 3), new ImmutableBitSet(3, 6), 
new String[] { "SUM", "SUM", "COUNT_DISTINCT" }, null, true);
+scanRequest.setAggrCacheGB(0.5); // 500 MB
+
+GTAggregateScanner scanner = new GTAggregateScanner(inputScanner, 
scanRequest);
+
+int count = 0;
+for (GTRecord record : scanner) {
+assertNotNull(record);
+Object[] returnRecord = record.getValues();
+assertEquals(20, ((LongMutable) returnRecord[3]).get());
+assertEquals(21, ((BigDecimal) returnRecord[4]).longValue());
+count++;
+
+//System.out.println(record);
+}
+assertEquals(DATA_CARDINALITY, count);
+scanner.close();
+}
+
+@Test
+public void testAggregationCacheInMem() throws IOException {
 IGTScanner inputScanner = new IGTScanner() {
 @Override
 public GTInfo getInfo() {
-return info;
+return INFO;
 }
 
 @Override
@@ -66,21 +114,27 @@ public class AggregationCacheSpillTest {
 
 @Override
 public Iterator iterator() {
-return testData.iterator();
+return TEST_DATA.iterator();
 }
 };
 
-GTScanRequest scanRequest = new GTScanRequest(info, null, new 
ImmutableBitSet(0, 3), 

kylin git commit: KYLIN-976 Some measures only aggregates in BaseCuboid

2015-12-27 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 97c2eac79 -> f9de5a624


KYLIN-976 Some measures only aggregates in BaseCuboid


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

Branch: refs/heads/1.x-staging
Commit: f9de5a6247666750a154039cf3f2e88514ab1ad2
Parents: 97c2eac
Author: lidongsjtu 
Authored: Mon Dec 28 10:36:13 2015 +0800
Committer: lidongsjtu 
Committed: Mon Dec 28 10:36:13 2015 +0800

--
 .../org/apache/kylin/cube/cuboid/Cuboid.java|   4 +
 .../kylin/job/constant/BatchConstants.java  |   1 +
 .../apache/kylin/job/hadoop/cube/CuboidJob.java |   2 +
 .../kylin/job/hadoop/cube/CuboidReducer.java|  17 ++-
 .../kylin/job/hadoop/cube/CubeReducerTest.java  | 107 --
 .../kylin/measure/MeasureAggregators.java   |  10 ++
 .../org/apache/kylin/measure/MeasureType.java   |  13 +-
 .../kylin/storage/hbase/CubeStorageEngine.java  |  11 +-
 .../storage/hbase/CubeStorageEngineTest.java| 142 +++
 9 files changed, 287 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/f9de5a62/cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
--
diff --git a/cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java 
b/cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
index 5ef0c37..7f2b7ab 100644
--- a/cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
+++ b/cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
@@ -88,6 +88,10 @@ public class Cuboid implements Comparable {
 return cube.getRowkey().getFullMask();
 }
 
+public static Cuboid getBaseCuboid(CubeDesc cube) {
+return findById(cube, getBaseCuboidId(cube));
+}
+
 private static long translateToValidCuboid(CubeDesc cubeDesc, long 
cuboidID) {
 // add mandantory
 RowKeyDesc rowkey = cubeDesc.getRowkey();

http://git-wip-us.apache.org/repos/asf/kylin/blob/f9de5a62/job/src/main/java/org/apache/kylin/job/constant/BatchConstants.java
--
diff --git 
a/job/src/main/java/org/apache/kylin/job/constant/BatchConstants.java 
b/job/src/main/java/org/apache/kylin/job/constant/BatchConstants.java
index ca8b2c9..38f4a87 100644
--- a/job/src/main/java/org/apache/kylin/job/constant/BatchConstants.java
+++ b/job/src/main/java/org/apache/kylin/job/constant/BatchConstants.java
@@ -28,6 +28,7 @@ public interface BatchConstants {
 
 String CFG_CUBE_NAME = "cube.name";
 String CFG_CUBE_SEGMENT_NAME = "cube.segment.name";
+String CFG_CUBE_CUBOID_LEVEL = "cube.cuboid.level";
 
 String CFG_II_NAME = "ii.name";
 String CFG_II_SEGMENT_NAME = "ii.segment.name";

http://git-wip-us.apache.org/repos/asf/kylin/blob/f9de5a62/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidJob.java
--
diff --git a/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidJob.java 
b/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidJob.java
index bff9e3a..e4875e9 100644
--- a/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidJob.java
+++ b/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidJob.java
@@ -115,6 +115,8 @@ public class CuboidJob extends AbstractHadoopJob {
 // set job configuration
 job.getConfiguration().set(BatchConstants.CFG_CUBE_NAME, cubeName);
 job.getConfiguration().set(BatchConstants.CFG_CUBE_SEGMENT_NAME, 
segmentName);
+
job.getConfiguration().setInt(BatchConstants.CFG_CUBE_CUBOID_LEVEL, 
nCuboidLevel);
+
 // add metadata to distributed cache
 attachKylinPropsAndMetadata(cube, job.getConfiguration());
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/f9de5a62/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidReducer.java
--
diff --git 
a/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidReducer.java 
b/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidReducer.java
index 4527f30..3859d0e 100644
--- a/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidReducer.java
+++ b/job/src/main/java/org/apache/kylin/job/hadoop/cube/CuboidReducer.java
@@ -52,6 +52,8 @@ public class CuboidReducer extends KylinReducer {
 private MeasureAggregators aggs;
 
 private int counter;
+private int cuboidLevel;
+private boolean[] needAggr;
 private Object[] input;
 private Object[] result;
 
@@ -62,6 +64,8 @@ 

kylin git commit: KYLIN-1233 Configurable mem usage inside coprocessor

2015-12-27 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging f27f7f3e1 -> 619af784f


KYLIN-1233 Configurable mem usage inside coprocessor


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

Branch: refs/heads/2.x-staging
Commit: 619af784ff59f91677b6aef8cccf3b0b887a70c2
Parents: f27f7f3
Author: Yang Li 
Authored: Sun Dec 27 21:27:39 2015 +0800
Committer: lidongsjtu 
Committed: Mon Dec 28 10:42:10 2015 +0800

--
 .../apache/kylin/common/KylinConfigBase.java|  4 +++
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java |  4 +--
 .../hbase/cube/v2/CubeSegmentScanner.java   |  6 +++-
 .../coprocessor/endpoint/CubeVisitService.java  |  5 ++-
 .../hbase/util/DeployCoprocessorCLI.java| 32 +++-
 5 files changed, 44 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/619af784/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index c79cdeb..5202d2d 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -420,6 +420,10 @@ public class KylinConfigBase implements Serializable {
 return Long.parseLong(this.getOptional("kylin.query.mem.budget", 
String.valueOf(3L * 1024 * 1024 * 1024)));
 }
 
+public double getQueryCoprocessorMemGB() {
+return 
Double.parseDouble(this.getOptional("kylin.query.coprocessor.mem.gb", "3.0"));
+}
+
 public boolean isQuerySecureEnabled() {
 return 
Boolean.parseBoolean(this.getOptional("kylin.query.security.enabled", "true"));
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/619af784/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 5bc4a00..9ca3fc8 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -223,11 +223,11 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 future.get(1, TimeUnit.HOURS);
 }
 } catch (InterruptedException e) {
-throw new RuntimeException("Visiting cube by endpoint gets 
interrupted");
+throw new RuntimeException("Visiting cube by endpoint gets 
interrupted", e);
 } catch (ExecutionException e) {
 throw new RuntimeException("Visiting cube throw exception", e);
 } catch (TimeoutException e) {
-throw new RuntimeException("Visiting cube by endpoint timeout");
+throw new RuntimeException("Visiting cube by endpoint timeout", e);
 }
 
 return new EndpointResultsAsGTScanner(fullGTInfo, 
rowBlocks.iterator(), scanRequest.getColumns(), totalScannedCount.get());

http://git-wip-us.apache.org/repos/asf/kylin/blob/619af784/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
index 8dbba40..aadac3b 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
@@ -12,6 +12,7 @@ import java.util.NoSuchElementException;
 import java.util.Set;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.debug.BackdoorToggles;
 import org.apache.kylin.common.util.ByteArray;
 import org.apache.kylin.common.util.DateFormat;
@@ -84,8 +85,11 @@ public class CubeSegmentScanner implements IGTScanner {
 trimmedInfoBytes = GTInfo.serialize(info);
 GTInfo trimmedInfo = GTInfo.deserialize(trimmedInfoBytes);
 
+KylinConfig config = cubeSeg.getCubeInstance().getConfig();
 for (GTScanRange range : scanRanges) {
-

kylin git commit: KYLIN-976 Some measures only aggregates in BaseCuboid

2015-12-27 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 11d5dc90c -> cd5076497


KYLIN-976 Some measures only aggregates in BaseCuboid


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

Branch: refs/heads/2.x-staging
Commit: cd50764974b401b7a282af9d22513a5710c10704
Parents: 11d5dc9
Author: lidongsjtu 
Authored: Sun Dec 27 23:56:16 2015 +0800
Committer: lidongsjtu 
Committed: Sun Dec 27 23:59:00 2015 +0800

--
 .../cube/inmemcubing/InMemCubeBuilder.java  | 25 ++--
 .../kylin/gridtable/GTAggregateScanner.java | 20 
 .../kylin/measure/MeasureAggregators.java   | 10 
 .../org/apache/kylin/measure/MeasureType.java   |  5 
 .../kylin/engine/mr/common/BatchConstants.java  |  1 +
 .../apache/kylin/engine/mr/steps/CuboidJob.java |  1 +
 .../kylin/engine/mr/steps/CuboidReducer.java| 19 +--
 .../storage/hbase/cube/v1/CubeStorageQuery.java |  9 +--
 .../storage/hbase/cube/v2/CubeStorageQuery.java |  9 +--
 9 files changed, 87 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/cd507649/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
index 4bad818..a1940a4 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/InMemCubeBuilder.java
@@ -46,6 +46,8 @@ import org.apache.kylin.gridtable.GTRecord;
 import org.apache.kylin.gridtable.GTScanRequest;
 import org.apache.kylin.gridtable.GridTable;
 import org.apache.kylin.gridtable.IGTScanner;
+import org.apache.kylin.measure.MeasureType;
+import org.apache.kylin.measure.MeasureTypeFactory;
 import org.apache.kylin.metadata.datatype.DoubleMutable;
 import org.apache.kylin.metadata.model.MeasureDesc;
 import org.apache.kylin.metadata.model.TblColRef;
@@ -395,12 +397,31 @@ public class InMemCubeBuilder extends 
AbstractInMemCubeBuilder {
 return scanAndAggregateGridTable(parent.table, parent.cuboidId, 
cuboidId, allNeededColumns.getFirst(), allNeededColumns.getSecond());
 }
 
+private GTAggregateScanner prepareGTAggregationScanner(GridTable 
gridTable, long parentId, long cuboidId, ImmutableBitSet aggregationColumns, 
ImmutableBitSet measureColumns) throws IOException {
+GTInfo info = gridTable.getInfo();
+GTScanRequest req = new GTScanRequest(info, null, aggregationColumns, 
measureColumns, metricsAggrFuncs, null);
+GTAggregateScanner scanner = (GTAggregateScanner) gridTable.scan(req);
+
+// for child cuboid, some measures don't need aggregation.
+if (parentId != cuboidId) {
+boolean[] aggrMask = new boolean[measureDescs.length];
+for (int i = 0; i < measureDescs.length; i++) {
+aggrMask[i] = 
!measureDescs[i].getFunction().getMeasureType().onlyAggrInBaseCuboid();
+
+if (!aggrMask[i]) {
+logger.info(measureDescs[i].toString() + " doesn't need 
aggregation.");
+}
+}
+scanner.setAggrMask(aggrMask);
+}
+
+return scanner;
+}
 private CuboidResult scanAndAggregateGridTable(GridTable gridTable, long 
parentId, long cuboidId, ImmutableBitSet aggregationColumns, ImmutableBitSet 
measureColumns) throws IOException {
 long startTime = System.currentTimeMillis();
 logger.info("Calculating cuboid " + cuboidId);
 
-GTScanRequest req = new GTScanRequest(gridTable.getInfo(), null, 
aggregationColumns, measureColumns, metricsAggrFuncs, null);
-GTAggregateScanner scanner = (GTAggregateScanner) gridTable.scan(req);
+GTAggregateScanner scanner = prepareGTAggregationScanner(gridTable, 
parentId, cuboidId, aggregationColumns, measureColumns);
 GridTable newGridTable = newGridTableByCuboidID(cuboidId);
 GTBuilder builder = newGridTable.rebuild();
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/cd507649/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTAggregateScanner.java
index a760b92..f3afaba 100644
--- 

kylin git commit: KYLIN-976 Some measures only aggregates in BaseCuboid (Test)

2015-12-27 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging cd5076497 -> f27f7f3e1


KYLIN-976 Some measures only aggregates in BaseCuboid (Test)


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

Branch: refs/heads/2.x-staging
Commit: f27f7f3e11371e9ab91f7c82dedd50986af53681
Parents: cd50764
Author: lidongsjtu 
Authored: Mon Dec 28 10:13:44 2015 +0800
Committer: lidongsjtu 
Committed: Mon Dec 28 10:13:44 2015 +0800

--
 .../kylin/engine/mr/steps/CubeReducerTest.java  |  85 ++
 .../hbase/cube/CubeStorageQueryTest.java| 154 +++
 2 files changed, 239 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/f27f7f3e/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeReducerTest.java
--
diff --git 
a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeReducerTest.java 
b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeReducerTest.java
index e79bd3a..aa5e77e 100644
--- 
a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeReducerTest.java
+++ 
b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/CubeReducerTest.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import java.io.File;
+import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
@@ -36,8 +37,13 @@ import org.apache.kylin.cube.CubeManager;
 import org.apache.kylin.cube.kv.RowConstants;
 import org.apache.kylin.cube.model.CubeDesc;
 import org.apache.kylin.engine.mr.common.BatchConstants;
+import org.apache.kylin.measure.MeasureAggregator;
 import org.apache.kylin.measure.MeasureCodec;
+import org.apache.kylin.measure.MeasureIngester;
+import org.apache.kylin.measure.MeasureType;
 import org.apache.kylin.metadata.datatype.LongMutable;
+import org.apache.kylin.metadata.model.FunctionDesc;
+import org.apache.kylin.metadata.model.MeasureDesc;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -108,6 +114,53 @@ public class CubeReducerTest extends 
LocalFileMetadataTestCase {
 assertTrue(result.contains(p3));
 }
 
+@Test
+public void testReducerOnlyAggrInBaseCuboid() throws Exception {
+reduceDriver.getConfiguration().set(BatchConstants.CFG_CUBE_NAME, 
"test_kylin_cube_with_slr_ready");
+
reduceDriver.getConfiguration().setInt(BatchConstants.CFG_CUBE_CUBOID_LEVEL, 1);
+
+CubeDesc cubeDesc = 
CubeManager.getInstance(getTestConfig()).getCube("test_kylin_cube_with_slr_ready").getDescriptor();
+MeasureDesc measureDesc = cubeDesc.getMeasures().get(0);
+FunctionDesc functionDesc = measureDesc.getFunction();
+Field field = FunctionDesc.class.getDeclaredField("measureType");
+field.setAccessible(true);
+MeasureType origMeasureType = functionDesc.getMeasureType();
+field.set(functionDesc, new MockUpMeasureType(origMeasureType));
+
+MeasureCodec codec = new MeasureCodec(cubeDesc.getMeasures());
+
+Text key1 = new Text("72010ustech");
+List values1 = new ArrayList();
+values1.add(newValueText(codec, "15.09", "15.09", "15.09", 1, 100));
+values1.add(newValueText(codec, "20.34", "20.34", "20.34", 1, 200));
+values1.add(newValueText(codec, "10", "10", "10", 1, 300));
+
+Text key2 = new Text("1tech");
+List values2 = new ArrayList();
+values2.add(newValueText(codec, "15.09", "15.09", "15.09", 1, 500));
+values2.add(newValueText(codec, "20.34", "20.34", "20.34", 1, 1000));
+
+Text key3 = new Text("0");
+List values3 = new ArrayList();
+values3.add(newValueText(codec, "146.52", "146.52", "146.52", 0, 0));
+
+reduceDriver.withInput(key1, values1);
+reduceDriver.withInput(key2, values2);
+reduceDriver.withInput(key3, values3);
+
+List> result = reduceDriver.run();
+
+Pair p1 = new Pair(new Text("72010ustech"), 
newValueText(codec, "0", "10", "20.34", 3, 600));
+Pair p2 = new Pair(new Text("1tech"), 
newValueText(codec, "0", "15.09", "20.34", 2, 1500));
+Pair p3 = new Pair(new Text("0"), 
newValueText(codec, "0", "146.52", "146.52", 0, 0));
+
+assertEquals(3, result.size());
+
+assertTrue(result.contains(p1));
+assertTrue(result.contains(p2));
+assertTrue(result.contains(p3));
+}
+
 private Text 

kylin git commit: minor, fix some style and typo issues for website

2015-12-28 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 1e0a79ef1 -> 16e5466c0


minor, fix some style and typo issues for website


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

Branch: refs/heads/1.x-staging
Commit: 16e5466c008b35ee2ff1f511f1fc1f0b47e7725e
Parents: 1e0a79e
Author: lidongsjtu 
Authored: Mon Dec 28 22:23:13 2015 +0800
Committer: lidongsjtu 
Committed: Mon Dec 28 22:23:37 2015 +0800

--
 website/_dev/about_temp_files.md | 20 ++--
 website/_dev/dev_env.md  | 18 +-
 website/_docs/howto/howto_cleanup_storage.md |  9 ++---
 website/community/poweredby.md   |  2 +-
 4 files changed, 22 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/16e5466c/website/_dev/about_temp_files.md
--
diff --git a/website/_dev/about_temp_files.md b/website/_dev/about_temp_files.md
index b3fba83..b46a764 100644
--- a/website/_dev/about_temp_files.md
+++ b/website/_dev/about_temp_files.md
@@ -6,24 +6,24 @@ permalink: /development/about_temp_files.html
 ---
 
 As we reviewed the code we found that Kylin left lots of garbage files in:
-1. Local file system of the CLI
-2. HDFS
-3. Local file system of the hadoop nodes.
 
-A ticked was opened to track this issue:
-https://issues.apache.org/jira/browse/KYLIN-926
+* Local file system of the CLI
+* HDFS
+* Local file system of the hadoop nodes.
+
+A ticket was opened to track this issue:
+[https://issues.apache.org/jira/browse/KYLIN-926](https://issues.apache.org/jira/browse/KYLIN-926)
 
 For future developments, please:
-1. Whenever you want to create temp files at Local, choose
+
+* Whenever you want to create temp files at Local, choose
 File.createTempFile or use the folder:
 BatchConstants.CFG_KYLIN_LOCAL_TEMP_DIR(/tmp/kylin), do not randomly use
 another folder in /tmp, it will end up a mess, and look unprofessional.
-
-2. Whenever you create temp files at Local, remember to delete it after
+* Whenever you create temp files at Local, remember to delete it after
 using it. It's best to use FileUtils.forceDelete, as it also works for
 deleting folders. Try avoid deleteOnExit, in case Kylin exits abnormally.
-
-3. Whenever you want to create files in HDFS, try to create it under
+* Whenever you want to create files in HDFS, try to create it under
 kylin.hdfs.working.dir or BatchConstants.CFG_KYLIN_HDFS_TEMP_DIR, and
 remember to delete it after it is no longer useful. Try avoid throwing
 everything into hdfs:///tmp and leave it as garbage.

http://git-wip-us.apache.org/repos/asf/kylin/blob/16e5466c/website/_dev/dev_env.md
--
diff --git a/website/_dev/dev_env.md b/website/_dev/dev_env.md
index 5722ac4..ec0d3fa 100644
--- a/website/_dev/dev_env.md
+++ b/website/_dev/dev_env.md
@@ -46,13 +46,13 @@ ln -s /root/apache-maven-3.2.5/bin/mvn /usr/bin/mvn
 First clone the Kylin project to your local:
 
 {% highlight Groff markup %}
-   git clone https://github.com/apache/kylin.git
+git clone https://github.com/apache/kylin.git
 {% endhighlight %}

 Install Kylin artifacts to the maven repo
 
 {% highlight Groff markup %}
-   mvn clean install -DskipTests
+mvn clean install -DskipTests
 {% endhighlight %}
 
 ### Modify local configuration
@@ -75,15 +75,15 @@ Run a end-to-end cube building test, these special test 
cases will populate some
 It might take a while (maybe one hour), please keep patient.
  
 {% highlight Groff markup %}
-   mvn test -Dtest=org.apache.kylin.job.BuildCubeWithEngineTest 
-DfailIfNoTests=false -Dhdp.version= -P sandbox
+mvn test -Dtest=org.apache.kylin.job.BuildCubeWithEngineTest 
-DfailIfNoTests=false -Dhdp.version= -P sandbox

-   mvn test -Dtest=org.apache.kylin.job.BuildIIWithEngineTest 
-DfailIfNoTests=false -Dhdp.version= -P sandbox
+mvn test -Dtest=org.apache.kylin.job.BuildIIWithEngineTest 
-DfailIfNoTests=false -Dhdp.version= -P sandbox
 {% endhighlight %}

 Run other tests, the end-to-end cube building test is exclueded
 
 {% highlight Groff markup %}
-   mvn test -fae -P sandbox
+mvn test -fae -P sandbox
 {% endhighlight %}
 
 ### Launch Kylin Web Server
@@ -91,15 +91,15 @@ Run other tests, the end-to-end cube building test is 
exclueded
 Copy server/src/main/webapp/WEB-INF to webapp/app/WEB-INF 
 
 {% highlight Groff markup %}
-   cp -r server/src/main/webapp/WEB-INF webapp/app/WEB-INF 
+cp -r server/src/main/webapp/WEB-INF webapp/app/WEB-INF 
 {% endhighlight %}
 
 

svn commit: r1721925 - in /kylin/site: ./ community/ development/ docs/howto/ docs/tutorial/ images/Kylin-ODBC-DSN/

2015-12-28 Thread lidong
Author: lidong
Date: Mon Dec 28 14:23:29 2015
New Revision: 1721925

URL: http://svn.apache.org/viewvc?rev=1721925=rev
Log:
Fix some style and typo issues

Added:
kylin/site/images/Kylin-ODBC-DSN/
kylin/site/images/Kylin-ODBC-DSN/1.png   (with props)
kylin/site/images/Kylin-ODBC-DSN/2.png   (with props)
kylin/site/images/Kylin-ODBC-DSN/3.png   (with props)
kylin/site/images/Kylin-ODBC-DSN/4.png   (with props)
Modified:
kylin/site/community/poweredby.html
kylin/site/development/about_temp_files.html
kylin/site/development/dev_env.html
kylin/site/development/howto_release.html
kylin/site/docs/howto/howto_cleanup_storage.html
kylin/site/docs/tutorial/odbc.html
kylin/site/feed.xml

Modified: kylin/site/community/poweredby.html
URL: 
http://svn.apache.org/viewvc/kylin/site/community/poweredby.html?rev=1721925=1721924=1721925=diff
==
--- kylin/site/community/poweredby.html (original)
+++ kylin/site/community/poweredby.html Mon Dec 28 14:23:29 2015
@@ -210,7 +210,7 @@ Send a quick description of your organiz
   
   http://www.163.com/;>NetEase  (NASDAQ: NTES)
 
-  Apache has been introduced as an OLAP engine for the data platform 
at NetEase, powering data analysis for various products  business with 
great performance.
+  Apache Kylin has been introduced as an OLAP engine for the data 
platform at NetEase, powering data analysis for various products  business 
with great performance.
 
   
 

Modified: kylin/site/development/about_temp_files.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/about_temp_files.html?rev=1721925=1721924=1721925=diff
==
--- kylin/site/development/about_temp_files.html (original)
+++ kylin/site/development/about_temp_files.html Mon Dec 28 14:23:29 2015
@@ -439,33 +439,32 @@

About Temp Files

-   As we reviewed the 
code we found that Kylin left lots of garbage files in:
-1. Local file system of the CLI
-2. HDFS
-3. Local file system of the hadoop nodes.
+   As we reviewed the 
code we found that Kylin left lots of garbage files in:
 
-A ticked was opened to track this issue:
-https://issues.apache.org/jira/browse/KYLIN-926
+
+  Local file system of the CLI
+  HDFS
+  Local file system of the hadoop nodes.
+
 
-For future developments, please:
-1. Whenever you want to create temp files at Local, choose
+A ticket was opened to track this issue:
+https://issues.apache.org/jira/browse/KYLIN-926;>https://issues.apache.org/jira/browse/KYLIN-926
+
+For future developments, please:
+
+
+  Whenever you want to create temp files at Local, choose
 File.createTempFile or use the folder:
 BatchConstants.CFG_KYLIN_LOCAL_TEMP_DIR(/tmp/kylin), do not randomly use
-another folder in /tmp, it will end up a mess, and look unprofessional.
-
-
-  
-Whenever you create temp files at Local, remember to delete it after
+another folder in /tmp, it will end up a mess, and look unprofessional.
+  Whenever you create temp files at Local, remember to delete it after
 using it. It’s best to use FileUtils.forceDelete, as it also works for
-deleting folders. Try avoid deleteOnExit, in case Kylin exits abnormally.
-  
-  
-Whenever you want to create files in HDFS, try to create it under
+deleting folders. Try avoid deleteOnExit, in case Kylin exits abnormally.
+  Whenever you want to create files in HDFS, try to create it under
 kylin.hdfs.working.dir or BatchConstants.CFG_KYLIN_HDFS_TEMP_DIR, and
 remember to delete it after it is no longer useful. Try avoid throwing
-everything into hdfs:///tmp and leave it as garbage.
-  
-
+everything into hdfs:///tmp and leave it as garbage.
+
 



Modified: kylin/site/development/dev_env.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/dev_env.html?rev=1721925=1721924=1721925=diff
==
--- kylin/site/development/dev_env.html (original)
+++ kylin/site/development/dev_env.html Mon Dec 28 14:23:29 2015
@@ -507,7 +507,7 @@ It might take a while (maybe one hour),
 
 mvn 
test -Dtest=org.apache.kylin.job.BuildCubeWithEngineTest -DfailIfNoTests=false 
-Dhdp.version=hdp-version -P sandbox

-   mvn test -Dtest=org.apache.kylin.job.BuildIIWithEngineTest 
-DfailIfNoTests=false -Dhdp.version=hdp-version -P 
sandbox
+mvn test -Dtest=org.apache.kylin.job.BuildIIWithEngineTest 
-DfailIfNoTests=false -Dhdp.version=hdp-version -P 
sandbox
 
 Run other tests, the end-to-end cube buildin

kylin git commit: minor, remove DISCLAIMER file

2015-12-21 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc cd30e48e3 -> 0de917283


minor, remove DISCLAIMER file


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

Branch: refs/heads/2.0-rc
Commit: 0de917283663a017c4c2bcf1308ef234d95caf5a
Parents: cd30e48
Author: lidongsjtu 
Authored: Tue Dec 22 09:20:13 2015 +0800
Committer: lidongsjtu 
Committed: Tue Dec 22 09:20:13 2015 +0800

--
 DISCLAIMER | 12 
 1 file changed, 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/0de91728/DISCLAIMER
--
diff --git a/DISCLAIMER b/DISCLAIMER
deleted file mode 100644
index 806ea66..000
--- a/DISCLAIMER
+++ /dev/null
@@ -1,12 +0,0 @@
-Apache Kylin is an effort undergoing incubation at the Apache Software
-Foundation (ASF), sponsored by the Apache Incubator PMC.
-
-Incubation is required of all newly accepted projects until a further
-review indicates that the infrastructure, communications, and decision
-making process have stabilized in a manner consistent with other
-successful ASF projects.
-
-While incubation status is not necessarily a reflection of the
-completeness or stability of the code, it does indicate that the
-project has yet to be fully endorsed by the ASF.
-



kylin git commit: minor, remove incubating stuff

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


minor, remove incubating stuff


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

Branch: refs/heads/2.x-staging
Commit: b502ff2ff6808433febb3452cb99e03182be611d
Parents: 7849a47
Author: lidongsjtu 
Authored: Tue Dec 22 16:21:33 2015 +0800
Committer: lidongsjtu 
Committed: Tue Dec 22 16:21:33 2015 +0800

--
 DISCLAIMER | 12 
 LICENSE|  2 +-
 NOTICE |  2 +-
 README.md  | 10 +-
 pom.xml| 32 
 5 files changed, 23 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b502ff2f/DISCLAIMER
--
diff --git a/DISCLAIMER b/DISCLAIMER
deleted file mode 100644
index 806ea66..000
--- a/DISCLAIMER
+++ /dev/null
@@ -1,12 +0,0 @@
-Apache Kylin is an effort undergoing incubation at the Apache Software
-Foundation (ASF), sponsored by the Apache Incubator PMC.
-
-Incubation is required of all newly accepted projects until a further
-review indicates that the infrastructure, communications, and decision
-making process have stabilized in a manner consistent with other
-successful ASF projects.
-
-While incubation status is not necessarily a reflection of the
-completeness or stability of the code, it does indicate that the
-project has yet to be fully endorsed by the ASF.
-

http://git-wip-us.apache.org/repos/asf/kylin/blob/b502ff2f/LICENSE
--
diff --git a/LICENSE b/LICENSE
index 92e09a4..3cec384 100644
--- a/LICENSE
+++ b/LICENSE
@@ -205,7 +205,7 @@
 
 
 ==
-Apache Kylin (incubating) Subcomponents:
+Apache Kylin Subcomponents:
 
 The Apache Kylin project contains subcomponents with separate copyright
 notices and license terms. Your use of the source code for the these

http://git-wip-us.apache.org/repos/asf/kylin/blob/b502ff2f/NOTICE
--
diff --git a/NOTICE b/NOTICE
index f18fba3..cd0c1ba 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Apache Kylin (incubating)
+Apache Kylin
 Copyright 2014-2015 The Apache Software Foundation
 
 This product includes software developed at

http://git-wip-us.apache.org/repos/asf/kylin/blob/b502ff2f/README.md
--
diff --git a/README.md b/README.md
index 10bc863..657212f 100644
--- a/README.md
+++ b/README.md
@@ -5,20 +5,20 @@ Apache Kylin
 
 Apache Kylin is an open source Distributed Analytics Engine, contributed by 
eBay Inc., provides SQL interface and multi-dimensional analysis (OLAP) on 
Hadoop supporting extremely large datasets.
 
-For more details, see the website 
[http://kylin.incubator.apache.org](http://kylin.incubator.apache.org).
+For more details, see the website 
[http://kylin.apache.org](http://kylin.apache.org).
 
 Documentation
 =
-Please refer to 
[http://kylin.incubator.apache.org/docs/](http://kylin.incubator.apache.org/docs/).
+Please refer to [http://kylin.apache.org/docs/](http://kylin.apache.org/docs/).
 
 Get Help
 
-The fastest way to get response from our developers is to send email to our 
mail list ,   
-and remember to subscribe our mail list via 

+The fastest way to get response from our developers is to send email to our 
mail list ,   
+and remember to subscribe our mail list via 
 
 License
 
-Please refer to 
[LICENSE](https://github.com/apache/incubator-kylin/blob/master/LICENSE) file.
+Please refer to [LICENSE](https://github.com/apache/kylin/blob/master/LICENSE) 
file.
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/b502ff2f/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 28ab8d7..adbf3a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 pom
 2.0-incubating-SNAPSHOT
 Kylin:HadoopOLAPEngine
-http://kylin.incubator.apache.org
+http://kylin.apache.org
 2014
 
 
@@ -134,38 +134,38 @@
 
 
 kylin-user
-user-subscr...@kylin.incubator.apache.org
-
user-unsubscr...@kylin.incubator.apache.org
-u...@kylin.incubator.apache.org
+user-subscr...@kylin.apache.org
+user-unsubscr...@kylin.apache.org
+

svn commit: r1723987 - in /kylin/site: ./ development/ docs/ docs/howto/ docs/install/

2016-01-11 Thread lidong
Author: lidong
Date: Mon Jan 11 08:25:54 2016
New Revision: 1723987

URL: http://svn.apache.org/viewvc?rev=1723987=rev
Log:
Update documents on rest APIs and devs

Modified:
kylin/site/development/dev_env.html
kylin/site/development/howto_contribute.html
kylin/site/development/howto_docs.html
kylin/site/docs/howto/howto_build_cube_with_restapi.html
kylin/site/docs/howto/howto_jdbc.html
kylin/site/docs/howto/howto_use_restapi.html
kylin/site/docs/howto/howto_use_restapi_in_js.html
kylin/site/docs/index.html
kylin/site/docs/install/hadoop_env.html
kylin/site/feed.xml

Modified: kylin/site/development/dev_env.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/dev_env.html?rev=1723987=1723986=1723987=diff
==
--- kylin/site/development/dev_env.html (original)
+++ kylin/site/development/dev_env.html Mon Jan 11 08:25:54 2016
@@ -454,7 +454,8 @@
 ambari-agent start
 ambari-server start
 
-With both command successfully run you can go to ambari home page at http://yoursandboxip:8080;>http://yoursandboxip:8080 
(user:admin,password:admin) to check everything’s status. By default ambari 
disables Hbase, you’ll need manually start the Hbase service.
+With both command successfully run you can go to ambari home page at http://yoursandboxip:8080;>http://yoursandboxip:8080 
(user:admin,password:admin) to check everything’s status. By default ambari 
disables Hbase, you’ll need manually start the Hbase service.
+https://raw.githubusercontent.com/KylinOLAP/kylinolap.github.io/master/docs/installation/starthbase.png;
 alt="start hbase in ambari" />
 
 For other hadoop distribution, basically start the hadoop cluster, make 
sure HDFS, YARN, Hive, HBase are running.
 

Modified: kylin/site/development/howto_contribute.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/howto_contribute.html?rev=1723987=1723986=1723987=diff
==
--- kylin/site/development/howto_contribute.html (original)
+++ kylin/site/development/howto_contribute.html Mon Jan 11 08:25:54 2016
@@ -453,7 +453,11 @@
 
   Raise an issue on JIRA, describe the feature/enhancement/bug
   Discuss with others in mailing list or issue comments, make sure the 
proposed changes fit in with what others are doing and have planned for the 
project
-  Make changes in your fork
+  Make changes in your fork
+
+  No strict code style at the moment, but the general rule is keep 
consistent with existing files. E.g. use 4-space indent for java files.
+
+  
   Write unit test if no existing cover your change
   Generate patch and attach it to relative JIRA; Please use git format-patch command to generate the 
patch, for a detail guide you can refer to https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/;>How
 to create and apply a patch with Git
 

Modified: kylin/site/development/howto_docs.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/howto_docs.html?rev=1723987=1723986=1723987=diff
==
--- kylin/site/development/howto_docs.html (original)
+++ kylin/site/development/howto_docs.html Mon Jan 11 08:25:54 2016
@@ -441,13 +441,24 @@

Before your work
 
-Install following tools before you add or edit documentation:  
-1. First, make sure Ruby and Gem are works on your machine  
-For Mac User, please refer https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x;>this to 
setup ruby env.  
-2. Then, install http://jekyllrb.com;>Jekyll, and plugins, for 
example:  
-gem install jekyll jekyll-multiple-languages 
kramdown rouge  
-3. http://jekyll-langs.liaohuqiu.net/cn/;>Jekyll Multiple Languages 
Plugin  
-4. And any markdown editor
+Install following tools before you add or edit documentation:
+
+
+  First, make sure Ruby and Gem work on your machine
+
+  For Mac user, please refer https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x;>this to 
setup ruby env.
+  For Windows user, use the http://rubyinstaller.org/downloads/;>ruby installer.
+  For China user, consider use a https://ruby.taobao.org/;>local gem repository in case of network 
issues.
+
+  
+  Then, install http://jekyllrb.com;>Jekyll, and required 
plugins
+
+  gem install jekyll 
jekyll-multiple-languages kramdown rouge
+  Note: Some specific version of jekyll and 
jekyll-multiple-languages does not work together (I got a “undefined 
method” error with jekyll 3.0.1 and jekyll-multiple-languages 2.0.3). In that 
case, jekyll 2.5.3 and jekyll-multiple-languages 1.0.8 is the known 
working version.
+
+  
+  And optionally any markdown editor you prefer
+
 
 About Jekyll
 Jekyll is a Ru

kylin git commit: KYLIN-1312 Enhance DeployCoprocessorCLI to support Cube names filter

2016-01-13 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging bc8ea7817 -> 33b4e9655


KYLIN-1312 Enhance DeployCoprocessorCLI to support Cube names filter


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

Branch: refs/heads/2.x-staging
Commit: 33b4e96552e3c690a6fe5a210c4e6c860238bff7
Parents: bc8ea78
Author: lidongsjtu 
Authored: Wed Jan 13 13:30:42 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jan 13 18:08:19 2016 +0800

--
 .../hbase/util/DeployCoprocessorCLI.java| 60 ++--
 1 file changed, 43 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/33b4e965/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
index 1cdb9e9..101abc2 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
@@ -79,13 +79,20 @@ public class DeployCoprocessorCLI {
 
 List tableNames = getHTableNames(kylinConfig);
 logger.info("Identify tables " + tableNames);
-
-if (args.length == 1) {
-logger.info("Probe run, existing. Append argument 'all' or 
specific tables to execute.");
-System.exit(0);
+
+if (args.length <= 1) {
+printUsageAndExit();
 }
-
-tableNames = filterTables(tableNames, Arrays.asList(args).subList(1, 
args.length));
+
+String filterType = args[1].toLowerCase();
+if (filterType.equals("-table")) {
+tableNames = filterByTables(tableNames, 
Arrays.asList(args).subList(2, args.length));
+} else if (filterType.equals("-cube")) {
+tableNames = filterByCubes(tableNames, 
Arrays.asList(args).subList(2, args.length));
+} else if (!filterType.equals("all")) {
+printUsageAndExit();
+}
+
 logger.info("Will execute tables " + tableNames);
 
 Set oldJarPaths = getCoprocessorJarPaths(hbaseAdmin, 
tableNames);
@@ -105,19 +112,38 @@ public class DeployCoprocessorCLI {
 logger.info("Active coprocessor jar: " + hdfsCoprocessorJar);
 }
 
-private static List filterTables(List tableNames, 
List list) {
+private static void printUsageAndExit() {
+logger.info("Probe run, exiting. Append argument 'all' or specific 
tables/cubes to execute.");
+System.exit(0);
+}
+
+private static List filterByCubes(List allTableNames, 
List cubeNames) {
+CubeManager cubeManager = 
CubeManager.getInstance(KylinConfig.getInstanceFromEnv());
+List result = Lists.newArrayList();
+for (String c : cubeNames) {
+c = c.trim();
+if (c.endsWith(","))
+c = c.substring(0, c.length() - 1);
+
+CubeInstance cubeInstance = cubeManager.getCube(c);
+for (CubeSegment segment : cubeInstance.getSegments()) {
+String tableName = segment.getStorageLocationIdentifier();
+if (allTableNames.contains(tableName)) {
+result.add(tableName);
+}
+}
+}
+return result;
+}
+
+private static List filterByTables(List allTableNames, 
List tableNames) {
 List result = Lists.newArrayList();
-for (String t : list) {
+for (String t : tableNames) {
 t = t.trim();
 if (t.endsWith(","))
 t = t.substring(0, t.length() - 1);
 
-if (t.equals("all")) {
-result.addAll(tableNames);
-break;
-}
-
-if (tableNames.contains(t)) {
+if (allTableNames.contains(t)) {
 result.add(t);
 }
 }
@@ -312,9 +338,9 @@ public class DeployCoprocessorCLI {
 }
 
 String jarPath = valueMatcher.group(1).trim();
-if (StringUtils.isNotEmpty(jarPath)) {
-result.add(jarPath);
-}
+if (StringUtils.isNotEmpty(jarPath)) {
+result.add(jarPath);
+}
 }
 }
 



kylin git commit: KYLIN-1182 Update Partition on CubeDesc from DataModelDesc during upgrade

2016-01-12 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 6adfc5c7c -> 7bfbbe2ff


KYLIN-1182 Update Partition on CubeDesc from DataModelDesc during upgrade


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

Branch: refs/heads/2.0-rc
Commit: 7bfbbe2ff6e45f63b5d78ec7df182c02d9c92cba
Parents: 6adfc5c
Author: lidongsjtu 
Authored: Tue Jan 12 21:10:48 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 12 21:10:52 2016 +0800

--
 .../cube/upgrade/v2/CubeMetadataUpgradeV2.java| 18 ++
 1 file changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7bfbbe2f/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v2/CubeMetadataUpgradeV2.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v2/CubeMetadataUpgradeV2.java
 
b/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v2/CubeMetadataUpgradeV2.java
index 54e1ffb..c285362 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v2/CubeMetadataUpgradeV2.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/upgrade/v2/CubeMetadataUpgradeV2.java
@@ -40,6 +40,7 @@ import org.apache.kylin.metadata.model.DimensionDesc;
 import org.apache.kylin.metadata.model.IEngineAware;
 import org.apache.kylin.metadata.model.IStorageAware;
 import org.apache.kylin.metadata.model.MeasureDesc;
+import org.apache.kylin.metadata.model.PartitionDesc;
 import org.apache.kylin.metadata.model.TblColRef;
 import org.apache.kylin.metadata.project.ProjectManager;
 
@@ -109,6 +110,7 @@ public class CubeMetadataUpgradeV2 {
 List cubeDescs = cubeDescManager.listAllDesc();
 for (CubeDesc cubeDesc : cubeDescs) {
 if (ArrayUtils.isEmpty(models) || ArrayUtils.contains(models, 
cubeDesc.getModelName())) {
+upgradeCubeDesc(cubeDesc);
 upgradeDataModelDesc(cubeDesc);
 upgradeCubeDescSignature(cubeDesc);
 }
@@ -159,6 +161,22 @@ public class CubeMetadataUpgradeV2 {
 }
 }
 
+private void upgradeCubeDesc(CubeDesc cubeDesc) {
+try {
+DataModelDesc modelDesc = cubeDesc.getModel();
+PartitionDesc modelPartDesc = modelDesc.getPartitionDesc();
+if (cubeDesc.getPartitionDateStart() == 0 && 
modelPartDesc.getPartitionDateStart() != 0) {
+
cubeDesc.setPartitionDateStart(modelPartDesc.getPartitionDateStart());
+
+store.putResource(cubeDesc.getResourcePath(), cubeDesc, 
CubeDescManager.CUBE_DESC_SERIALIZER);
+updatedResources.add(modelDesc.getResourcePath());
+}
+} catch (Exception e) {
+e.printStackTrace();
+errorMsgs.add("Update CubeDesc[" + cubeDesc.getName() + "] failed: 
" + e.getLocalizedMessage());
+}
+}
+
 private void upgradeDataModelDesc(CubeDesc cubeDesc) {
 boolean upgrade = false;
 DataModelDesc modelDesc = cubeDesc.getModel();



kylin git commit: KYLIN-993 Remove unnecessary logs

2016-01-10 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging f55fe0d90 -> 53cfead8b


KYLIN-993 Remove unnecessary logs


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

Branch: refs/heads/2.x-staging
Commit: 53cfead8bd664910601f8269800d649b4cd6929c
Parents: f55fe0d
Author: lidongsjtu 
Authored: Mon Jan 11 10:22:10 2016 +0800
Committer: lidongsjtu 
Committed: Mon Jan 11 10:22:10 2016 +0800

--
 .../dict/TupleFilterDictionaryTranslater.java   | 14 ++---
 query/src/test/resources/query/sql/query94.sql  | 22 
 query/src/test/resources/query/sql/query96.sql  | 22 
 3 files changed, 29 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/53cfead8/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
--
diff --git 
a/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
 
b/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
index 1826cd6..9ef360d 100644
--- 
a/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
+++ 
b/core-dictionary/src/main/java/org/apache/kylin/dict/TupleFilterDictionaryTranslater.java
@@ -48,24 +48,24 @@ public class TupleFilterDictionaryTranslater implements 
ITupleFilterTranslator {
 
 @Override
 public TupleFilter translate(TupleFilter tupleFilter) {
-TupleFilter translated = tupleFilter;
+TupleFilter translated = null;
 if (tupleFilter instanceof CompareTupleFilter) {
-logger.info("Translation to IN clause: " + tupleFilter);
 translated = translateCompareTupleFilter((CompareTupleFilter) 
tupleFilter);
-logger.info(translated == null ? "Failed, will use Calcite to 
handle computed comparison." : "Succeed: " + translated);
+if (translated != null) {
+logger.info("Translated {" + tupleFilter + "} to IN clause: {" 
+ translated + "}");
+}
 } else if (tupleFilter instanceof FunctionTupleFilter) {
-logger.info("Translation to IN clause: " + tupleFilter);
 translated = translateFunctionTupleFilter((FunctionTupleFilter) 
tupleFilter);
-logger.info(translated == null ? "Failed, will use Calcite to 
handle computed column." : "Succeed: " + translated);
+if (translated != null) {
+logger.info("Translated {" + tupleFilter + "} to IN clause: {" 
+ translated + "}");
+}
 } else if (tupleFilter instanceof LogicalTupleFilter) {
-logger.info("Translation to IN clause: " + tupleFilter);
 ListIterator childIterator = 
(ListIterator) tupleFilter.getChildren().listIterator();
 while (childIterator.hasNext()) {
 TupleFilter tempTranslated = translate(childIterator.next());
 if (tempTranslated != null)
 childIterator.set(tempTranslated);
 }
-logger.info(translated == null ? "Failed, will use Calcite to 
handle computed column." : "Succeed: " + translated);
 }
 return translated == null ? tupleFilter : translated;
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/53cfead8/query/src/test/resources/query/sql/query94.sql
--
diff --git a/query/src/test/resources/query/sql/query94.sql 
b/query/src/test/resources/query/sql/query94.sql
deleted file mode 100644
index 4e80d59..000
--- a/query/src/test/resources/query/sql/query94.sql
+++ /dev/null
@@ -1,22 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements.  See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership.  The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select upper(lstg_format_name) as lstg_format_name, count(*) as cnt from 

kylin git commit: KYLIN-1296 Refine restful API document

2016-01-10 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging e9afc45d3 -> 76397b67b


KYLIN-1296 Refine restful API document


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

Branch: refs/heads/1.x-staging
Commit: 76397b67b8131f1f7cb6de45578a5d79d9cc27d0
Parents: e9afc45
Author: lidongsjtu 
Authored: Mon Jan 11 14:10:15 2016 +0800
Committer: lidongsjtu 
Committed: Mon Jan 11 14:23:44 2016 +0800

--
 website/_dev/dev_env.md |   1 +
 .../howto/howto_build_cube_with_restapi.md  |  39 +++---
 website/_docs/howto/howto_jdbc.md   |  80 ++--
 website/_docs/howto/howto_use_restapi.md| 126 ++-
 website/_docs/howto/howto_use_restapi_in_js.md  |  19 ++-
 website/_docs/index.md  |   2 +-
 website/_docs/install/hadoop_evn.md |   4 +-
 7 files changed, 140 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/76397b67/website/_dev/dev_env.md
--
diff --git a/website/_dev/dev_env.md b/website/_dev/dev_env.md
index ec0d3fa..9eea9aa 100644
--- a/website/_dev/dev_env.md
+++ b/website/_dev/dev_env.md
@@ -23,6 +23,7 @@ ambari-server start
 {% endhighlight %}

 With both command successfully run you can go to ambari home page at 
 (user:admin,password:admin) to check everything's 
status. By default ambari disables Hbase, you'll need manually start the 
`Hbase` service.
+![start hbase in 
ambari](https://raw.githubusercontent.com/KylinOLAP/kylinolap.github.io/master/docs/installation/starthbase.png)
 
 For other hadoop distribution, basically start the hadoop cluster, make sure 
HDFS, YARN, Hive, HBase are running.
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/76397b67/website/_docs/howto/howto_build_cube_with_restapi.md
--
diff --git a/website/_docs/howto/howto_build_cube_with_restapi.md 
b/website/_docs/howto/howto_build_cube_with_restapi.md
index ee4759c..4113700 100644
--- a/website/_docs/howto/howto_build_cube_with_restapi.md
+++ b/website/_docs/howto/howto_build_cube_with_restapi.md
@@ -3,7 +3,7 @@ layout: docs
 title:  How to Build Cube with Restful API
 categories: howto
 permalink: /docs/howto/howto_build_cube_with_restapi.html
-version: v1.0
+version: v1.2
 since: v0.7.1
 ---
 
@@ -12,47 +12,44 @@ since: v0.7.1
 *   Add `Authorization` header to first request for authentication
 *   Or you can do a specific request by `POST 
http://localhost:7070/kylin/api/user/authentication`
 *   Once authenticated, client can go subsequent requests with cookies.
-*   Example
 {% highlight Groff markup %}
-POST http://localhost:7070/kylin/api/user/authentication
+POST http://localhost:7070/kylin/api/user/authentication
 
-Authorization:Basic JD124xxxGFxxxSDF
-Content-Type: application/json;charset=UTF-8
+Authorization:Basic JD124xxxGFxxxSDF
+Content-Type: application/json;charset=UTF-8
 {% endhighlight %}
 
 ### 2. Get details of cube. 
 *   `GET 
http://localhost:7070/kylin/api/cubes?cubeName={cube_name}=15=0`
 *   Client can find cube segment date ranges in returned cube detail.
-*   Example
 {% highlight Groff markup %}
-GET 
http://localhost:7070/kylin/api/cubes?cubeName=test_kylin_cube_with_slr=15=0
+GET 
http://localhost:7070/kylin/api/cubes?cubeName=test_kylin_cube_with_slr=15=0
 
-Authorization:Basic JD124xxxGFxxxSDF
-Content-Type: application/json;charset=UTF-8
+Authorization:Basic JD124xxxGFxxxSDF
+Content-Type: application/json;charset=UTF-8
 {% endhighlight %}
 ### 3. Then submit a build job of the cube. 
 *   `PUT http://localhost:7070/kylin/api/cubes/{cube_name}/rebuild`
-*   For put request body detail please refer to [service doc](rest_api.html). 
+*   For put request body detail please refer to [Build Cube 
API](howto_use_restapi.html#build-cube). 
 *   `startTime` and `endTime` should be utc timestamp.
 *   `buildType` can be `BUILD` ,`MERGE` or `REFRESH`. `BUILD` is for 
building a new segment, `REFRESH` for refreshing an existing segment. `MERGE` 
is for merging multiple existing segments into one bigger segment.
-*   This method will return a newly created job instance, in which the uuid is 
the identity of job to track job status.
-*   Example
+*   This method will return a new created job instance,  whose uuid is the 
unique id of job to track job status.
 {% highlight Groff markup %}
-PUT http://localhost:7070/kylin/api/cubes/test_kylin_cube_with_slr/rebuild
+PUT 

kylin git commit: KYLIN-1753 Set coreThreads configurable

2016-06-02 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 2d6cd529d -> 18516c5e7


KYLIN-1753 Set coreThreads configurable


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

Branch: refs/heads/master
Commit: 18516c5e77719a933b2d6b7fd48b13727f491a19
Parents: 2d6cd52
Author: lidongsjtu 
Authored: Fri Jun 3 10:02:20 2016 +0800
Committer: lidongsjtu 
Committed: Fri Jun 3 10:02:20 2016 +0800

--
 .../java/org/apache/kylin/common/KylinConfigBase.java   | 12 ++--
 .../org/apache/kylin/storage/hbase/HBaseConnection.java |  4 ++--
 2 files changed, 12 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/18516c5e/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index faf54d2..bc84c65 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -756,10 +756,18 @@ abstract public class KylinConfigBase implements 
Serializable {
 }
 
 public int getHBaseMaxConnectionThreads() {
-return 
Integer.parseInt(getOptional("kylin.query.hbase.hconnection.threads.max", 
"3072"));
+return 
Integer.parseInt(getOptional("kylin.query.hbase.hconnection.threads.max", 
"2048"));
+}
+
+public int getHBaseCoreConnectionThreads() {
+return 
Integer.parseInt(getOptional("kylin.query.hbase.hconnection.threads.core", 
"2048"));
+}
+
+public long getHBaseConnectionThreadPoolAliveSeconds() {
+return 
Long.parseLong(getOptional("kylin.query.hbase.hconnection.threads.alive.seconds",
 "60"));
 }
 
 public long getStorageCleanupTimeThreshold() {
-return 
Long.valueOf(this.getOptional("kylin.storage.cleanup.time.threshold", 
"17280"));//default two days
+return 
Long.valueOf(this.getOptional("kylin.storage.cleanup.time.threshold", 
"17280")); //default two days
 }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/18516c5e/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
index 09c14e1..31773a0 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
@@ -93,8 +93,8 @@ public class HBaseConnection {
 
 // copy from HConnectionImplementation.getBatchPool()
 int maxThreads = config.getHBaseMaxConnectionThreads();
-int coreThreads = 256;
-long keepAliveTime = 60;
+int coreThreads = config.getHBaseCoreConnectionThreads();
+long keepAliveTime = 
config.getHBaseConnectionThreadPoolAliveSeconds();
 LinkedBlockingQueue workQueue = new 
LinkedBlockingQueue(maxThreads * 100);
 ThreadPoolExecutor tpe = new ThreadPoolExecutor(coreThreads, 
maxThreads, keepAliveTime, TimeUnit.SECONDS, workQueue, //
 Threads.newDaemonThreadFactory("kylin-coproc-"));



kylin git commit: minor, MetadataManager logging typo

2016-06-06 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master b8258e43e -> 9ad34ec98


minor, MetadataManager logging typo


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

Branch: refs/heads/master
Commit: 9ad34ec98e91f18a4dac23ab05356894cf4586c8
Parents: b8258e4
Author: lidongsjtu 
Authored: Mon Jun 6 15:57:54 2016 +0800
Committer: lidongsjtu 
Committed: Mon Jun 6 15:57:59 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/9ad34ec9/core-metadata/src/main/java/org/apache/kylin/metadata/MetadataManager.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/MetadataManager.java 
b/core-metadata/src/main/java/org/apache/kylin/metadata/MetadataManager.java
index 3391ef4..45acd42 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/MetadataManager.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/MetadataManager.java
@@ -303,7 +303,7 @@ public class MetadataManager {
 reloadExternalFilterAt(path);
 }
 
-logger.debug("Loaded " + extFilterMap.size() + " SourceTable(s)");
+logger.debug("Loaded " + extFilterMap.size() + " ExternalFilter(s)");
 }
 
 private void reloadAllSourceTable() throws IOException {



kylin git commit: minor, add missing gpg public keys

2016-06-10 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master a8c3f6b5d -> 7719a486a


minor, add missing gpg public keys


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

Branch: refs/heads/master
Commit: 7719a486a9e365db473e975107fcb9f9e78d05c9
Parents: a8c3f6b
Author: lidongsjtu 
Authored: Sat Jun 11 10:30:54 2016 +0800
Committer: lidongsjtu 
Committed: Sat Jun 11 10:31:08 2016 +0800

--
 KEYS | 118 +-
 1 file changed, 117 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7719a486/KEYS
--
diff --git a/KEYS b/KEYS
index 7bc6be8..a9a123d 100644
--- a/KEYS
+++ b/KEYS
@@ -185,4 +185,120 @@ 
Qhv0lE54arzddayOR1rsRXnEZCiQ+Kh8iuTGLoIzRmf5v4myGhhNF+A6+rnUu363
 v3uGD1dDvjIuMgPUfmcg6cV6To5JRRejohA8xZs4jv07h8v0Ca8W9O8Wdt2FqWuI
 QIln1OQesKG4RSkX/g==
 =bzTi
--END PGP PUBLIC KEY BLOCK-
\ No newline at end of file
+-END PGP PUBLIC KEY BLOCK-
+pub   4096R/6FCF4720 2015-09-29
+uid  Shaofeng Shi 
+sig 36FCF4720 2015-09-29  Shaofeng Shi 
+sub   4096R/90EFBBD8 2015-09-29
+sig  6FCF4720 2015-09-29  Shaofeng Shi 
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1
+
+mQINBFYKTLQBEACwI2aNrCpaYAHI4nMjKSVOlBBCVA5mPaLTLeRXPWm9LY1HSjtl
+HAS3GZYijhwhJ9ZiDtHTvZUyZdEAJZf16jNg7p5dhdSfjp/b91a8NfNuoLuSXx7R
+NdBd4xB8IeSjZDGeMw5wqUXrta0w7dNJjEiYs9/4lh3BkA/x/NPRfjkYmHk6wixj
+YGs6rpolACqRBnZ612qoRI7eOrSy9WC6gU3sajHlWiOPHECBF7jNHU6aeQH4YIig
+UufHALU1gdb4o8qH6h9QibvCKoqdI7LwnD4Pn53SXAfpnNpkgH0SLzdpG++argd+
+33IQeo6DCNazkQ//qdRlrXFsriGNEq8Aip+614hyDkS3N20MZzHrX2sfOz19oZN4
+5UNvkz7gbys/L4MJL1RFapjgofXFKr7wNPAdWE+ZvJ4Irw88pM1LmtDSS/m1tyLn
+hz51vHcw/sBo90DisgNjPZUvO9kHXb1LTVVVmL6EdO0PFp9b4qlKGWUk+IGKejI6
+5ooSlMSjvPAYlmQvy+dcl5uVu+n9M/S5gPIWGiPxrJc73SzOZaHedTSVd2g9yJCz
+smuKKni7og19wgPrAEPvmVS/uObp+rmae2R5/EqgBL1PAIxnPCJbqUJp/865ti2K
+atQeua1yntn3cTFCpO6CkSQXk2LjMtLglZl4AOmf+9UmKi/AsefvSD8t+wARAQAB
+tCVTaGFvZmVuZyBTaGkgPHNoYW9mZW5nc2hpQGFwYWNoZS5vcmc+iQI3BBMBCgAh
+BQJWCky0AhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJEKvJ+IVvz0cgVE4P
+/RucXCEPWyG3GY7pGtgBuouBfhHhrWKAkVd58818NwLfOkvTWbGuGNWBqQ1CRPGk
+8ZhaNoVx3T8RqIOOyLx+ynOB6iBhPrVOyMsIxb7jh1BnMhe2aGTZGrrQCChGZk2H
+cdxVbCipO4Pw+YdUtJ4Mc3Xm14TkwAygGqrfJEKXgiAWBlvzrKp6twc69jgSd+To
+/UIrSFdPSlpbEpPiMuGKfhrz8OxPYy6N+/AgwIqGub/8NX9cteLCXRQmL5h7Z+6f
+7Wa4XGlEDfxCJFnWKsUYHwP5QHkJPfESGdbYgI+nrN8rv25rtINfWaiBgAsFSg4D
+KYZBXAelumDmLD/Rpn+hhjpeC5f6lPCqap1atHoqLx/s8YI8149on049pzA5t/zK
++G+c8bYf8xm6Ky/dBQP15ExoeeIpjC5A5vNlxenaEXXCya50J4+JLC5DTi9xRU7R
+Il3InFjeRmx1hPeyuYSY2irzBFvDhdt7U0wvwERS0lHMkwvB/MPrEwuB/II2tsFQ
+eZvHFhROYh4H8TqE9qICRtcdqNR8BXsZdEJtno4YH//b58130qJSNwcBF/mt+IcZ
+ryVQe3Y87evcF8RWTvWd4KQxe8BGoGQ5o8U230bxJ2bNYl+6O8Xzg+Q4HGpX4DGw
+EUVf4fE3n9O6kH0p9P6RAgnvlsKtsyubxlWz2zNXFuteuQINBFYKTLQBEADbKpjV
+NxaIuUg+wYSLP5erFvHwqDT5OJCj2y4wbwTzVb/1wZL2QwIPzb8lmlJuRsHo1E+j
+bjQE0I1RWiCAdekIpljBHc7fLsYhV0ONMgQZxlh3lpZCIftKmIPX4Eh93bhDBtRi
+CnYcWa/MDEH8rccwZaz0j+2OstIAv7x5/mUC55eutFtH4m5wRkbAjgcZbu6h0MNf
+KbBB4sOfHyx9L1bDIph42Hoh8rp+sMDYNf5Hnxr3Qt4ojANtQgQJzXudI6GzDZHy
+laIle5nJudyPy/TdF/8QXsUT62fbO8W8e4Q8Ljx192RULGoVYlz8WPkXF1vbL8Yb
+mMJyQ9YCgc5jIg/NusMFT0OXHV3YNQ/tZNh57i27pGO4RolRRbrXPrE/npIGBrsR
+8myPu3ussAMSWF2ejhWupKYS943ujNDOhKqC88R5mwHSzDpfytMUMsElwzrioAPV
+EiCCcJ8/Q0u8RAlF9A629iquIA5pp4Ga+9CLHdeGUohmnpIePz71+sXLW+VUOUlM
++euttiH/ltnRV0LKvS0w6sSnfOFOcOGZKxJ1FJhD5rx86dy7vjrWveOfoCNKjm3a
+jeTOfptvuXzJy0rEgVsKBRLCosjJIVgyWR3UkyXFCq3HfS0IutmdKMzxO+/J6t0c
+pnUsIHEiMlV/2TjwM/icFfUSDzAM/D+OoYe/IQARAQABiQIfBBgBCgAJBQJWCky0
+AhsMAAoJEKvJ+IVvz0cgJ0QQAJt5YtBkMKzPc/QGQo9T86ArCijnt2Z0P6d3S0Qr
+dye87F8ZmM3MRl/Bd7EpZ/+l3157FTX3jBKBrWsKTFcrG5IXrbMTS81pi555AwBm
+HcwCDBdFaLBKlqmQemgNKgnOGt+/G3w1oetPlbkKQEgFjCFfMF8CS8HdNqJU8pmd
+RE3IHMEvwrqx1dbGntRvUrSxs+rRgjJHympIAwIPdLHO6YSIrsbZEghUeVzd/5xi
+cEN06IieGY5t7PImpxeTmYAAdbQsN2GvYOG8NdOY7GrQ2Pu83mreb5Ma/Ui5UtPd
+3KWanXTP4lliY1DYkphp8USjdTul+srOK6X4dQ4y3EYyOzOytvMNV+G4bcYoTnoS
+gUkT1p0oHArxrQej3Py+no4Y5FuYEPJdZ3oHOhkqgn9j/UZBRxfc6VMRAD3ymRXC
+I7eDwdwOryyLBvA16L1+gs2kc5cbbfeFgfFiEFlMfT3eUN9mu5cQ3dNCQ119fcJp
+cu3E67ykSeibobuwNFj+JCilCUGrV5KN3FPVet3TX8F09O9z0CJwjmiK6+JkvVV8
+GB8WCCu0wEwSHYlTZkzOmXMNYZjk8fNYkWplWbF6xNPs1A00XqDwsa/V0F9EzJV+
+nYr5b8EWaM9qsjRh2aFPFtV+E/cSc7sdJxIY/TSdMfqhB13l7LTU/NwmgjE2TTUH
+WYIE
+=6yhP
+-END PGP PUBLIC KEY BLOCK-
+pub   4096R/C4CDED70 2016-03-04
+uid  Hongbin Ma (mahongbin) 
+sig 3C4CDED70 2016-03-04  Hongbin Ma (mahongbin) 

kylin git commit: minor, correct my keys

2016-06-10 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 2d80bac7b -> a8c3f6b5d


minor, correct my keys


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

Branch: refs/heads/master
Commit: a8c3f6b5d5401a2f640323d6c044a4560134e61e
Parents: 2d80bac
Author: lidongsjtu 
Authored: Sat Jun 11 10:25:33 2016 +0800
Committer: lidongsjtu 
Committed: Sat Jun 11 10:25:33 2016 +0800

--
 KEYS | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/a8c3f6b5/KEYS
--
diff --git a/KEYS b/KEYS
index bddc993..7bc6be8 100644
--- a/KEYS
+++ b/KEYS
@@ -128,6 +128,12 @@ 
tcKztIGMvp9Lc37QOUebIPocI8SbF5qM3q6S6vLJySB7VfrHpwMBkNDFLW2X+kA6
 hGwMd4I7h3m6EI6ntRCdOrbA3RyED9mCWP60eplEJ6vnA/EQvEI8oQCd
 =/uVI
 -END PGP PUBLIC KEY BLOCK-
+pub   4096R/23141CE6 2016-04-01
+uid  Dong Li (CODE SIGNING KEY) 
+sig 323141CE6 2016-04-01  Dong Li (CODE SIGNING KEY) 

+sub   4096R/0D18D457 2016-04-01
+sig  23141CE6 2016-04-01  Dong Li (CODE SIGNING KEY) 

+
 -BEGIN PGP PUBLIC KEY BLOCK-
 Version: GnuPG v1
 
@@ -179,4 +185,4 @@ 
Qhv0lE54arzddayOR1rsRXnEZCiQ+Kh8iuTGLoIzRmf5v4myGhhNF+A6+rnUu363
 v3uGD1dDvjIuMgPUfmcg6cV6To5JRRejohA8xZs4jv07h8v0Ca8W9O8Wdt2FqWuI
 QIln1OQesKG4RSkX/g==
 =bzTi
--END PGP PUBLIC KEY BLOCK-
+-END PGP PUBLIC KEY BLOCK-
\ No newline at end of file



svn commit: r1745419 - /kylin/site/blog/2016/05/24/aws-emr/index.html

2016-05-24 Thread lidong
Author: lidong
Date: Wed May 25 02:41:48 2016
New Revision: 1745419

URL: http://svn.apache.org/viewvc?rev=1745419=rev
Log:
remove a post

Removed:
kylin/site/blog/2016/05/24/aws-emr/index.html



kylin git commit: add blog for diagnosis tool

2016-06-10 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/document 9a204458d -> bc806da7c


add blog for diagnosis tool


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

Branch: refs/heads/document
Commit: bc806da7c635c16167f0262a3e99ebc9e0a04b1a
Parents: 9a20445
Author: lidongsjtu 
Authored: Fri Jun 10 23:09:56 2016 +0800
Committer: lidongsjtu 
Committed: Fri Jun 10 23:12:50 2016 +0800

--
 .../_posts/blog/2016-06-10-diagnosis-tool.md|  25 +++
 website/images/blog/diag1.png   | Bin 0 -> 133742 bytes
 website/images/blog/diag2.png   | Bin 0 -> 43327 bytes
 3 files changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/bc806da7/website/_posts/blog/2016-06-10-diagnosis-tool.md
--
diff --git a/website/_posts/blog/2016-06-10-diagnosis-tool.md 
b/website/_posts/blog/2016-06-10-diagnosis-tool.md
new file mode 100644
index 000..aff25f5
--- /dev/null
+++ b/website/_posts/blog/2016-06-10-diagnosis-tool.md
@@ -0,0 +1,25 @@
+---
+layout: post-blog
+title:  Diagnosis Tool Introduction
+date:   2016-06-10 23:20:00
+author: Dong Li
+categories: blog
+---
+
+## Introduction
+
+Since Apache Kylin 1.5.2, there's a diagnosis tool on Web UI, which aims to 
help Kylin admins to extract diagnostic information for fault analysis and 
performance tunning.
+
+### Project Diagnosis
+When user met issues about query failure, slow queries, metadata management 
and so on, he could click the 'Diagnosis' button on System tabpage.
+
+![](/images/blog/diag1.png)
+
+Several seconds later, a diagnosis package will be avaliable to download from 
web browser, which contains kylin logs, metadata, configuration etc. Users 
could extract the package and analyze. Also when users asking help from experts 
in his team, attaching the package would raise the communication effeiciency.
+
+### Job Diagnosis
+When user met issues about jobs, such as cubing failed, slow job and so on, he 
could click the 'Diagnosis' button in the Job's Action menu.
+
+![](/images/blog/diag2.png)
+
+The same with Project Diagnosis, a diagnosis package will be downloaded from 
web browser, which contains related logs, MR job info, metadata etc. User could 
use it for analysis or ask for help. 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/bc806da7/website/images/blog/diag1.png
--
diff --git a/website/images/blog/diag1.png b/website/images/blog/diag1.png
new file mode 100644
index 000..20d9284
Binary files /dev/null and b/website/images/blog/diag1.png differ

http://git-wip-us.apache.org/repos/asf/kylin/blob/bc806da7/website/images/blog/diag2.png
--
diff --git a/website/images/blog/diag2.png b/website/images/blog/diag2.png
new file mode 100644
index 000..8acd3ad
Binary files /dev/null and b/website/images/blog/diag2.png differ



kylin git commit: KYLIN-1741 Enhance diagnosis tool

2016-06-10 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master b044ed770 -> 2d80bac7b


KYLIN-1741 Enhance diagnosis tool


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

Branch: refs/heads/master
Commit: 2d80bac7b51e7326b0645613a983274a85145535
Parents: b044ed7
Author: lidongsjtu 
Authored: Fri Jun 10 23:30:38 2016 +0800
Committer: lidongsjtu 
Committed: Fri Jun 10 23:30:38 2016 +0800

--
 .../org/apache/kylin/tool/DiagnosisInfoCLI.java | 47 ++--
 .../org/apache/kylin/tool/util/ToolUtil.java|  2 +-
 2 files changed, 35 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/2d80bac7/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java 
b/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
index 7e85c17..ab845fb 100644
--- a/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/DiagnosisInfoCLI.java
@@ -21,15 +21,21 @@ package org.apache.kylin.tool;
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.List;
 
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.io.FileUtils;
+import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.OptionsHelper;
+import org.apache.kylin.metadata.project.ProjectInstance;
+import org.apache.kylin.metadata.project.ProjectManager;
 import org.apache.kylin.tool.util.ToolUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.Lists;
+
 public class DiagnosisInfoCLI extends AbstractInfoExtractor {
 private static final Logger logger = 
LoggerFactory.getLogger(DiagnosisInfoCLI.class);
 
@@ -61,25 +67,40 @@ public class DiagnosisInfoCLI extends AbstractInfoExtractor 
{
 diagnosisInfoCLI.execute(args);
 }
 
+private List getProjects(String projectSeed) {
+List result = Lists.newLinkedList();
+if (projectSeed.equalsIgnoreCase("-all")) {
+ProjectManager projectManager = 
ProjectManager.getInstance(KylinConfig.getInstanceFromEnv());
+for (ProjectInstance projectInstance : 
projectManager.listAllProjects()) {
+result.add(projectInstance.getName());
+}
+} else {
+result.add(projectSeed);
+}
+return result;
+}
+
 @Override
 protected void executeExtract(OptionsHelper optionsHelper, File exportDir) 
throws IOException {
-final String project = 
optionsHelper.getOptionValue(options.getOption("project"));
+final String projectInput = 
optionsHelper.getOptionValue(options.getOption("project"));
 boolean includeConf = optionsHelper.hasOption(OPTION_INCLUDE_CONF) ? 
Boolean.valueOf(optionsHelper.getOptionValue(OPTION_INCLUDE_CONF)) : true;
 boolean includeHBase = optionsHelper.hasOption(OPTION_INCLUDE_HBASE) ? 
Boolean.valueOf(optionsHelper.getOptionValue(OPTION_INCLUDE_HBASE)) : true;
 boolean includeClient = optionsHelper.hasOption(OPTION_INCLUDE_CLIENT) 
? Boolean.valueOf(optionsHelper.getOptionValue(OPTION_INCLUDE_CLIENT)) : true;
 
-// export cube metadata
-String[] cubeMetaArgs = { "-destDir", new File(exportDir, 
"metadata").getAbsolutePath(), "-project", project, "-compress", "false", 
"-submodule", "true" };
-CubeMetaExtractor cubeMetaExtractor = new CubeMetaExtractor();
-logger.info("CubeMetaExtractor args: " + 
Arrays.toString(cubeMetaArgs));
-cubeMetaExtractor.execute(cubeMetaArgs);
-
-// export HBase
-if (includeHBase) {
-String[] hbaseArgs = { "-destDir", new File(exportDir, 
"hbase").getAbsolutePath(), "-project", project, "-compress", "false", 
"-submodule", "true" };
-HBaseUsageExtractor hBaseUsageExtractor = new 
HBaseUsageExtractor();
-logger.info("HBaseUsageExtractor args: " + 
Arrays.toString(hbaseArgs));
-hBaseUsageExtractor.execute(hbaseArgs);
+for (String project : getProjects(projectInput)) {
+// export cube metadata
+String[] cubeMetaArgs = { "-destDir", new File(exportDir, 
"metadata").getAbsolutePath(), "-project", project, "-compress", "false", 
"-submodule", "true" };
+CubeMetaExtractor cubeMetaExtractor = new CubeMetaExtractor();
+logger.info("CubeMetaExtractor args: " + 
Arrays.toString(cubeMetaArgs));
+

svn commit: r1747954 - in /kylin/site: blog/index.html feed.xml

2016-06-11 Thread lidong
Author: lidong
Date: Sun Jun 12 03:37:39 2016
New Revision: 1747954

URL: http://svn.apache.org/viewvc?rev=1747954=rev
Log:
Fix format of blog that deploy with standalone hbase cluster

Modified:
kylin/site/blog/index.html
kylin/site/feed.xml

Modified: kylin/site/blog/index.html
URL: 
http://svn.apache.org/viewvc/kylin/site/blog/index.html?rev=1747954=1747953=1747954=diff
==
--- kylin/site/blog/index.html (original)
+++ kylin/site/blog/index.html Sun Jun 12 03:37:39 2016
@@ -204,13 +204,13 @@
 
 
 
-  Apache 
Kylin v1.5.1 Release Announcementposted: Apr 12, 2016
+  Apache Kylin v1.5.1 
正式发布posted: Apr 12, 
2016
 
   
 
 
 
-  Apache Kylin v1.5.1 
正式发布posted: Apr 12, 
2016
+  Apache 
Kylin v1.5.1 Release Announcementposted: Apr 12, 2016
 
   
 
@@ -234,13 +234,13 @@
 
 
 
-  Apache 
Kylin v1.3.0 Release Announcementposted: Mar 16, 2016
+  Apache Kylin v1.3.0 
正式发布posted: Mar 16, 
2016
 
   
 
 
 
-  Apache Kylin v1.3.0 
正式发布posted: Mar 16, 
2016
+  Apache 
Kylin v1.3.0 Release Announcementposted: Mar 16, 2016
 
   
 
@@ -258,25 +258,25 @@
 
 
 
-  Apache Kylin supports Tableau 
9 and MS Excel, Power BI nowposted: Dec 25, 2015
+  Apache Kylin增加
对Tableau 9及微软Excel, Power BI的支持posted: Dec 25, 2015
 
   
 
 
 
-  Apache Kylin增加
对Tableau 9及微软Excel, Power BI的支持posted: Dec 25, 2015
+  Apache Kylin supports Tableau 
9 and MS Excel, Power BI nowposted: Dec 25, 2015
 
   
 
 
 
-  Apache 
Kylin v1.2 Release Announcementposted: Dec 23, 2015
+  Apache 
Kylin v1.2 正式发布posted: Dec 
23, 2015
 
   
 
 
 
-  Apache 
Kylin v1.2 正式发布posted: Dec 
23, 2015
+  Apache 
Kylin v1.2 Release Announcementposted: Dec 23, 2015
 
   
 

Modified: kylin/site/feed.xml
URL: 
http://svn.apache.org/viewvc/kylin/site/feed.xml?rev=1747954=1747953=1747954=diff
==
--- kylin/site/feed.xml (original)
+++ kylin/site/feed.xml Sun Jun 12 03:37:39 2016
@@ -19,8 +19,8 @@
 Apache Kylin Home
 http://kylin.apache.org/
 http://kylin.apache.org/feed.xml; rel="self" 
type="application/rss+xml"/>
-Sat, 11 Jun 2016 20:32:40 -0700
-Sat, 11 Jun 2016 20:32:40 -0700
+Sun, 12 Jun 2016 04:36:27 -0700
+Sun, 12 Jun 2016 04:36:27 -0700
 Jekyll v2.5.3
 
   
@@ -527,94 +527,6 @@ send mail to Apache Kylin dev mailing li
   
 
   
-Apache Kylin v1.5.1 正式发布
-pApache Kylin社区非常高兴宣布Apache Kylin 
v1.5.1正式发布。/p
-
-pApache 
Kylin是一个开源的分布式分析引擎,提供Hadoop之上的SQL查询接口及多维分析(OLAP)能力以支持è¶
…大规模数据,最初由eBay Inc. 
开发并贡献至开源社区。/p
-
-p下载Apache Kylin v1.5.1源代码及二进制安装包,br /
-请访问a 
href=http://kylin.apache.org/cn/download/下载/a页面./p;
-
-p这是一个主要的版本发布带来了更稳定,健壮及更好管理的版本,Apache
 Kylin社区解决了37个issue,包
括Bug修复,功能增强及一些新特性等。/p
-
-h2 id=section主要变化/h2
-
-pstrong新功能/strong/p
-
-ul
-  li支持fact表明细数据查询 a 
href=https://issues.apache.org/jira/browse/KYLIN-1122KYLIN-1122/a/li;
-  li为TopN度量添加交互界面 a 
href=https://issues.apache.org/jira/browse/KYLIN-1378KYLIN-1378/a/li;
-  li自定义维度编码 a 
href=https://issues.apache.org/jira/browse/KYLIN-1492KYLIN-1492/a/li;
-  li元数据从1.0~1.3升级到1.5的校对与相关工具 a 
href=https://issues.apache.org/jira/browse/KYLIN-1495KYLIN-1495/a/li;
-  li在Kylin服务启动时执行某些类 a 
href=https://issues.apache.org/jira/browse/KYLIN-1501KYLIN-1501/a/li;
-  li通过Kylin.sh打印版本信息 a 
href=https://issues.apache.org/jira/browse/KYLIN-1503KYLIN-1503/a/li;
-  li增加冒烟测试脚本 a 
href=https://issues.apache.org/jira/browse/KYLIN-1531KYLIN-1531/a/li;
-  liCube特定配置以覆盖全局kylin.properties配置 a 
href=https://issues.apache.org/jira/browse/KYLIN-1534KYLIN-1534/a/li;
-  li删除Segment的REST接口 a 
href=https://issues.apache.org/jira/browse/KYLIN-1540KYLIN-1540/a/li;
-  liIntegerDimEnc, 为整数类型实现的自定义维度编码 a 
href=https://issues.apache.org/jira/browse/KYLIN-1541KYLIN-1541/a/li;
-  li打印诊断信息的工具 a 
href=https://issues.apache.org/jira/browse/KYLIN-1546KYLIN-1546/a/li;
-  li持久化最近几条不

kylin git commit: KYLIN-1719 Get kylinConfig from env

2016-06-05 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master ba7254a34 -> b8258e43e


KYLIN-1719 Get kylinConfig from env


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

Branch: refs/heads/master
Commit: b8258e43e45490eb272c0c96f5110b89e9d0b982
Parents: ba7254a
Author: lidongsjtu 
Authored: Mon Jun 6 11:04:45 2016 +0800
Committer: lidongsjtu 
Committed: Mon Jun 6 11:05:20 2016 +0800

--
 .../org/apache/kylin/storage/hbase/HBaseConnection.java   |  2 +-
 .../kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java | 10 ++
 2 files changed, 7 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b8258e43/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
index 31773a0..c1fd1ce 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
@@ -100,7 +100,7 @@ public class HBaseConnection {
 Threads.newDaemonThreadFactory("kylin-coproc-"));
 tpe.allowCoreThreadTimeOut(true);
 
-logger.info("Creating coprocessor thread pool with max of " + 
maxThreads);
+logger.info("Creating coprocessor thread pool with max of {}, core 
of {}", maxThreads, coreThreads);
 
 coprocessorPool = tpe;
 return coprocessorPool;

http://git-wip-us.apache.org/repos/asf/kylin/blob/b8258e43/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 0c6a053..9cc1bee 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -321,7 +321,11 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 
 final AtomicInteger totalScannedCount = new AtomicInteger(0);
 final ExpectedSizeIterator epResultItr = new 
ExpectedSizeIterator(shardNum);
-final boolean compressionResult = 
cubeSeg.getCubeDesc().getConfig().getCompressionResult();
+
+// KylinConfig: use env instance instead of CubeSegment, because 
KylinConfig will share among queries
+// for different cubes until redeployment of coprocessor jar.
+final KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
+final boolean compressionResult = kylinConfig.getCompressionResult();
 final CubeVisitProtos.CubeVisitRequest.Builder builder = 
CubeVisitProtos.CubeVisitRequest.newBuilder();
 
builder.setGtScanRequest(scanRequestByteString).setHbaseRawScan(rawScanByteString);
 for (IntList intList : hbaseColumnsToGTIntList) {
@@ -331,9 +335,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 builder.setBehavior(toggle);
 builder.setStartTime(System.currentTimeMillis());
 builder.setTimeout(epResultItr.getTimeout());
-// KylinConfig: use env instance instead of CubeSegment, because 
KylinConfig will share among queries
-// for different cubes until redeployment of coprocessor jar.
-
builder.setKylinProperties(KylinConfig.getInstanceFromEnv().getConfigAsString());
+builder.setKylinProperties(kylinConfig.getConfigAsString());
 
 for (final Pair epRange : 
getEPKeyRanges(cuboidBaseShard, shardNum, totalShards)) {
 executorService.submit(new Runnable() {



svn commit: r1745969 - in /kylin/site: docs15/howto/howto_update_coprocessor.html feed.xml

2016-05-29 Thread lidong
Author: lidong
Date: Sun May 29 06:00:40 2016
New Revision: 1745969

URL: http://svn.apache.org/viewvc?rev=1745969=rev
Log:
correct wrong path in docs

Modified:
kylin/site/docs15/howto/howto_update_coprocessor.html
kylin/site/feed.xml

Modified: kylin/site/docs15/howto/howto_update_coprocessor.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/howto/howto_update_coprocessor.html?rev=1745969=1745968=1745969=diff
==
--- kylin/site/docs15/howto/howto_update_coprocessor.html (original)
+++ kylin/site/docs15/howto/howto_update_coprocessor.html Sun May 29 06:00:40 
2016
@@ -2040,7 +2040,8 @@
 
 There’s a CLI tool to update HBase Coprocessor:
 
-$KYLIN_HOME/kylin.sh 
org.apache.kylin.storage.hbase.util.DeployCoprocessorCLI 
$KYLIN_HOME/lib/kylin-coprocessor-*.jar all
+$KYLIN_HOME/bin/kylin.sh 
org.apache.kylin.storage.hbase.util.DeployCoprocessorCLI 
$KYLIN_HOME/lib/kylin-coprocessor-*.jar all
+
 



Modified: kylin/site/feed.xml
URL: 
http://svn.apache.org/viewvc/kylin/site/feed.xml?rev=1745969=1745968=1745969=diff
==
--- kylin/site/feed.xml (original)
+++ kylin/site/feed.xml Sun May 29 06:00:40 2016
@@ -19,8 +19,8 @@
 Apache Kylin Home
 http://kylin.apache.org/
 http://kylin.apache.org/feed.xml; rel="self" 
type="application/rss+xml"/>
-Fri, 27 May 2016 05:20:22 -0700
-Fri, 27 May 2016 05:20:22 -0700
+Sun, 29 May 2016 06:59:20 -0700
+Sun, 29 May 2016 06:59:20 -0700
 Jekyll v2.5.3
 
   




kylin git commit: minor change on hbase conf

2016-05-30 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang-m2 [created] 445d458bd


minor change on hbase conf


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

Branch: refs/heads/yang-m2
Commit: 445d458bd97fab187c4de8a9d2bb660610e279e5
Parents: b5e7be9
Author: lidongsjtu 
Authored: Mon May 30 17:34:41 2016 +0800
Committer: lidongsjtu 
Committed: Mon May 30 17:44:31 2016 +0800

--
 build/bin/setenv.sh   | 2 +-
 .../main/java/org/apache/kylin/common/KylinConfigBase.java| 3 +++
 .../java/org/apache/kylin/storage/hbase/HBaseConnection.java  | 3 +++
 .../org/apache/kylin/storage/hbase/steps/CreateHTableJob.java | 7 ---
 4 files changed, 11 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/build/bin/setenv.sh
--
diff --git a/build/bin/setenv.sh b/build/bin/setenv.sh
index f98f3c3..d486672 100755
--- a/build/bin/setenv.sh
+++ b/build/bin/setenv.sh
@@ -19,7 +19,7 @@
 
 # (if your're deploying KYLIN on a powerful server and want to replace the 
default conservative settings)
 # uncomment following to for it to take effect
-export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -XX:MaxPermSize=128M 
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation 
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M"
+export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -Xss256K -XX:MaxPermSize=128M 
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation 
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M"
 # export KYLIN_JVM_SETTINGS="-Xms16g -Xmx16g -XX:MaxPermSize=512m 
-XX:NewSize=3g -XX:MaxNewSize=3g -XX:SurvivorRatio=4 
-XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled 
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode 
-XX:CMSInitiatingOccupancyFraction=70 -XX:+DisableExplicitGC"
 
 # uncomment following to for it to take effect(the values need adjusting to 
fit your env)

http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 1062749..b55c93c 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -646,4 +646,7 @@ abstract public class KylinConfigBase implements 
Serializable {
 return 
Integer.parseInt(getOptional("kylin.job.cubing.inmem.sampling.hll.precision", 
"14"));
 }
 
+public String getHBaseMaxConnectionThreads() {
+return getOptional("kylin.query.hbase.hconnection.threads.max", 
"3072");
+}
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
index e2f4f3a..bf5d5f6 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
@@ -110,6 +110,9 @@ public class HBaseConnection {
 conf.set(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, "6");
 // conf.set(ScannerCallable.LOG_SCANNER_ACTIVITY, "true");
 
+// set hbase.hconnection.threads.max to large to unblock region server 
requests from client threadpool.
+conf.set("hbase.hconnection.threads.max", 
KylinConfig.getInstanceFromEnv().getHBaseMaxConnectionThreads());
+
 return conf;
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
index 7a32e37..c5276a3 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
+++ 

kylin git commit: minor change on hbase conf

2016-05-30 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master a6a0c9bce -> 3ab5a80fb


minor change on hbase conf


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

Branch: refs/heads/master
Commit: 3ab5a80fb6dc082c880a3c08948bbf823f4b42df
Parents: a6a0c9b
Author: lidongsjtu 
Authored: Mon May 30 17:34:41 2016 +0800
Committer: lidongsjtu 
Committed: Mon May 30 17:54:02 2016 +0800

--
 build/bin/setenv.sh   | 2 +-
 .../main/java/org/apache/kylin/common/KylinConfigBase.java| 4 
 .../java/org/apache/kylin/storage/hbase/HBaseConnection.java  | 3 +++
 .../org/apache/kylin/storage/hbase/steps/CreateHTableJob.java | 7 ---
 4 files changed, 12 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3ab5a80f/build/bin/setenv.sh
--
diff --git a/build/bin/setenv.sh b/build/bin/setenv.sh
index f98f3c3..d486672 100755
--- a/build/bin/setenv.sh
+++ b/build/bin/setenv.sh
@@ -19,7 +19,7 @@
 
 # (if your're deploying KYLIN on a powerful server and want to replace the 
default conservative settings)
 # uncomment following to for it to take effect
-export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -XX:MaxPermSize=128M 
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation 
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M"
+export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -Xss256K -XX:MaxPermSize=128M 
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation 
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M"
 # export KYLIN_JVM_SETTINGS="-Xms16g -Xmx16g -XX:MaxPermSize=512m 
-XX:NewSize=3g -XX:MaxNewSize=3g -XX:SurvivorRatio=4 
-XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled 
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode 
-XX:CMSInitiatingOccupancyFraction=70 -XX:+DisableExplicitGC"
 
 # uncomment following to for it to take effect(the values need adjusting to 
fit your env)

http://git-wip-us.apache.org/repos/asf/kylin/blob/3ab5a80f/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 497f29d..7bb9076 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -750,4 +750,8 @@ abstract public class KylinConfigBase implements 
Serializable {
 public Map getUDFs() {
 return getPropertiesByPrefix("kylin.query.udf.");
 }
+
+public String getHBaseMaxConnectionThreads() {
+return getOptional("kylin.query.hbase.hconnection.threads.max", 
"3072");
+}
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/3ab5a80f/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
index e2f4f3a..bf5d5f6 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
@@ -110,6 +110,9 @@ public class HBaseConnection {
 conf.set(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, "6");
 // conf.set(ScannerCallable.LOG_SCANNER_ACTIVITY, "true");
 
+// set hbase.hconnection.threads.max to large to unblock region server 
requests from client threadpool.
+conf.set("hbase.hconnection.threads.max", 
KylinConfig.getInstanceFromEnv().getHBaseMaxConnectionThreads());
+
 return conf;
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/3ab5a80f/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
index 7a32e37..c5276a3 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
+++ 

kylin git commit: KYLIN-1749 Allow mandatory only cuboid

2016-05-30 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang-m2 04318ed10 -> 57295d624


KYLIN-1749 Allow mandatory only cuboid


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

Branch: refs/heads/yang-m2
Commit: 57295d624f6e93ee6f5312db7d6e056d9bb3b256
Parents: 04318ed
Author: Yang Li 
Authored: Tue May 31 08:12:47 2016 +0800
Committer: lidongsjtu 
Committed: Tue May 31 08:35:04 2016 +0800

--
 .../org/apache/kylin/common/KylinConfigBase.java|  4 
 .../java/org/apache/kylin/cube/cuboid/Cuboid.java   | 11 ++-
 .../apache/kylin/cube/cuboid/CuboidScheduler.java   | 12 
 .../apache/kylin/cube/model/AggregationGroup.java   |  7 ++-
 .../org/apache/kylin/cube/cuboid/CuboidTest.java| 16 
 .../test_case_data/localmeta/cube_desc/ssb.json |  7 ---
 6 files changed, 40 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/57295d62/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index b55c93c..15f10a9 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -391,6 +391,10 @@ abstract public class KylinConfigBase implements 
Serializable {
 return 
Integer.parseInt(getOptional("kylin.cube.aggrgroup.max.combination", "4096"));
 }
 
+public boolean getCubeAggrGroupIsMandatoryOnlyValid() {
+return 
Boolean.parseBoolean(getOptional("kylin.cube.aggrgroup.isMandatoryOnlyValid", 
"false"));
+}
+
 public String[] getCubeDimensionCustomEncodingFactories() {
 return 
getOptionalStringArray("kylin.cube.dimension.customEncodingFactories", new 
String[0]);
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/57295d62/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
--
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java 
b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
index e8a75d7..a00fc68 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java
@@ -102,9 +102,9 @@ public class Cuboid implements Comparable {
 return false;
 }
 
-private static boolean isValid(AggregationGroup agg, long cuboidID) {
-if (cuboidID < 0) {
-throw new IllegalArgumentException("Cuboid " + cuboidID + " should 
be greater than 0");
+static boolean isValid(AggregationGroup agg, long cuboidID) {
+if (cuboidID <= 0) {
+return false; //cuboid must be greater than 0
 }
 if ((cuboidID & ~agg.getPartialCubeFullMask()) != 0) {
 return false; //a cuboid's parent within agg is at most 
partialCubeFullMask
@@ -187,7 +187,7 @@ public class Cuboid implements Comparable {
 }
 }
 
-if ((cuboidID & ~agg.getMandatoryColumnMask()) != 0) {
+if (isValid(agg, cuboidID)) {
 return cuboidID;
 } else {
 // no column, add one column
@@ -231,7 +231,8 @@ public class Cuboid implements Comparable {
 if ((cuboidID & mandatoryColumnMask) != mandatoryColumnMask) {
 return false;
 } else {
-return ((cuboidID & ~mandatoryColumnMask) != 0);//cuboid with only 
mandatory columns is not valid
+//cuboid with only mandatory columns maybe valid
+return agg.isMandatoryOnlyValid() || (cuboidID & 
~mandatoryColumnMask) != 0;
 }
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/57295d62/core-cube/src/main/java/org/apache/kylin/cube/cuboid/CuboidScheduler.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/CuboidScheduler.java 
b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/CuboidScheduler.java
index b868782..bd6a37a 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/CuboidScheduler.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/CuboidScheduler.java
@@ -116,10 +116,6 @@ public class CuboidScheduler {
 return Collections.min(candidates, Cuboid.cuboidSelectComparator);
 }
 
-private boolean containsNonMandatoryColumn(AggregationGroup agg, long 

[07/10] kylin git commit: [maven-release-plugin] prepare release kylin-1.5.2

2016-05-31 Thread lidong
[maven-release-plugin] prepare release kylin-1.5.2


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

Branch: refs/heads/1.5.x-CDH5.7
Commit: 4afb303423a7b66e4fe89a1bdc9ba19ebba7343d
Parents: 67e1ada
Author: lidongsjtu 
Authored: Mon May 23 07:47:19 2016 +
Committer: lidongsjtu 
Committed: Tue May 31 14:46:53 2016 +0800

--
 assembly/pom.xml | 2 +-
 atopcalcite/pom.xml  | 2 +-
 core-common/pom.xml  | 2 +-
 core-cube/pom.xml| 2 +-
 core-dictionary/pom.xml  | 2 +-
 core-job/pom.xml | 2 +-
 core-metadata/pom.xml| 2 +-
 core-storage/pom.xml | 2 +-
 engine-mr/pom.xml| 2 +-
 engine-spark/pom.xml | 2 +-
 engine-streaming/pom.xml | 2 +-
 invertedindex/pom.xml| 2 +-
 jdbc/pom.xml | 2 +-
 kylin-it/pom.xml | 2 +-
 pom.xml  | 5 +++--
 query/pom.xml| 2 +-
 server/pom.xml   | 2 +-
 source-hive/pom.xml  | 2 +-
 source-kafka/pom.xml | 2 +-
 storage-hbase/pom.xml| 2 +-
 tool/pom.xml | 5 ++---
 21 files changed, 24 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/assembly/pom.xml
--
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 58f9e19..b6e3675 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -21,7 +21,7 @@
 
 kylin
 org.apache.kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 4.0.0

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/atopcalcite/pom.xml
--
diff --git a/atopcalcite/pom.xml b/atopcalcite/pom.xml
index d6c57f3..7c70df3 100644
--- a/atopcalcite/pom.xml
+++ b/atopcalcite/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/core-common/pom.xml
--
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 0c85124..7647621 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/core-cube/pom.xml
--
diff --git a/core-cube/pom.xml b/core-cube/pom.xml
index f41b507..2309872 100644
--- a/core-cube/pom.xml
+++ b/core-cube/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/core-dictionary/pom.xml
--
diff --git a/core-dictionary/pom.xml b/core-dictionary/pom.xml
index 17319e0..1af0091 100644
--- a/core-dictionary/pom.xml
+++ b/core-dictionary/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/core-job/pom.xml
--
diff --git a/core-job/pom.xml b/core-job/pom.xml
index 09f20e3..864bf1b 100644
--- a/core-job/pom.xml
+++ b/core-job/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/core-metadata/pom.xml
--
diff --git a/core-metadata/pom.xml b/core-metadata/pom.xml
index cd4abf9..f65129d 100644
--- a/core-metadata/pom.xml
+++ b/core-metadata/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/core-storage/pom.xml
--
diff --git a/core-storage/pom.xml b/core-storage/pom.xml
index b53bbc0..2f08dd9 100644
--- a/core-storage/pom.xml
+++ b/core-storage/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2-SNAPSHOT
+1.5.2
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/4afb3034/engine-mr/pom.xml
--
diff --git a/engine-mr/pom.xml b/engine-mr/pom.xml
index 8cc86d0..379eaa6 100644
--- a/engine-mr/pom.xml
+++ b/engine-mr/pom.xml
@@ -27,7 +27,7 @@
 

[01/10] kylin git commit: minor change on hbase conf [Forced Update!]

2016-05-31 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.5.x-CDH5.7 e0fbb3417 -> 159d9fd8b (forced update)


minor change on hbase conf


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

Branch: refs/heads/1.5.x-CDH5.7
Commit: 445d458bd97fab187c4de8a9d2bb660610e279e5
Parents: b5e7be9
Author: lidongsjtu 
Authored: Mon May 30 17:34:41 2016 +0800
Committer: lidongsjtu 
Committed: Mon May 30 17:44:31 2016 +0800

--
 build/bin/setenv.sh   | 2 +-
 .../main/java/org/apache/kylin/common/KylinConfigBase.java| 3 +++
 .../java/org/apache/kylin/storage/hbase/HBaseConnection.java  | 3 +++
 .../org/apache/kylin/storage/hbase/steps/CreateHTableJob.java | 7 ---
 4 files changed, 11 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/build/bin/setenv.sh
--
diff --git a/build/bin/setenv.sh b/build/bin/setenv.sh
index f98f3c3..d486672 100755
--- a/build/bin/setenv.sh
+++ b/build/bin/setenv.sh
@@ -19,7 +19,7 @@
 
 # (if your're deploying KYLIN on a powerful server and want to replace the 
default conservative settings)
 # uncomment following to for it to take effect
-export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -XX:MaxPermSize=128M 
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation 
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M"
+export KYLIN_JVM_SETTINGS="-Xms1024M -Xmx4096M -Xss256K -XX:MaxPermSize=128M 
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation 
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M"
 # export KYLIN_JVM_SETTINGS="-Xms16g -Xmx16g -XX:MaxPermSize=512m 
-XX:NewSize=3g -XX:MaxNewSize=3g -XX:SurvivorRatio=4 
-XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled 
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode 
-XX:CMSInitiatingOccupancyFraction=70 -XX:+DisableExplicitGC"
 
 # uncomment following to for it to take effect(the values need adjusting to 
fit your env)

http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 1062749..b55c93c 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -646,4 +646,7 @@ abstract public class KylinConfigBase implements 
Serializable {
 return 
Integer.parseInt(getOptional("kylin.job.cubing.inmem.sampling.hll.precision", 
"14"));
 }
 
+public String getHBaseMaxConnectionThreads() {
+return getOptional("kylin.query.hbase.hconnection.threads.max", 
"3072");
+}
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
index e2f4f3a..bf5d5f6 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
@@ -110,6 +110,9 @@ public class HBaseConnection {
 conf.set(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, "6");
 // conf.set(ScannerCallable.LOG_SCANNER_ACTIVITY, "true");
 
+// set hbase.hconnection.threads.max to large to unblock region server 
requests from client threadpool.
+conf.set("hbase.hconnection.threads.max", 
KylinConfig.getInstanceFromEnv().getHBaseMaxConnectionThreads());
+
 return conf;
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/445d458b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
index 7a32e37..c5276a3 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
+++ 

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

2016-05-31 Thread lidong
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/116454b8
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/116454b8
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/116454b8

Branch: refs/heads/1.5.x-CDH5.7
Commit: 116454b8f094f1b7842d11f1649202de031af7bf
Parents: 4afb303
Author: shaofengshi 
Authored: Wed Mar 23 17:07:05 2016 +0800
Committer: lidongsjtu 
Committed: Tue May 31 14:48:54 2016 +0800

--
 .../kylin/job/hadoop/invertedindex/IITest.java  | 10 ++-
 .../apache/kylin/common/KylinConfigBase.java|  4 +
 examples/test_case_data/sandbox/hbase-site.xml  | 19 +---
 .../test_case_data/sandbox/kylin_job_conf.xml   | 86 +-
 examples/test_case_data/sandbox/mapred-site.xml | 23 +++--
 .../kylin/provision/BuildCubeWithEngine.java| 54 +--
 .../kylin/provision/BuildIIWithStream.java  | 13 +--
 .../hbase/ii/ITInvertedIndexHBaseTest.java  |  9 +-
 pom.xml | 18 ++--
 .../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  | 38 +++-
 .../apache/kylin/rest/service/QueryService.java | 21 +++--
 .../apache/kylin/rest/service/UserService.java  | 16 ++--
 .../kylin/storage/hbase/HBaseConnection.java| 36 
 .../kylin/storage/hbase/HBaseResourceStore.java | 29 +++---
 .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++---
 .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +--
 .../storage/hbase/cube/v1/CubeStorageQuery.java |  4 +-
 .../hbase/cube/v1/HBaseClientKVIterator.java| 11 +--
 .../hbase/cube/v1/RegionScannerAdapter.java | 11 ++-
 .../cube/v1/SerializedHBaseTupleIterator.java   |  4 +-
 .../observer/AggregateRegionObserver.java   |  4 +-
 .../observer/AggregationScanner.java| 15 +++-
 .../observer/ObserverAggregationCache.java  | 15 ++--
 .../coprocessor/observer/ObserverEnabler.java   |  4 +-
 .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 11 +--
 .../storage/hbase/cube/v2/CubeHBaseScanRPC.java |  9 +-
 .../coprocessor/endpoint/CubeVisitService.java  |  4 +-
 .../storage/hbase/ii/IICreateHTableJob.java | 13 +--
 .../hbase/ii/InvertedIndexStorageQuery.java |  6 +-
 .../endpoint/EndpointTupleIterator.java | 13 +--
 .../ii/coprocessor/endpoint/IIEndpoint.java |  4 +-
 .../storage/hbase/steps/CubeHTableUtil.java | 16 ++--
 .../storage/hbase/steps/DeprecatedGCStep.java   | 24 ++---
 .../storage/hbase/steps/HBaseCuboidWriter.java  |  7 +-
 .../hbase/steps/HBaseStreamingOutput.java   |  9 +-
 .../kylin/storage/hbase/steps/MergeGCStep.java  | 24 ++---
 .../storage/hbase/util/CleanHtableCLI.java  | 13 +--
 .../storage/hbase/util/CubeMigrationCLI.java| 38 
 .../hbase/util/CubeMigrationCheckCLI.java   | 17 ++--
 .../hbase/util/DeployCoprocessorCLI.java| 23 ++---
 .../hbase/util/ExtendCubeToHybridCLI.java   |  8 +-
 .../hbase/util/GridTableHBaseBenchmark.java | 34 +++
 .../kylin/storage/hbase/util/HBaseClean.java| 18 ++--
 .../hbase/util/HBaseRegionSizeCalculator.java   | 42 -
 .../kylin/storage/hbase/util/HBaseUsage.java| 10 ++-
 .../storage/hbase/util/HbaseStreamingInput.java | 31 +++
 .../hbase/util/HtableAlterMetadataCLI.java  |  9 +-
 .../storage/hbase/util/OrphanHBaseCleanJob.java | 18 ++--
 .../kylin/storage/hbase/util/PingHBaseCLI.java  | 15 ++--
 .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +--
 .../storage/hbase/util/StorageCleanupJob.java   | 16 ++--
 .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++--
 .../observer/AggregateRegionObserverTest.java   | 31 +++
 .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java |  5 +-
 59 files changed, 530 insertions(+), 582 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/116454b8/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java
--
diff --git 
a/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java 
b/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java
index da25143..5d2cfc4 100644
--- 
a/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java
+++ 
b/assembly/src/test/java/org/apache/kylin/job/hadoop/invertedindex/IITest.java
@@ -38,6 +38,7 @@ import org.apache.commons.lang.NotImplementedException;
 import org.apache.hadoop.hbase.Cell;
 import 

[02/10] kylin git commit: KYLIN-1739 Do not cache and reuse hadoop configuration in HadoopUtil

2016-05-31 Thread lidong
KYLIN-1739 Do not cache and reuse hadoop configuration in HadoopUtil


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

Branch: refs/heads/1.5.x-CDH5.7
Commit: 04318ed10d758c075030b29f0a4a8a777c0f812f
Parents: 445d458
Author: Li Yang 
Authored: Thu May 26 14:00:01 2016 +0800
Committer: lidongsjtu 
Committed: Mon May 30 18:10:54 2016 +0800

--
 .../src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java  | 3 +--
 .../apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/04318ed1/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
--
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
index 9ce2bab..c638d99 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/HadoopUtil.java
@@ -41,8 +41,7 @@ public class HadoopUtil {
 public static Configuration getCurrentConfiguration() {
 if (hadoopConfig.get() == null) {
 Configuration conf = healSickConfig(new Configuration());
-
-hadoopConfig.set(conf);
+return conf;
 }
 return hadoopConfig.get();
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/04318ed1/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index 12b1fa8..f04d46e 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -90,7 +90,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 this.expectedSize = expectedSize;
 this.queue = new ArrayBlockingQueue(expectedSize);
 
-this.timeout = 
HadoopUtil.getCurrentConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, 
HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
+this.timeout = 
HBaseConnection.getCurrentHBaseConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
 HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
 this.timeout *= 
KylinConfig.getInstanceFromEnv().getCubeVisitTimeoutTimes();
 
 if (BackdoorToggles.getQueryTimeout() != -1) {



kylin git commit: KYLIN-1751 Cleanup log4j properties file

2016-05-31 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master cf48410dd -> 164d68359


KYLIN-1751 Cleanup log4j properties file


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

Branch: refs/heads/master
Commit: 164d683599163510fb5303fc71d59c35a65f0191
Parents: cf48410
Author: lidongsjtu 
Authored: Tue May 31 14:13:27 2016 +0800
Committer: lidongsjtu 
Committed: Tue May 31 14:13:27 2016 +0800

--
 build/bin/kylin.sh  |  4 +-
 build/conf/kylin-server-log4j.properties| 30 +++
 .../resources/kylin-server-log4j.properties | 53 
 3 files changed, 32 insertions(+), 55 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/164d6835/build/bin/kylin.sh
--
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index 42789be..ce64a40 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -71,7 +71,7 @@ then
 
 export 
HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$HBASE_CLASSPATH_PREFIX
 mkdir -p ${KYLIN_HOME}/ext
-export 
HBASE_CLASSPATH=$hive_dependency:${KYLIN_HOME}/lib/*:${KYLIN_HOME}/ext/*:${HBASE_CLASSPATH}
+export 
HBASE_CLASSPATH=$hive_dependency:${KYLIN_HOME}/lib/*:${KYLIN_HOME}/ext/*:${HBASE_CLASSPATH}:${KYLIN_HOME}/conf
 
 if [ -z "$KYLIN_REST_ADDRESS" ]
 then
@@ -87,8 +87,8 @@ then
 
 # KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
 hbase ${KYLIN_EXTRA_START_OPTS} \
--Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+-Dlog4j.configuration=kylin-server-log4j.properties \
 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
 -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
 -Djava.endorsed.dirs=${tomcat_root}/endorsed  \

http://git-wip-us.apache.org/repos/asf/kylin/blob/164d6835/build/conf/kylin-server-log4j.properties
--
diff --git a/build/conf/kylin-server-log4j.properties 
b/build/conf/kylin-server-log4j.properties
new file mode 100644
index 000..2163fd0
--- /dev/null
+++ b/build/conf/kylin-server-log4j.properties
@@ -0,0 +1,30 @@
+#
+# 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.
+#
+
+
+#define appenders
+log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.File=logs/kylin.log
+log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}:%L : 
%m%n
+log4j.appender.file.Append=true
+
+#overall config
+log4j.rootLogger=INFO,file
+log4j.logger.org.apache.kylin=DEBUG
+log4j.logger.org.springframework=WARN
+log4j.logger.org.springframework.security=INFO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/164d6835/server/src/main/resources/kylin-server-log4j.properties
--
diff --git a/server/src/main/resources/kylin-server-log4j.properties 
b/server/src/main/resources/kylin-server-log4j.properties
deleted file mode 100644
index 4ad7721..000
--- a/server/src/main/resources/kylin-server-log4j.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required 

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

2016-05-31 Thread lidong
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/159d9fd8
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/159d9fd8
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/159d9fd8

Branch: refs/heads/1.5.x-CDH5.7
Commit: 159d9fd8b81f8cca729ea913f3c18737d12245aa
Parents: 116454b
Author: Lynne Jiang 
Authored: Mon May 16 03:33:27 2016 -0700
Committer: lidongsjtu 
Committed: Tue May 31 14:48:54 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 | 396 ++-
 examples/test_case_data/sandbox/yarn-site.xml   | 496 ++-
 pom.xml |  18 +-
 server/pom.xml  |  36 ++
 .../storage/hbase/steps/MockupMapContext.java   |  19 +-
 10 files changed, 418 insertions(+), 1129 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/159d9fd8/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/159d9fd8/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/159d9fd8/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
+

[06/10] kylin git commit: update hbase classpath

2016-05-31 Thread lidong
update hbase classpath


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

Branch: refs/heads/1.5.x-CDH5.7
Commit: 67e1ada1b7d43dd5506b7cc2c028fec478757e27
Parents: 668e125
Author: lidongsjtu 
Authored: Tue May 31 13:20:06 2016 +0800
Committer: lidongsjtu 
Committed: Tue May 31 13:20:06 2016 +0800

--
 build/bin/kylin.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/67e1ada1/build/bin/kylin.sh
--
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index 0e5d236..19af0b5 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -71,7 +71,7 @@ then
 
 export 
HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$HBASE_CLASSPATH_PREFIX
 mkdir -p ${KYLIN_HOME}/ext
-export 
HBASE_CLASSPATH=$hive_dependency:${KYLIN_HOME}/lib/*:${KYLIN_HOME}/ext/*:${HBASE_CLASSPATH}
+export 
HBASE_CLASSPATH=$hive_dependency:${KYLIN_HOME}/lib/*:${KYLIN_HOME}/ext/*:${HBASE_CLASSPATH}:${KYLIN_HOME}/conf
 
 #debug if encounter NoClassDefError
 #hbase classpath



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

2016-05-31 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/116454b8/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
index f04d46e..f2573b4 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseEndpointRPC.java
@@ -35,8 +35,9 @@ import javax.annotation.Nullable;
 
 import org.apache.commons.lang.NotImplementedException;
 import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.client.HConnection;
-import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.client.coprocessor.Batch;
 import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
 import org.apache.hadoop.hbase.ipc.ServerRpcController;
@@ -267,7 +268,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 final ImmutableBitSet selectedColBlocks = 
scanRequest.getSelectedColBlocks().set(0);
 
 // globally shared connection, does not require close
-final HConnection conn = 
HBaseConnection.get(cubeSeg.getCubeInstance().getConfig().getStorageUrl());
+final Connection conn = 
HBaseConnection.get(cubeSeg.getCubeInstance().getConfig().getStorageUrl());
 
 final List hbaseColumnsToGTIntList = Lists.newArrayList();
 List hbaseColumnsToGT = 
getHBaseColumnsGTMapping(selectedColBlocks);
@@ -339,7 +340,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 
 Map results;
 try {
-results = getResults(builder.build(), 
conn.getTable(cubeSeg.getStorageLocationIdentifier()), epRange.getFirst(), 
epRange.getSecond());
+results = getResults(builder.build(), 
conn.getTable(TableName.valueOf(cubeSeg.getStorageLocationIdentifier())), 
epRange.getFirst(), epRange.getSecond());
 } catch (Throwable throwable) {
 throw new RuntimeException(logHeader + "Error when 
visiting cubes by endpoint", throwable);
 }
@@ -384,7 +385,7 @@ public class CubeHBaseEndpointRPC extends CubeHBaseRPC {
 
 }
 
-private Map getResults(final 
CubeVisitProtos.CubeVisitRequest request, HTableInterface table, byte[] 
startKey, byte[] endKey) throws Throwable {
+private Map getResults(final 
CubeVisitProtos.CubeVisitRequest request, Table table, byte[] startKey, byte[] 
endKey) throws Throwable {
 Map results = 
table.coprocessorService(CubeVisitProtos.CubeVisitService.class, startKey, 
endKey, new Batch.Call() {
 public CubeVisitProtos.CubeVisitResponse 
call(CubeVisitProtos.CubeVisitService rowsService) throws IOException {
 ServerRpcController controller = new ServerRpcController();

http://git-wip-us.apache.org/repos/asf/kylin/blob/116454b8/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
index 938145b..9b8a3de 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeHBaseScanRPC.java
@@ -24,8 +24,9 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.hadoop.hbase.Cell;
-import org.apache.hadoop.hbase.client.HConnection;
-import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.client.Scan;
@@ -164,8 +165,8 @@ public class CubeHBaseScanRPC extends CubeHBaseRPC {
 // primary key (also the 0th column block) is always selected
 final ImmutableBitSet selectedColBlocks = 
scanRequest.getSelectedColBlocks().set(0);
 // globally shared connection, does not require close
-HConnection hbaseConn = 

[kylin] Git Push Summary

2016-05-26 Thread lidong
Repository: kylin
Updated Tags:  refs/tags/kylin-1.5.2-HBase1.x [created] e85b49823


svn commit: r1745707 - in /kylin/site: ./ docs15/ docs15/gettingstarted/ docs15/howto/ docs15/install/ docs15/tutorial/

2016-05-26 Thread lidong
Author: lidong
Date: Fri May 27 04:22:03 2016
New Revision: 1745707

URL: http://svn.apache.org/viewvc?rev=1745707=rev
Log:
update upgrade doc

Modified:
kylin/site/docs15/gettingstarted/best_practices.html
kylin/site/docs15/gettingstarted/concepts.html
kylin/site/docs15/gettingstarted/events.html
kylin/site/docs15/gettingstarted/faq.html
kylin/site/docs15/gettingstarted/terminology.html
kylin/site/docs15/howto/howto_backup_hbase.html
kylin/site/docs15/howto/howto_backup_metadata.html
kylin/site/docs15/howto/howto_build_cube_with_restapi.html
kylin/site/docs15/howto/howto_cleanup_storage.html
kylin/site/docs15/howto/howto_jdbc.html
kylin/site/docs15/howto/howto_ldap_and_sso.html
kylin/site/docs15/howto/howto_optimize_cubes.html
kylin/site/docs15/howto/howto_update_coprocessor.html
kylin/site/docs15/howto/howto_upgrade.html
kylin/site/docs15/howto/howto_use_restapi.html
kylin/site/docs15/howto/howto_use_restapi_in_js.html
kylin/site/docs15/index.html
kylin/site/docs15/install/advance_settings.html
kylin/site/docs15/install/hadoop_env.html
kylin/site/docs15/install/index.html
kylin/site/docs15/install/kylin_cluster.html
kylin/site/docs15/release_notes.html
kylin/site/docs15/tutorial/acl.html
kylin/site/docs15/tutorial/create_cube.html
kylin/site/docs15/tutorial/cube_build_job.html
kylin/site/docs15/tutorial/cube_streaming.html
kylin/site/docs15/tutorial/kylin_sample.html
kylin/site/docs15/tutorial/odbc.html
kylin/site/docs15/tutorial/powerbi.html
kylin/site/docs15/tutorial/tableau.html
kylin/site/docs15/tutorial/tableau_91.html
kylin/site/docs15/tutorial/web.html
kylin/site/feed.xml

Modified: kylin/site/docs15/gettingstarted/best_practices.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/best_practices.html?rev=1745707=1745706=1745707=diff
==
--- kylin/site/docs15/gettingstarted/best_practices.html (original)
+++ kylin/site/docs15/gettingstarted/best_practices.html Fri May 27 04:22:03 
2016
@@ -1936,7 +1936,7 @@
 
   
 
-  Upgrade from old 
version  
+  Upgrade from old 
versions  
   
 
 

Modified: kylin/site/docs15/gettingstarted/concepts.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/concepts.html?rev=1745707=1745706=1745707=diff
==
--- kylin/site/docs15/gettingstarted/concepts.html (original)
+++ kylin/site/docs15/gettingstarted/concepts.html Fri May 27 04:22:03 2016
@@ -1936,7 +1936,7 @@
 
   
 
-  Upgrade from old 
version  
+  Upgrade from old 
versions  
   
 
 

Modified: kylin/site/docs15/gettingstarted/events.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/events.html?rev=1745707=1745706=1745707=diff
==
--- kylin/site/docs15/gettingstarted/events.html (original)
+++ kylin/site/docs15/gettingstarted/events.html Fri May 27 04:22:03 2016
@@ -1936,7 +1936,7 @@
 
   
 
-  Upgrade from old 
version  
+  Upgrade from old 
versions  
   
 
 

Modified: kylin/site/docs15/gettingstarted/faq.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/faq.html?rev=1745707=1745706=1745707=diff
==
--- kylin/site/docs15/gettingstarted/faq.html (original)
+++ kylin/site/docs15/gettingstarted/faq.html Fri May 27 04:22:03 2016
@@ -1936,7 +1936,7 @@
 
   
 
-  Upgrade from old 
version  
+  Upgrade from old 
versions  
   
 
 

Modified: kylin/site/docs15/gettingstarted/terminology.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/gettingstarted/terminology.html?rev=1745707=1745706=1745707=diff
==
--- kylin/site/docs15/gettingstarted/terminology.html (original)
+++ kylin/site/docs15/gettingstarted/terminology.html Fri May 27 04:22:03 2016
@@ -1936,7 +1936,7 @@
 
   
 
-  Upgrade from old 
version  
+  Upgrade from old 
versions  
   
 
 

Modified: kylin/site/docs15/howto/howto_backup_hbase.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/howto/howto_backup_hbase.html?rev=1745707=1745706=1745707=diff
==
--- kylin/site/docs15/howto/howto_backup_hbase.html (original)
+++ kylin/site/docs15/howto/howto_backup_hbase.html Fri May 27 04:22:03 2016
@@ -1936,7 +1936,7 @@
 
   
 
-  Upgrade from old 
version  
+  Upgrade from old 
versions  
   
 
 

Modified: kylin/site/docs15/howto/howto_backup_metadata.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs15/howto

kylin git commit: KYLIN-1657 add configuration kylin.job.mapreduce.min.reducer.number

2016-05-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 86f7149fc -> 3bca0bfe4


KYLIN-1657 add configuration kylin.job.mapreduce.min.reducer.number

Signed-off-by: lidongsjtu 


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

Branch: refs/heads/master
Commit: 3bca0bfe4d5fe9f9080a6bc2e38d6fc8e3c2069b
Parents: 86f7149
Author: gaodayue 
Authored: Thu Apr 28 10:51:46 2016 +0800
Committer: lidongsjtu 
Committed: Fri May 27 13:52:19 2016 +0800

--
 .../src/main/java/org/apache/kylin/common/KylinConfigBase.java | 4 
 .../main/java/org/apache/kylin/engine/mr/steps/CuboidJob.java  | 6 +++---
 .../java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java  | 6 +++---
 3 files changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3bca0bfe/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 2ffb219..b2294b0 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -307,6 +307,10 @@ abstract public class KylinConfigBase implements 
Serializable {
 return 
Double.parseDouble(getOptional("kylin.job.mapreduce.default.reduce.count.ratio",
 "1.0"));
 }
 
+public int getHadoopJobMinReducerNumber() {
+return 
Integer.parseInt(getOptional("kylin.job.mapreduce.min.reducer.number", "1"));
+}
+
 public int getHadoopJobMaxReducerNumber() {
 return 
Integer.parseInt(getOptional("kylin.job.mapreduce.max.reducer.number", "500"));
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/3bca0bfe/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/CuboidJob.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/CuboidJob.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/CuboidJob.java
index ce353f7..a445f71 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/CuboidJob.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/CuboidJob.java
@@ -203,9 +203,9 @@ public class CuboidJob extends AbstractHadoopJob {
 numReduceTasks = numReduceTasks * 4;
 }
 
-// at least 1 reducer
-numReduceTasks = Math.max(1, numReduceTasks);
-// no more than 5000 reducer by default
+// at least 1 reducer by default
+numReduceTasks = Math.max(kylinConfig.getHadoopJobMinReducerNumber(), 
numReduceTasks);
+// no more than 500 reducer by default
 numReduceTasks = Math.min(kylinConfig.getHadoopJobMaxReducerNumber(), 
numReduceTasks);
 
 jobConf.setInt(MAPRED_REDUCE_TASKS, numReduceTasks);

http://git-wip-us.apache.org/repos/asf/kylin/blob/3bca0bfe/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java
index e7bbdf1..258ec95 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/InMemCuboidJob.java
@@ -158,9 +158,9 @@ public class InMemCuboidJob extends AbstractHadoopJob {
 // number of reduce tasks
 int numReduceTasks = (int) Math.round(totalSizeInM / perReduceInputMB);
 
-// at least 1 reducer
-numReduceTasks = Math.max(1, numReduceTasks);
-// no more than 5000 reducer by default
+// at least 1 reducer by default
+numReduceTasks = Math.max(kylinConfig.getHadoopJobMinReducerNumber(), 
numReduceTasks);
+// no more than 500 reducer by default
 numReduceTasks = Math.min(kylinConfig.getHadoopJobMaxReducerNumber(), 
numReduceTasks);
 
 logger.info("Having total map input MB " + Math.round(totalSizeInM));



kylin git commit: KYLIN-1694 make multiply coefficient configurable when estimating cuboid size

2016-05-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 3bca0bfe4 -> 6845a358c


KYLIN-1694 make multiply coefficient configurable when estimating cuboid size

Signed-off-by: lidongsjtu 


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

Branch: refs/heads/master
Commit: 6845a358c2b7d56ee453bcb8d769d0fcb9b609ea
Parents: 3bca0bf
Author: kangkaisen 
Authored: Mon May 16 14:49:26 2016 +0800
Committer: lidongsjtu 
Committed: Fri May 27 13:54:50 2016 +0800

--
 .../java/org/apache/kylin/common/KylinConfigBase.java|  8 
 .../apache/kylin/engine/mr/common/CubeStatsReader.java   | 11 +++
 2 files changed, 15 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/6845a358/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index b2294b0..497f29d 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -409,6 +409,14 @@ abstract public class KylinConfigBase implements 
Serializable {
 return Long.parseLong(getOptional("kylin.job.step.timeout", 
String.valueOf(2 * 60 * 60)));
 }
 
+public double getJobCuboidSizeRatio(){
+return Double.parseDouble(getOptional("kylin.job.cuboid.size.ratio", 
"0.25"));
+}
+
+public double getJobCuboidSizeMemHungryRatio(){
+return 
Double.parseDouble(getOptional("kylin.job.cuboid.size.memhungry.ratio", 
"0.05"));
+}
+
 public String getCubeAlgorithm() {
 return getOptional("kylin.cube.algorithm", "auto");
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/6845a358/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java
index 940172b..8973a99 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/CubeStatsReader.java
@@ -180,6 +180,7 @@ public class CubeStatsReader {
 private static double estimateCuboidStorageSize(CubeSegment cubeSegment, 
long cuboidId, long rowCount, long baseCuboidId, List 
rowKeyColumnLength) {
 
 int bytesLength = cubeSegment.getRowKeyPreambleSize();
+KylinConfig kylinConf = cubeSegment.getConfig();
 
 long mask = Long.highestOneBit(baseCuboidId);
 long parentCuboidIdActualLength = Long.SIZE - 
Long.numberOfLeadingZeros(baseCuboidId);
@@ -204,11 +205,13 @@ public class CubeStatsReader {
 
 double ret = 1.0 * bytesLength * rowCount / (1024L * 1024L);
 if (isMemoryHungry) {
-logger.info("Cube is memory hungry, storage size estimation 
multiply 0.05");
-ret *= 0.05;
+double cuboidSizeMemHungryRatio = 
kylinConf.getJobCuboidSizeMemHungryRatio();
+logger.info("Cube is memory hungry, storage size estimation 
multiply " + cuboidSizeMemHungryRatio);
+ret *= cuboidSizeMemHungryRatio;
 } else {
-logger.info("Cube is not memory hungry, storage size estimation 
multiply 0.25");
-ret *= 0.25;
+double cuboidSizeRatio = kylinConf.getJobCuboidSizeRatio();
+logger.info("Cube is not memory hungry, storage size estimation 
multiply " + cuboidSizeRatio);
+ret *= cuboidSizeRatio;
 }
 logger.info("Cuboid " + cuboidId + " has " + rowCount + " rows, each 
row size is " + bytesLength + " bytes." + " Total size is " + ret + "M.");
 return ret;



[4/4] kylin git commit: minor, update KylinVersion after release

2016-05-26 Thread lidong
minor, update KylinVersion after release


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

Branch: refs/heads/master
Commit: 61c9e36013dc3590e59ba65a18b0ebaa86ae83cd
Parents: 11b0a5c
Author: lidongsjtu 
Authored: Thu May 26 17:12:16 2016 +0800
Committer: lidongsjtu 
Committed: Thu May 26 17:12:16 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/61c9e360/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
index 51fc806..569d937 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java
@@ -66,7 +66,7 @@ public class KylinVersion {
 /**
  * Require MANUAL updating kylin version per ANY upgrading.
  */
-private static final KylinVersion CURRENT_KYLIN_VERSION = new 
KylinVersion("1.5.2");
+private static final KylinVersion CURRENT_KYLIN_VERSION = new 
KylinVersion("1.5.3");
 
 private static final Set SIGNATURE_INCOMPATIBLE_REVISIONS = 
new HashSet();
 



[1/4] kylin git commit: KYLIN-1738 Save MR JobInfo even the job got killed

2016-05-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 873c8a83e -> 61c9e3601


KYLIN-1738 Save MR JobInfo even the job got killed


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

Branch: refs/heads/master
Commit: af028f012c7d765374f279d265595f75b53358f2
Parents: 873c8a8
Author: lidongsjtu 
Authored: Thu May 26 10:32:02 2016 +0800
Committer: lidongsjtu 
Committed: Thu May 26 16:25:14 2016 +0800

--
 .../apache/kylin/engine/mr/common/MapReduceExecutable.java  | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/af028f01/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
--
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
index 4cf7dfb..19ad132 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/MapReduceExecutable.java
@@ -46,6 +46,8 @@ import org.apache.kylin.job.execution.ExecutableContext;
 import org.apache.kylin.job.execution.ExecutableState;
 import org.apache.kylin.job.execution.ExecuteResult;
 import org.apache.kylin.job.execution.Output;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Preconditions;
 
@@ -58,6 +60,8 @@ public class MapReduceExecutable extends AbstractExecutable {
 private static final String KEY_PARAMS = "MR_JOB_PARAMS";
 private static final String KEY_COUNTER_SAVEAS = "MR_COUNTER_SAVEAS";
 
+protected static final Logger logger = 
LoggerFactory.getLogger(MapReduceExecutable.class);
+
 public MapReduceExecutable() {
 super();
 }
@@ -147,17 +151,18 @@ public class MapReduceExecutable extends 
AbstractExecutable {
 //HadoopStatusChecker statusChecker = new 
HadoopStatusChecker(restStatusCheckUrl, mrJobId, output, useKerberosAuth);
 JobStepStatusEnum status = JobStepStatusEnum.NEW;
 while (!isDiscarded()) {
+
 JobStepStatusEnum newStatus = 
HadoopJobStatusChecker.checkStatus(job, output);
 if (status == JobStepStatusEnum.KILLED) {
-executableManager.updateJobOutput(getId(), 
ExecutableState.ERROR, Collections. emptyMap(), "killed by 
admin");
+executableManager.updateJobOutput(getId(), 
ExecutableState.ERROR, hadoopCmdOutput.getInfo(), "killed by admin");
 return new ExecuteResult(ExecuteResult.State.FAILED, 
"killed by admin");
 }
 if (status == JobStepStatusEnum.WAITING && (newStatus == 
JobStepStatusEnum.FINISHED || newStatus == JobStepStatusEnum.ERROR || newStatus 
== JobStepStatusEnum.RUNNING)) {
 final long waitTime = System.currentTimeMillis() - 
getStartTime();
 setMapReduceWaitTime(waitTime);
 }
-status = newStatus;
 executableManager.addJobInfo(getId(), 
hadoopCmdOutput.getInfo());
+status = newStatus;
 if (status.isComplete()) {
 final Map info = hadoopCmdOutput.getInfo();
 readCounters(hadoopCmdOutput, info);



[3/4] kylin git commit: [maven-release-plugin] prepare for next development iteration

2016-05-26 Thread lidong
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/master
Commit: 11b0a5c5d4c49d2fede2242a31396b6a599a580e
Parents: 3d1cc3d
Author: lidongsjtu 
Authored: Mon May 23 07:47:43 2016 +
Committer: lidongsjtu 
Committed: Thu May 26 17:09:33 2016 +0800

--
 assembly/pom.xml | 2 +-
 atopcalcite/pom.xml  | 2 +-
 core-common/pom.xml  | 2 +-
 core-cube/pom.xml| 2 +-
 core-dictionary/pom.xml  | 2 +-
 core-job/pom.xml | 2 +-
 core-metadata/pom.xml| 2 +-
 core-storage/pom.xml | 2 +-
 engine-mr/pom.xml| 2 +-
 engine-spark/pom.xml | 2 +-
 engine-streaming/pom.xml | 2 +-
 invertedindex/pom.xml| 2 +-
 jdbc/pom.xml | 2 +-
 kylin-it/pom.xml | 2 +-
 pom.xml  | 4 ++--
 query/pom.xml| 2 +-
 server/pom.xml   | 2 +-
 source-hive/pom.xml  | 2 +-
 source-kafka/pom.xml | 2 +-
 storage-hbase/pom.xml| 2 +-
 tool/pom.xml | 2 +-
 21 files changed, 22 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/assembly/pom.xml
--
diff --git a/assembly/pom.xml b/assembly/pom.xml
index b6e3675..8aabe16 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -21,7 +21,7 @@
 
 kylin
 org.apache.kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 4.0.0

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/atopcalcite/pom.xml
--
diff --git a/atopcalcite/pom.xml b/atopcalcite/pom.xml
index 7c70df3..be28f1c 100644
--- a/atopcalcite/pom.xml
+++ b/atopcalcite/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/core-common/pom.xml
--
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 7647621..f3708bd 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/core-cube/pom.xml
--
diff --git a/core-cube/pom.xml b/core-cube/pom.xml
index 2309872..0fc2875 100644
--- a/core-cube/pom.xml
+++ b/core-cube/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/core-dictionary/pom.xml
--
diff --git a/core-dictionary/pom.xml b/core-dictionary/pom.xml
index 1af0091..c8338f2 100644
--- a/core-dictionary/pom.xml
+++ b/core-dictionary/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/core-job/pom.xml
--
diff --git a/core-job/pom.xml b/core-job/pom.xml
index 864bf1b..d744058 100644
--- a/core-job/pom.xml
+++ b/core-job/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/core-metadata/pom.xml
--
diff --git a/core-metadata/pom.xml b/core-metadata/pom.xml
index f65129d..0a7cb40 100644
--- a/core-metadata/pom.xml
+++ b/core-metadata/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/core-storage/pom.xml
--
diff --git a/core-storage/pom.xml b/core-storage/pom.xml
index 2f08dd9..27ee61c 100644
--- a/core-storage/pom.xml
+++ b/core-storage/pom.xml
@@ -27,7 +27,7 @@
 
 org.apache.kylin
 kylin
-1.5.2
+1.5.3-SNAPSHOT
 
 
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/11b0a5c5/engine-mr/pom.xml
--
diff --git a/engine-mr/pom.xml b/engine-mr/pom.xml
index 379eaa6..363e459 100644
--- a/engine-mr/pom.xml
+++ b/engine-mr/pom.xml
@@ -27,7 +27,7 @@

kylin git commit: release apache kylin 1.5.2

2016-05-26 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/document 89d3bd0e4 -> de31a73ed


release apache kylin 1.5.2


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

Branch: refs/heads/document
Commit: de31a73ed39cb6f0f704d03c887057583deca933
Parents: 89d3bd0
Author: lidongsjtu 
Authored: Thu May 26 16:55:37 2016 +0800
Committer: lidongsjtu 
Committed: Thu May 26 17:02:26 2016 +0800

--
 website/_docs15/release_notes.md|  97 
 .../_posts/blog/2016-05-26-release-v1.5.2.cn.md | 114 ++
 .../_posts/blog/2016-05-26-release-v1.5.2.md| 115 +++
 website/download/index.cn.md|  25 ++--
 website/download/index.md   |  18 ++-
 5 files changed, 354 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/de31a73e/website/_docs15/release_notes.md
--
diff --git a/website/_docs15/release_notes.md b/website/_docs15/release_notes.md
index fbd229b..e212373 100644
--- a/website/_docs15/release_notes.md
+++ b/website/_docs15/release_notes.md
@@ -15,6 +15,103 @@ or send to Apache Kylin mailing list:
 * User relative: [u...@kylin.apache.org](mailto:u...@kylin.apache.org)
 * Development relative: [d...@kylin.apache.org](mailto:d...@kylin.apache.org)
 
+## v1.5.2 - 2016-05-26
+_Tag:_ [kylin-1.5.2](https://github.com/apache/kylin/tree/kylin-1.5.2)
+
+This version is backward compatiple with v1.5.1. But after upgrade to v1.5.2 
from v1.5.1, you need to update coprocessor, refer to [How to update 
coprocessor](/docs15/howto/howto_update_coprocessor.html).
+
+__Highlights__
+
+* [KYLIN-1077] - Support Hive View as Lookup Table
+* [KYLIN-1515] - Make Kylin run on MapR
+* [KYLIN-1600] - Download diagnosis zip from GUI
+* [KYLIN-1672] - support kylin on cdh 5.7
+
+__New Feature__
+
+* [KYLIN-1016] - Count distinct on any dimension should work even not a 
predefined measure
+* [KYLIN-1077] - Support Hive View as Lookup Table
+* [KYLIN-1441] - Display time column as partition column
+* [KYLIN-1515] - Make Kylin run on MapR
+* [KYLIN-1600] - Download diagnosis zip from GUI
+* [KYLIN-1672] - support kylin on cdh 5.7
+
+__Improvement__
+
+* [KYLIN-869] - Enhance mail notification
+* [KYLIN-955] - HiveColumnCardinalityJob should use configurations in 
conf/kylin_job_conf.xml
+* [KYLIN-1313] - Enable deriving dimensions on non PK/FK
+* [KYLIN-1323] - Improve performance of converting data to hfile
+* [KYLIN-1340] - Tools to extract all cube/hybrid/project related metadata to 
facilitate diagnosing/debugging/* sharing
+* [KYLIN-1381] - change RealizationCapacity from three profiles to specific 
numbers
+* [KYLIN-1391] - quicker and better response to v2 storage engine's rpc 
timeout exception
+* [KYLIN-1418] - Memory hungry cube should select LAYER and INMEM cubing 
smartly
+* [KYLIN-1432] - For GUI, to add one option "-MM-dd HH:MM:ss" for 
Partition Date Column
+* [KYLIN-1453] - cuboid sharding based on specific column
+* [KYLIN-1487] - attach a hyperlink to introduce new aggregation group
+* [KYLIN-1526] - Move query cache back to query controller level
+* [KYLIN-1542] - Hfile owner is not hbase
+* [KYLIN-1544] - Make hbase encoding and block size configurable just like 
hbase compression
+* [KYLIN-1561] - Refactor storage engine(v2) to be extension friendly
+* [KYLIN-1566] - Add and use a separate kylin_job_conf.xml for in-mem cubing
+* [KYLIN-1567] - Front-end work for KYLIN-1557
+* [KYLIN-1578] - Coprocessor thread voluntarily stop itself when it reaches 
timeout
+* [KYLIN-1579] - IT preparation classes like BuildCubeWithEngine should exit 
with status code upon build * exception
+* [KYLIN-1580] - Use 1 byte instead of 8 bytes as column indicator in fact 
distinct MR job
+* [KYLIN-1584] - Specify region cut size in cubedesc and leave the 
RealizationCapacity in model as a hint
+* [KYLIN-1585] - make MAX_HBASE_FUZZY_KEYS in GTScanRangePlanner configurable
+* [KYLIN-1587] - show cube level configuration overwrites properties in 
CubeDesigner
+* [KYLIN-1591] - enabling different block size setting for small column 
families
+* [KYLIN-1599] - Add "isShardBy" flag in rowkey panel
+* [KYLIN-1601] - Need not to shrink scan cache when hbase rows can be large
+* [KYLIN-1602] - User could dump hbase usage for diagnosis
+* [KYLIN-1614] - Bring more information in diagnosis tool
+* [KYLIN-1621] - Use deflate level 1 to enable compression "on the fly"
+* [KYLIN-1623] - Make the hll precision for data samping configurable
+* [KYLIN-1624] - HyperLogLogPlusCounter will become 

svn commit: r1745585 [2/2] - in /kylin/site: ./ blog/ blog/2016/05/26/ blog/2016/05/26/release-v1.5.2/ cn/blog/2016/05/ cn/blog/2016/05/26/ cn/blog/2016/05/26/release-v1.5.2/ cn/download/ docs15/ down

2016-05-26 Thread lidong
Modified: kylin/site/feed.xml
URL: 
http://svn.apache.org/viewvc/kylin/site/feed.xml?rev=1745585=1745584=1745585=diff
==
--- kylin/site/feed.xml (original)
+++ kylin/site/feed.xml Thu May 26 09:36:00 2016
@@ -19,79 +19,237 @@
 Apache Kylin Home
 http://kylin.apache.org/
 http://kylin.apache.org/feed.xml; rel="self" 
type="application/rss+xml"/>
-Wed, 25 May 2016 03:38:47 -0700
-Wed, 25 May 2016 03:38:47 -0700
+Thu, 26 May 2016 10:34:34 -0700
+Thu, 26 May 2016 10:34:34 -0700
 Jekyll v2.5.3
 
   
-Apache Kylin v1.5.1 Release Announcement
-pThe Apache Kylin community is pleased to 
announce the release of Apache Kylin v1.5.1./p
+Apache Kylin v1.5.2 正式发布
+pApache Kylin社区非常高兴宣布Apache Kylin 
v1.5.2正式发布。/p
+
+pApache 
Kylin是一个开源的分布式分析引擎,提供Hadoop之上的SQL查询接口及多维分析(OLAP)能力以支持è¶
…大规模数据,最初由eBay Inc. 
开发并贡献至开源社区。/p
+
+p下载Apache Kylin v1.5.2源代码及二进制安装包,br /
+请访问a 
href=http://kylin.apache.org/cn/download/下载/a页面./p;
+
+p这是一个主要的版本发布带来了更稳定,健壮及更好管理的版本,Apache
 Kylin社区解决了75个issue,包
括Bug修复,功能增强及一些新特性等。/p
+
+h2 id=section主要变化/h2
+
+pstrong新功能/strong/p
+
+ul
+  li支持Hive视图作为Lookup表 a 
href=https://issues.apache.org/jira/browse/KYLIN-1077KYLIN-1077/a/li;
+  li使Kylin运行在MapR环境中 a 
href=https://issues.apache.org/jira/browse/KYLIN-1515KYLIN-1515/a/li;
+  li通过GUI下载诊断zip包 a 
href=https://issues.apache.org/jira/browse/KYLIN-1600KYLIN-1600/a/li;
+  li使Kylin支持cdh5.7 a 
href=https://issues.apache.org/jira/browse/KYLIN-1672KYLIN-1672/a/li;
+/ul
+
+pstrong改进/strong/p
+
+ul
+  li增强邮件通知 a 
href=https://issues.apache.org/jira/browse/KYLIN-869KYLIN-869/a/li;
+  liHiveColumnCardinalityJob应该使用conf/kylin_job_conf.xml中的é…
ç½® a 
href=https://issues.apache.org/jira/browse/KYLIN-955KYLIN-955/a/li;
+  li在非PK/FK上支持继承的维度 a 
href=https://issues.apache.org/jira/browse/KYLIN-1313KYLIN-1313/a/li;
+  li增强转换数据到HFile阶段的性能 a 
href=https://issues.apache.org/jira/browse/KYLIN-1323KYLIN-1323/a/li;
+  li抽取cube/hybrid/project相关å…
ƒæ•°æ®ä¿¡æ¯ä»¥ä¾¿äºŽè¯Šæ–­/调试/分享等用途 a 
href=https://issues.apache.org/jira/browse/KYLIN-1340KYLIN-1340/a/li;
+  li把RealizationCapacity从3套配置改成特定数字 a 
href=https://issues.apache.org/jira/browse/KYLIN-1381KYLIN-1381/a/li;
+  li更快更好的响应以应对v2存储引擎中的rpc超时异常 
a 
href=https://issues.apache.org/jira/browse/KYLIN-1391KYLIN-1391/a/li;
+  li内
存需求较大的Cube应该更智能地选择LAYER还是INMEM构建算法 
a 
href=https://issues.apache.org/jira/browse/KYLIN-1418KYLIN-1418/a/li;
+  li在GUI上,给分区时间列添加一个”-MM-dd 
HH:MM:ss”选项 a 
href=https://issues.apache.org/jira/browse/KYLIN-1432KYLIN-1432/a/li;
+  li基于特定列进行Cuboid分片 a 
href=https://issues.apache.org/jira/browse/KYLIN-1453KYLIN-1453/a/li;
+  li添加超链接介绍新的Aggregation Group a 
href=https://issues.apache.org/jira/browse/KYLIN-1487KYLIN-1487/a/li;
+  li把查询缓存调整到查询控制器级别 a 
href=https://issues.apache.org/jira/browse/KYLIN-1526KYLIN-1526/a/li;
+  liHfile所有者不是hbase a 
href=https://issues.apache.org/jira/browse/KYLIN-1542KYLIN-1542/a/li;
+  li使hbase编码和block size像hbase压缩一样可配置 a 
href=https://issues.apache.org/jira/browse/KYLIN-1544KYLIN-1544/a/li;
+  li重构v2存储引擎使之对扩展更加友好 a 
href=https://issues.apache.org/jira/browse/KYLIN-1561KYLIN-1561/a/li;
+  li为in-memory构建任务添加
并使用一个单独kylin_job_conf.xml a 
href=https://issues.apache.org/jira/browse/KYLIN-1566KYLIN-1566/a/li;
+  liKYLIN-1557前端工作 a 
href=https://issues.apache.org/jira/browse/KYLIN-1567KYLIN-1567/a/li;
+  li协助利器线程在超时后自动停止 a 
href=https://issues.apache.org/jira/browse/KYLIN-1578KYLIN-1578/a/li;
+  
liIT测试如BuildCubeWithEngine等的准备阶段应该在出现异常后报错退出
 a 
href=https://issues.apache.org/jira/browse/KYLIN-1579KYLIN-1579/a/li;
+  li在Fact distinct的MR任务中用1个字节代替8字节作为列æ 
‡è¯†ç¬¦ a 
href=https://issues.apache.org/jira/browse/KYLIN-1580KYLIN-1580/a/li;
+  
li在Cubedesc上指定Region切分size并使model中的RealizationCapacityä»
…仅作为提示 a 
href=https://issues.apache.org/jira/browse/KYLIN-1584KYLIN-1584/a/li;
+  li使MAX_HBASE_FUZZY_KEYS在GTScanRangePlanner中变得可é…
ç½®a 
href=https://issues.apache.org/jira/browse/KYLIN-1585KYLIN-1585/a/li;
+  li在CubeDesigner显示Cube级别的配置覆盖 a 

svn commit: r1745585 [1/2] - in /kylin/site: ./ blog/ blog/2016/05/26/ blog/2016/05/26/release-v1.5.2/ cn/blog/2016/05/ cn/blog/2016/05/26/ cn/blog/2016/05/26/release-v1.5.2/ cn/download/ docs15/ down

2016-05-26 Thread lidong
Author: lidong
Date: Thu May 26 09:36:00 2016
New Revision: 1745585

URL: http://svn.apache.org/viewvc?rev=1745585=rev
Log:
release apache kylin 1.5.2

Added:
kylin/site/blog/2016/05/26/
kylin/site/blog/2016/05/26/release-v1.5.2/
kylin/site/blog/2016/05/26/release-v1.5.2/index.html
kylin/site/cn/blog/2016/05/
kylin/site/cn/blog/2016/05/26/
kylin/site/cn/blog/2016/05/26/release-v1.5.2/
kylin/site/cn/blog/2016/05/26/release-v1.5.2/index.html
Modified:
kylin/site/blog/index.html
kylin/site/cn/download/index.html
kylin/site/docs15/release_notes.html
kylin/site/download/index.html
kylin/site/feed.xml

Added: kylin/site/blog/2016/05/26/release-v1.5.2/index.html
URL: 
http://svn.apache.org/viewvc/kylin/site/blog/2016/05/26/release-v1.5.2/index.html?rev=1745585=auto
==
--- kylin/site/blog/2016/05/26/release-v1.5.2/index.html (added)
+++ kylin/site/blog/2016/05/26/release-v1.5.2/index.html Thu May 26 09:36:00 
2016
@@ -0,0 +1,363 @@
+
+
+
+   
+
+
+  
+  
+  
+
+  Apache Kylin | Apache Kylin v1.5.2 Release Announcement
+  
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+  
+  
+
+  http://kylin.apache.org/blog/2016/05/26/release-v1.5.2/;>
+  http://kylin.apache.org/feed.xml; />
+
+
+
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+  //oringal tracker for kylin.io
+  ga('create', 'UA-55534813-1', 'auto');
+  //new tracker for kylin.apache.org
+  ga('create', 'UA-55534813-2', 'auto', {'name':'toplevel'});
+
+  ga('send', 'pageview');
+  ga('toplevel.send', 'pageview');
+
+
+
+
+ 
+ 
+
+
+   
+   
+
+
+  
+  
+  Apache Kylin™ Extreme OLAP Engine for Big 
Data 
+
+  
+  
+
+  
+  
+  
+
+
+
+  
+Toggle navigation
+
+
+
+  
+ 
+
+
+
+
+  
+ Home
+  Docs
+  Download
+  Community
+  Development
+  Blog
+  中文版  
+  https://twitter.com/apachekylin; target="_blank" 
class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" >
+  https://github.com/apache/kylin; target="_blank" 
class="fa fa-github-alt fa-lg" title="Github: apache/kylin" >  
+  https://www.facebook.com/kylinio; target="_blank" 
class="fa fa-facebook fa-lg" title="Facebook: kylin.io" >   
+
+
+  
+
+ 
+
+   
+   
+   
+   Apache Kylin™ 
Technical Blog
+   
+   
+
+   
+   
+
+   
+
+
+
+  
+Apache Kylin v1.5.2 Release Announcement
+May 26, 2016 • Dong Li
+  
+
+  
+The Apache Kylin community is pleased to announce the release of Apache 
Kylin v1.5.2.
+
+Apache Kylin is an open source Distributed Analytics Engine designed to 
provide SQL interface and multi-dimensional analysis (OLAP) on Hadoop 
supporting extremely large datasets, original contributed from eBay Inc.
+
+To download Apache Kylin v1.5.2 source code or binary package:
+please visit the http://kylin.apache.org/download;>download 
page.
+
+This is a major release which brings more stable, robust and well 
management version, Apache Kylin community resolved about 76 issues including 
bug fixes, improvements, and few new features.
+
+Change Highlights
+
+New Feature
+
+
+  Support Hive View as Lookup Table https://issues.apache.org/jira/browse/KYLIN-1077;>KYLIN-1077
+  Make Kylin run on MapR https://issues.apache.org/jira/browse/KYLIN-1515;>KYLIN-1515
+  Download diagnosis zip from GUI https://issues.apache.org/jira/browse/KYLIN-1600;>KYLIN-1600
+  support kylin on cdh 5.7 https://issues.apache.org/jira/browse/KYLIN-1672;>KYLIN-1672
+
+
+Improvement
+
+
+  Enhance mail notification https://issues.apache.org/jira/browse/KYLIN-869;>KYLIN-869
+  HiveColumnCardinalityJob should use configurations in 
conf/kylin_job_conf.xml https://issues.apache.org/jira/browse/KYLIN-955;>KYLIN-955
+  Enable deriving dimensions on non PK/FK https://issues.apache.org/jira/browse/KYLIN-1313;>KYLIN-1313
+  Improve performance of converting data to hfile https://issues.apache.org/jira/browse/KYLIN-1323;>KYLIN-1323
+  Tools to extract all cube/hybrid/project related metadata to facilitate 
diagnosing/debugging/* sharing https://issues.apache.org/jira/browse/KYLIN-1340;>KYLIN-1340
+  change RealizationCapacity from three profiles to specific numbers https://issues.apache.org/jira

kylin git commit: KYLIN-1751 Fix default log path

2016-06-01 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 03d7ca555 -> 5ab419449


KYLIN-1751 Fix default log path


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

Branch: refs/heads/master
Commit: 5ab4194493a547e79acba210342477d55c9539eb
Parents: 03d7ca5
Author: lidongsjtu 
Authored: Wed Jun 1 15:06:49 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jun 1 15:06:49 2016 +0800

--
 build/conf/kylin-server-log4j.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5ab41944/build/conf/kylin-server-log4j.properties
--
diff --git a/build/conf/kylin-server-log4j.properties 
b/build/conf/kylin-server-log4j.properties
index 2163fd0..5dab102 100644
--- a/build/conf/kylin-server-log4j.properties
+++ b/build/conf/kylin-server-log4j.properties
@@ -19,7 +19,7 @@
 #define appenders
 log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.File=logs/kylin.log
+log4j.appender.file.File=${catalina.home}/../logs/kylin.log
 log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}:%L : 
%m%n
 log4j.appender.file.Append=true
 



kylin git commit: KYLIN-1751 Fix default log path

2016-06-01 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang-m2 67e1ada1b -> 8864f5e8d


KYLIN-1751 Fix default log path


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

Branch: refs/heads/yang-m2
Commit: 8864f5e8db433470f9ccb1a853a87709a3a6074e
Parents: 67e1ada
Author: lidongsjtu 
Authored: Wed Jun 1 15:09:51 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jun 1 15:09:51 2016 +0800

--
 build/conf/kylin-server-log4j.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/8864f5e8/build/conf/kylin-server-log4j.properties
--
diff --git a/build/conf/kylin-server-log4j.properties 
b/build/conf/kylin-server-log4j.properties
index 2163fd0..9b1938c 100644
--- a/build/conf/kylin-server-log4j.properties
+++ b/build/conf/kylin-server-log4j.properties
@@ -19,7 +19,7 @@
 #define appenders
 log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.File=logs/kylin.log
+log4j.appender.file.File=${catalina.home}/../logs/kylin.log
 log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}:%L : 
%m%n
 log4j.appender.file.Append=true
 
@@ -27,4 +27,4 @@ log4j.appender.file.Append=true
 log4j.rootLogger=INFO,file
 log4j.logger.org.apache.kylin=DEBUG
 log4j.logger.org.springframework=WARN
-log4j.logger.org.springframework.security=INFO
\ No newline at end of file
+log4j.logger.org.springframework.security=INFO



kylin git commit: KYLIN-1753 Set coreThreads configurable

2016-06-01 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang-m2 399d67183 -> 52c7e37e9


KYLIN-1753 Set coreThreads configurable


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

Branch: refs/heads/yang-m2
Commit: 52c7e37e90f7223777db850d02cf7c01383a17ca
Parents: 399d671
Author: lidongsjtu 
Authored: Wed Jun 1 16:21:08 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jun 1 16:21:08 2016 +0800

--
 .../src/main/java/org/apache/kylin/common/KylinConfigBase.java   | 4 
 .../java/org/apache/kylin/storage/hbase/HBaseConnection.java | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/52c7e37e/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 6918721..036cdeb 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -653,4 +653,8 @@ abstract public class KylinConfigBase implements 
Serializable {
 public int getHBaseMaxConnectionThreads() {
 return 
Integer.parseInt(getOptional("kylin.query.hbase.hconnection.threads.max", 
"3072"));
 }
+
+public int getHBaseCoreConnectionThreads() {
+return 
Integer.parseInt(getOptional("kylin.query.hbase.hconnection.threads.core", 
"256"));
+}
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/52c7e37e/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
index 09c14e1..db33436 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/HBaseConnection.java
@@ -93,7 +93,7 @@ public class HBaseConnection {
 
 // copy from HConnectionImplementation.getBatchPool()
 int maxThreads = config.getHBaseMaxConnectionThreads();
-int coreThreads = 256;
+int coreThreads = config.getHBaseCoreConnectionThreads();
 long keepAliveTime = 60;
 LinkedBlockingQueue workQueue = new 
LinkedBlockingQueue(maxThreads * 100);
 ThreadPoolExecutor tpe = new ThreadPoolExecutor(coreThreads, 
maxThreads, keepAliveTime, TimeUnit.SECONDS, workQueue, //



kylin git commit: API for getting offsets of rowkeys and shard id

2016-06-01 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master d6bb49984 -> b312200e7


API for getting offsets of rowkeys and shard id

Signed-off-by: lidongsjtu 


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

Branch: refs/heads/master
Commit: b312200e7862bfc44a3574af1b8686715e5dbad8
Parents: d6bb499
Author: Roger Shi 
Authored: Wed Jun 1 16:50:36 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jun 1 17:25:47 2016 +0800

--
 .../apache/kylin/cube/common/RowKeySplitter.java| 16 
 1 file changed, 16 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b312200e/core-cube/src/main/java/org/apache/kylin/cube/common/RowKeySplitter.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/common/RowKeySplitter.java 
b/core-cube/src/main/java/org/apache/kylin/cube/common/RowKeySplitter.java
index a8be987..dbed30d 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/common/RowKeySplitter.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/common/RowKeySplitter.java
@@ -34,15 +34,21 @@ public class RowKeySplitter {
 private RowKeyColumnIO colIO;
 
 private SplittedBytes[] splitBuffers;
+private int[] splitOffsets;
 private int bufferSize;
 
 private long lastSplittedCuboidId;
 private boolean enableSharding;
+private short shardId;
 
 public SplittedBytes[] getSplitBuffers() {
 return splitBuffers;
 }
 
+public int[] getSplitOffsets() {
+return splitOffsets;
+}
+
 public int getBodySplitOffset() {
 if (enableSharding) {
 return 2;//shard+cuboid
@@ -62,12 +68,20 @@ public class RowKeySplitter {
 this.colIO = new RowKeyColumnIO(new CubeDimEncMap(cubeSeg));
 
 this.splitBuffers = new SplittedBytes[splitLen];
+this.splitOffsets = new int[splitLen];
 for (int i = 0; i < splitLen; i++) {
 this.splitBuffers[i] = new SplittedBytes(bytesLen);
 }
 this.bufferSize = 0;
 }
 
+public Short getShardId() {
+if (enableSharding) {
+return shardId;
+}
+return null;
+}
+
 /**
  * @param bytes
  * @return cuboid ID
@@ -83,6 +97,7 @@ public class RowKeySplitter {
 System.arraycopy(bytes, offset, shardSplit.value, 0, 
RowConstants.ROWKEY_SHARDID_LEN);
 offset += RowConstants.ROWKEY_SHARDID_LEN;
 //lastSplittedShard = Bytes.toShort(shardSplit.value, 0, 
shardSplit.length);
+shardId = Bytes.toShort(shardSplit.value);
 }
 
 // extract cuboid id
@@ -96,6 +111,7 @@ public class RowKeySplitter {
 
 // rowkey columns
 for (int i = 0; i < cuboid.getColumns().size(); i++) {
+splitOffsets[i] = offset;
 TblColRef col = cuboid.getColumns().get(i);
 int colLength = colIO.getColumnLength(col);
 SplittedBytes split = this.splitBuffers[this.bufferSize++];



kylin git commit: KYLIN-1751 Cleanup log4j properties file

2016-05-30 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang-m2 57295d624 -> e40ba0591


KYLIN-1751 Cleanup log4j properties file


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

Branch: refs/heads/yang-m2
Commit: e40ba05913d09dc406e1b16ae542b9bfed95635a
Parents: 57295d6
Author: lidongsjtu 
Authored: Tue May 31 12:55:48 2016 +0800
Committer: lidongsjtu 
Committed: Tue May 31 12:55:48 2016 +0800

--
 build/bin/kylin.sh  |  2 +-
 build/conf/kylin-server-log4j.properties| 30 +++
 .../resources/kylin-server-log4j.properties | 53 
 3 files changed, 31 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/e40ba059/build/bin/kylin.sh
--
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index 0e503ee..0e5d236 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -78,8 +78,8 @@ then
 
 # KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
 hbase ${KYLIN_EXTRA_START_OPTS} \
--Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+-Dlog4j.configuration=kylin-server-log4j.properties \
 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
 -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
 -Djava.endorsed.dirs=${tomcat_root}/endorsed  \

http://git-wip-us.apache.org/repos/asf/kylin/blob/e40ba059/build/conf/kylin-server-log4j.properties
--
diff --git a/build/conf/kylin-server-log4j.properties 
b/build/conf/kylin-server-log4j.properties
new file mode 100644
index 000..3750fb1
--- /dev/null
+++ b/build/conf/kylin-server-log4j.properties
@@ -0,0 +1,30 @@
+#
+# 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.
+#
+
+
+#define appenders
+log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.File=logs/kylin.log
+log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}:%L : 
%m%n
+log4j.appender.file.Append=true
+
+#overall config
+log4j.rootLogger=INFo,file
+log4j.logger.org.apache.kylin=DEBUG
+log4j.logger.org.springframework=WARN
+log4j.logger.org.springframework.security=INFO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kylin/blob/e40ba059/server/src/main/resources/kylin-server-log4j.properties
--
diff --git a/server/src/main/resources/kylin-server-log4j.properties 
b/server/src/main/resources/kylin-server-log4j.properties
deleted file mode 100644
index 4ad7721..000
--- a/server/src/main/resources/kylin-server-log4j.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-#define appenders
-log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.file.layout=org.apache.log4j.PatternLayout

kylin git commit: typo

2016-05-30 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/yang-m2 e40ba0591 -> 668e12581


typo


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

Branch: refs/heads/yang-m2
Commit: 668e125819bcd2b8bbcfab59bab8fa1e6c947071
Parents: e40ba05
Author: lidongsjtu 
Authored: Tue May 31 12:58:04 2016 +0800
Committer: lidongsjtu 
Committed: Tue May 31 12:58:04 2016 +0800

--
 build/conf/kylin-server-log4j.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/668e1258/build/conf/kylin-server-log4j.properties
--
diff --git a/build/conf/kylin-server-log4j.properties 
b/build/conf/kylin-server-log4j.properties
index 3750fb1..2163fd0 100644
--- a/build/conf/kylin-server-log4j.properties
+++ b/build/conf/kylin-server-log4j.properties
@@ -24,7 +24,7 @@ log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p 
[%t] %c{2}:%L : %m
 log4j.appender.file.Append=true
 
 #overall config
-log4j.rootLogger=INFo,file
+log4j.rootLogger=INFO,file
 log4j.logger.org.apache.kylin=DEBUG
 log4j.logger.org.springframework=WARN
 log4j.logger.org.springframework.security=INFO
\ No newline at end of file



kylin git commit: minor, diagnosis tool for mr jobs

2016-05-31 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 1c0cd2bf7 -> e02f0bed2


minor, diagnosis tool for mr jobs

Signed-off-by: lidongsjtu 


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

Branch: refs/heads/master
Commit: e02f0bed299b69dabed51809811134591f21248e
Parents: 1c0cd2b
Author: Lingyan Jiang 
Authored: Tue May 31 19:03:06 2016 +0800
Committer: lidongsjtu 
Committed: Tue May 31 21:02:17 2016 +0800

--
 tool/pom.xml|   5 -
 .../apache/kylin/tool/JobDiagnosisInfoCLI.java  |  31 ++--
 .../kylin/tool/JobTaskCounterExtractor.java | 149 +++
 3 files changed, 168 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/e02f0bed/tool/pom.xml
--
diff --git a/tool/pom.xml b/tool/pom.xml
index ee61fae..2657b12 100644
--- a/tool/pom.xml
+++ b/tool/pom.xml
@@ -43,11 +43,6 @@
 
 
 org.apache.hbase
-hbase-common
-provided
-
-
-org.apache.hbase
 hbase-client
 provided
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/e02f0bed/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java 
b/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
index 8ba3a33..4dab057 100644
--- a/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
+++ b/tool/src/main/java/org/apache/kylin/tool/JobDiagnosisInfoCLI.java
@@ -18,12 +18,8 @@
 
 package org.apache.kylin.tool;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.io.FileUtils;
@@ -37,8 +33,11 @@ import org.apache.kylin.tool.util.ResourceStoreUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 public class JobDiagnosisInfoCLI extends AbstractInfoExtractor {
 private static final Logger logger = 
LoggerFactory.getLogger(JobDiagnosisInfoCLI.class);
@@ -106,7 +105,6 @@ public class JobDiagnosisInfoCLI extends 
AbstractInfoExtractor {
 File metaDir = new File(exportDir, "cube");
 FileUtils.forceMkdir(metaDir);
 String[] cubeMetaArgs = { "-cube", cubeName, "-destDir", new 
File(metaDir, cubeName).getAbsolutePath(), "-includeJobs", "false", 
"-compress", "false", "-submodule", "true" };
-
 logger.info("Start to extract related cube: " + 
StringUtils.join(cubeMetaArgs));
 CubeMetaExtractor cubeMetaExtractor = new CubeMetaExtractor();
 logger.info("CubeMetaExtractor args: " + 
Arrays.toString(cubeMetaArgs));
@@ -119,8 +117,9 @@ public class JobDiagnosisInfoCLI extends 
AbstractInfoExtractor {
 logger.info("Start to dump yarn job logs: " + jobId);
 File yarnLogDir = new File(exportDir, "yarn");
 FileUtils.forceMkdir(yarnLogDir);
-for (String taskId : yarnLogsResources) {
-extractYarnLog(taskId, new File(yarnLogDir, jobId), true);
+for (String stepId : yarnLogsResources) {
+extractTaskCounter(stepId,new File(new File(yarnLogDir, 
stepId),"Counters"));
+extractYarnLog(stepId, new File(yarnLogDir, stepId), true);
 }
 }
 
@@ -147,7 +146,6 @@ public class JobDiagnosisInfoCLI extends 
AbstractInfoExtractor {
 try {
 KylinConfig srcConfig = KylinConfig.getInstanceFromEnv();
 KylinConfig dstConfig = 
KylinConfig.createInstanceFromUri(destDir.getAbsolutePath());
-
 ResourceStoreUtil.copy(srcConfig, dstConfig, requiredResources);
 } catch (Exception e) {
 throw new RuntimeException("Failed to extract job resources. ", e);
@@ -172,6 +170,15 @@ public class JobDiagnosisInfoCLI extends 
AbstractInfoExtractor {
 }
 }
 
+private void extractTaskCounter(String taskId, File destDir) throws 
Exception {
+final Map jobInfo = 

kylin git commit: KYLIN-1741 Reload metadata before diagnosis

2016-06-22 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master b361d8aaa -> 5fd26125b


KYLIN-1741 Reload metadata before diagnosis


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

Branch: refs/heads/master
Commit: 5fd26125b08e080fcc2d4734b665d4a5994e43d4
Parents: b361d8a
Author: lidongsjtu 
Authored: Wed Jun 22 14:16:26 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jun 22 14:16:32 2016 +0800

--
 .../apache/kylin/tool/KylinLogExtractor.java| 24 
 1 file changed, 24 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/5fd26125/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java
--
diff --git a/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java 
b/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java
index 2e270ba..a6d9901 100644
--- a/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java
+++ b/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java
@@ -28,6 +28,10 @@ import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.io.FileUtils;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.OptionsHelper;
+import org.apache.kylin.cube.CubeDescManager;
+import org.apache.kylin.cube.CubeManager;
+import org.apache.kylin.metadata.MetadataManager;
+import org.apache.kylin.metadata.project.ProjectManager;
 import org.apache.kylin.tool.util.ToolUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,15 +46,35 @@ public class KylinLogExtractor extends 
AbstractInfoExtractor {
 @SuppressWarnings("static-access")
 private static final Option OPTION_LOG_PERIOD = 
OptionBuilder.withArgName("logPeriod").hasArg().isRequired(false).withDescription("specify
 how many days of kylin logs to extract. Default " + DEFAULT_LOG_PERIOD + 
".").create("logPeriod");
 
+KylinConfig config;
+
 public KylinLogExtractor() {
 super();
 
 packageType = "logs";
 options.addOption(OPTION_LOG_PERIOD);
+
+config = KylinConfig.getInstanceFromEnv();
+}
+
+private void beforeExtract() {
+// reload metadata before extract diagnosis info
+logger.info("Start to reload metadata from diagnosis.");
+
+CubeManager.clearCache();
+CubeManager.getInstance(config);
+CubeDescManager.clearCache();
+CubeDescManager.getInstance(config);
+MetadataManager.clearCache();
+MetadataManager.getInstance(config);
+ProjectManager.clearCache();
+ProjectManager.getInstance(config);
 }
 
 @Override
 protected void executeExtract(OptionsHelper optionsHelper, File exportDir) 
throws Exception {
+beforeExtract();
+
 int logPeriod = optionsHelper.hasOption(OPTION_LOG_PERIOD) ? 
Integer.valueOf(optionsHelper.getOptionValue(OPTION_LOG_PERIOD)) : 
DEFAULT_LOG_PERIOD;
 
 if (logPeriod < 1) {



kylin git commit: minor, allow GTScanRangePlanner extensible

2016-06-22 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 94567c150 -> 9b8a9899b


minor, allow GTScanRangePlanner extensible


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

Branch: refs/heads/master
Commit: 9b8a9899b3147920964063a07a4da56d2cac3bf4
Parents: 94567c1
Author: lidongsjtu 
Authored: Wed Jun 22 18:41:52 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jun 22 18:42:00 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/9b8a9899/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
--
diff --git 
a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java 
b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
index 7173815..5531005 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
@@ -177,7 +177,7 @@ public class GTScanRangePlanner {
  * Overwrite this method to provide smarter storage visit plans
  * @return
  */
-List planScanRanges() {
+protected List planScanRanges() {
 TupleFilter flatFilter = flattenToOrAndFilter(gtFilter);
 
 List orAndDimRanges = 
translateToOrAndDimRanges(flatFilter);



[1/2] kylin git commit: KYLIN-1679 get hive bee line properties fixed

2016-06-16 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master 930f397d8 -> baac10b03


KYLIN-1679 get hive bee line properties fixed

Signed-off-by: zkld123 


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

Branch: refs/heads/master
Commit: b70ad40769c014d1e3e2041cae77754cad8e043a
Parents: 930f397
Author: Lingyan Jiang 
Authored: Thu Jun 16 15:27:57 2016 +0800
Committer: zkld123 
Committed: Thu Jun 16 16:09:21 2016 +0800

--
 build/bin/get-properties.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b70ad407/build/bin/get-properties.sh
--
diff --git a/build/bin/get-properties.sh b/build/bin/get-properties.sh
old mode 100644
new mode 100755
index 4c93b3b..3151ad6
--- a/build/bin/get-properties.sh
+++ b/build/bin/get-properties.sh
@@ -23,8 +23,9 @@ then
 exit -1
 fi
 
+IFS=$'\n'
 result=
-for i in `cat ${KYLIN_HOME}/conf/kylin.properties | grep -w "$1" | grep -v 
'^#' |awk -F '=' '{print $2}' | cut -c 1-`
+for i in `cat ${KYLIN_HOME}/conf/kylin.properties|grep -w "$1"| grep -v '^#' 
|awk -F= '{ n = index($0,"="); print substr($0,n+1)}' | cut -c 1-`
 do
:
result=$i



[2/2] kylin git commit: KYLIN-1679 Use full-match pattern to get kylin properties in shell scripts

2016-06-16 Thread lidong
KYLIN-1679 Use full-match pattern to get kylin properties in shell scripts


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

Branch: refs/heads/master
Commit: baac10b037fc761690cc839e226f3f2c9ecc97a4
Parents: b70ad40
Author: zkld123 
Authored: Thu Jun 16 16:18:21 2016 +0800
Committer: zkld123 
Committed: Thu Jun 16 16:18:21 2016 +0800

--
 build/bin/get-properties.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/baac10b0/build/bin/get-properties.sh
--
diff --git a/build/bin/get-properties.sh b/build/bin/get-properties.sh
index 3151ad6..a53de6b 100755
--- a/build/bin/get-properties.sh
+++ b/build/bin/get-properties.sh
@@ -25,7 +25,7 @@ fi
 
 IFS=$'\n'
 result=
-for i in `cat ${KYLIN_HOME}/conf/kylin.properties|grep -w "$1"| grep -v '^#' 
|awk -F= '{ n = index($0,"="); print substr($0,n+1)}' | cut -c 1-`
+for i in `cat ${KYLIN_HOME}/conf/kylin.properties | grep -w "^$1" | grep -v 
'^#' | awk -F= '{ n = index($0,"="); print substr($0,n+1)}' | cut -c 1-`
 do
:
result=$i



kylin git commit: minor, refactor in KylinConfig

2016-06-21 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/master c4731de61 -> 57727187c


minor, refactor in KylinConfig


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

Branch: refs/heads/master
Commit: 57727187ced348a5f87ea4b11f243cb170e196e1
Parents: c4731de
Author: lidongsjtu 
Authored: Tue Jun 21 15:39:26 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jun 21 15:39:26 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/57727187/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 5f9a0f3..2a3a2a0 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -85,7 +85,7 @@ abstract public class KylinConfigBase implements Serializable 
{
 return property != null ? property : properties.getProperty(prop, dft);
 }
 
-protected Properties getAllProperties() {
+public Properties getAllProperties() {
 return properties;
 }
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/57727187/core-common/src/main/java/org/apache/kylin/common/KylinConfigExt.java
--
diff --git 
a/core-common/src/main/java/org/apache/kylin/common/KylinConfigExt.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigExt.java
index c3b45d7..9443a4a 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigExt.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigExt.java
@@ -61,7 +61,7 @@ public class KylinConfigExt extends KylinConfig {
 return super.getOptional(prop, dft);
 }
 
-protected Properties getAllProperties() {
+public Properties getAllProperties() {
 Properties result = new Properties();
 result.putAll(super.getAllProperties());
 result.putAll(overrides);



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

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


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


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

Branch: refs/heads/2.0-rc
Commit: 5feca4e7cba15f793c9f99c4e0aefac1b72c7ad4
Parents: f10436c
Author: lidongsjtu 
Authored: Wed Jan 13 23:05:01 2016 +0800
Committer: lidongsjtu 
Committed: Wed Jan 13 23:12:37 2016 +0800

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


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



kylin git commit: KYLIN-1327 Tool for batch updating host information of htables

2016-01-18 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc f1a922473 -> 34c95286b


KYLIN-1327 Tool for batch updating host information of htables


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

Branch: refs/heads/2.0-rc
Commit: 34c95286b230e58e80714edc22069002a0f61fae
Parents: f1a9224
Author: lidongsjtu 
Authored: Mon Jan 18 16:18:51 2016 +0800
Committer: lidongsjtu 
Committed: Mon Jan 18 16:44:15 2016 +0800

--
 .../storage/hbase/util/UpdateHTableHostCLI.java | 192 +++
 1 file changed, 192 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/34c95286/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
new file mode 100644
index 000..1ff98a4
--- /dev/null
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
@@ -0,0 +1,192 @@
+/*
+ * 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.storage.hbase.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.apache.kylin.common.KylinConfig;
+import org.apache.kylin.cube.CubeInstance;
+import org.apache.kylin.cube.CubeManager;
+import org.apache.kylin.cube.CubeSegment;
+import org.apache.kylin.invertedindex.IIInstance;
+import org.apache.kylin.invertedindex.IIManager;
+import org.apache.kylin.invertedindex.IISegment;
+import org.apache.kylin.metadata.model.SegmentStatusEnum;
+import org.apache.kylin.metadata.realization.IRealizationConstants;
+import org.apache.kylin.metadata.realization.RealizationStatusEnum;
+import org.apache.kylin.storage.hbase.HBaseConnection;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Created by dongli on 1/18/16.
+ */
+public class UpdateHTableHostCLI {
+private static final Log logger = 
LogFactory.getLog(UpdateHTableHostCLI.class);
+private List updatedResources = Lists.newArrayList();
+private List errorMsgs = Lists.newArrayList();
+
+private List htables;
+private HBaseAdmin hbaseAdmin;
+private KylinConfig kylinConfig;
+
+public UpdateHTableHostCLI(List htables) throws IOException {
+this.htables = htables;
+this.hbaseAdmin = new 
HBaseAdmin(HBaseConnection.getCurrentHBaseConfiguration());
+this.kylinConfig = KylinConfig.getInstanceFromEnv();
+}
+
+public static void main(String args[]) throws Exception {
+if (args.length < 1) {
+printUsageAndExit();
+}
+
+List tableNames = 
getHTableNames(KylinConfig.getInstanceFromEnv());
+String filterType = args[0].toLowerCase();
+if (filterType.equals("-table")) {
+tableNames = filterByTables(tableNames, 
Arrays.asList(args).subList(1, args.length));
+} else if (filterType.equals("-cube")) {
+tableNames = filterByCubes(tableNames, 
Arrays.asList(args).subList(1, args.length));
+} else if (!filterType.equals("-all")) {
+printUsageAndExit();
+}
+
+UpdateHTableHostCLI updateHTableHostCLI = new 
UpdateHTableHostCLI(tableNames);
+updateHTableHostCLI.execute();
+
+
logger.info("=");
+logger.info("Run UpdateHTableHostCLI completed;");
+
+if 

kylin git commit: KYLIN-1303 Support tinyint in DataTypeSerializer

2016-01-14 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 6ab821c94 -> a09df13d3


KYLIN-1303 Support tinyint in DataTypeSerializer


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

Branch: refs/heads/2.0-rc
Commit: a09df13d354afc5dcf63b99b4967227d5afb8074
Parents: 6ab821c
Author: lidongsjtu 
Authored: Fri Jan 15 09:54:14 2016 +0800
Committer: lidongsjtu 
Committed: Fri Jan 15 09:54:14 2016 +0800

--
 .../kylin/metadata/measure/serializer/DataTypeSerializer.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/a09df13d/core-metadata/src/main/java/org/apache/kylin/metadata/measure/serializer/DataTypeSerializer.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/measure/serializer/DataTypeSerializer.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/measure/serializer/DataTypeSerializer.java
index 364830a..d42233d 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/measure/serializer/DataTypeSerializer.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/measure/serializer/DataTypeSerializer.java
@@ -48,6 +48,7 @@ abstract public class DataTypeSerializer implements 
BytesSerializer {
 impl.put("long", LongSerializer.class);
 impl.put("integer", LongSerializer.class);
 impl.put("int", LongSerializer.class);
+impl.put("tinyint", LongSerializer.class);
 impl.put("smallint", LongSerializer.class);
 impl.put("boolean", BooleanSerializer.class);
 impl.put("date", DateTimeSerializer.class);



svn commit: r1724740 - in /kylin/site: docs/gettingstarted/ images/docs/ images/docs/concepts/

2016-01-15 Thread lidong
Author: lidong
Date: Fri Jan 15 08:43:33 2016
New Revision: 1724740

URL: http://svn.apache.org/viewvc?rev=1724740=rev
Log:
documents of technical concepts

Added:
kylin/site/docs/gettingstarted/concepts.html
kylin/site/images/docs/
kylin/site/images/docs/concepts/
kylin/site/images/docs/concepts/AggregationGroup.png   (with props)
kylin/site/images/docs/concepts/CubeAction.png   (with props)
kylin/site/images/docs/concepts/CubeDesc.png   (with props)
kylin/site/images/docs/concepts/CubeInstance.png   (with props)
kylin/site/images/docs/concepts/CubeSegment.png   (with props)
kylin/site/images/docs/concepts/DataModel.png   (with props)
kylin/site/images/docs/concepts/DataSource.png   (with props)
kylin/site/images/docs/concepts/Dimension.png   (with props)
kylin/site/images/docs/concepts/Job.png   (with props)
kylin/site/images/docs/concepts/JobAction.png   (with props)
kylin/site/images/docs/concepts/Measure.png   (with props)
kylin/site/images/docs/concepts/Partition.png   (with props)

Added: kylin/site/docs/gettingstarted/concepts.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs/gettingstarted/concepts.html?rev=1724740=auto
==
--- kylin/site/docs/gettingstarted/concepts.html (added)
+++ kylin/site/docs/gettingstarted/concepts.html Fri Jan 15 08:43:33 2016
@@ -0,0 +1,1861 @@
+
+
+
+
+   
+
+
+  
+  
+  
+
+  Apache Kylin | Technical Concepts
+  
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+  
+  
+
+  http://kylin.apache.org/docs/gettingstarted/concepts.html;>
+  http://kylin.apache.org/feed.xml; />
+
+
+
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+  //oringal tracker for kylin.io
+  ga('create', 'UA-55534813-1', 'auto');
+  //new tracker for kylin.apache.org
+  ga('create', 'UA-55534813-2', 'auto', {'name':'toplevel'});
+
+  ga('send', 'pageview');
+  ga('toplevel.send', 'pageview');
+
+
+
+
+ 
+ 
+
+
+   
+   
+
+
+  
+  
+  Apache Kylin™ Extreme OLAP Engine for Big 
Data 
+
+  
+  
+
+  
+  
+  
+
+
+
+  
+Toggle navigation
+
+
+
+  
+ 
+
+
+
+
+  
+ Home
+  Docs
+  Download
+  Community
+  Development
+  Blog
+  中文版  
+  https://twitter.com/apachekylin; target="_blank" 
class="fa fa-twitter fa-lg" title="Twitter: @ApacheKylin" >
+  https://github.com/apache/kylin; target="_blank" 
class="fa fa-github-alt fa-lg" title="Github: apache/kylin" >  
+  https://www.facebook.com/kylinio; target="_blank" 
class="fa fa-facebook fa-lg" title="Facebook: kylin.io" >   
+
+
+  
+
+ 
+
+   
+   
+   
+   
+
+
+
+
+Getting Started
+
+   
+
+
+
+
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Overview  
+  
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Apache Kylin™ Release Notes  
+  
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  FAQ  
+  
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  Events and 
Conferences  
+  
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  Terminology  
+  
+
+
+
+
+
+
+
+
+  
+
+
+Installation
+
+   
+
+
+
+
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Installation Guide  
+  
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  Hadoop Environment  
+  
+
+
+
+  
+  
+
+  
+
+  
+
+
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+
+  
+   

[5/5] kylin git commit: KYLIN-1329 Bug fix for ACL exception when deleting model

2016-01-19 Thread lidong
KYLIN-1329 Bug fix for ACL exception when deleting model


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

Branch: refs/heads/2.x-staging
Commit: 109e1daf82cf784fc02b6bd6f17a057ada79ad1b
Parents: bb6e1f8
Author: lidongsjtu 
Authored: Tue Jan 19 10:29:22 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 17:17:00 2016 +0800

--
 .../main/java/org/apache/kylin/rest/service/AccessService.java   | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/109e1daf/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/service/AccessService.java 
b/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
index cd93eba..5370bba 100644
--- a/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
+++ b/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
@@ -219,6 +219,10 @@ public class AccessService {
 public void clean(AclEntity ae, boolean deleteChildren) {
 Assert.notNull(ae, "Acl domain object required");
 
+// For those may have null uuid, like DataModel, won't delete Acl.
+if (ae.getId() == null)
+return;
+
 ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), 
ae.getId());
 
 try {



[4/5] kylin git commit: minor, removed unused pom files

2016-01-19 Thread lidong
minor, removed unused pom files


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

Branch: refs/heads/2.x-staging
Commit: bb6e1f84145ec8f5bab2a9a6a78345263729d299
Parents: 90de419
Author: lidongsjtu 
Authored: Tue Jan 19 10:54:38 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 17:16:44 2016 +0800

--
 cube/pom.xml | 186 --
 metadata/pom.xml | 156 --
 monitor/pom.xml  | 152 -
 3 files changed, 494 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/bb6e1f84/cube/pom.xml
--
diff --git a/cube/pom.xml b/cube/pom.xml
deleted file mode 100644
index 7e23dea..000
--- a/cube/pom.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
-4.0.0
-
-kylin-cube
-jar
-Kylin:Cube
-
-
-org.apache.kylin
-kylin
-1.1.1-incubating-SNAPSHOT
-
-
-
-
-
-org.apache.kylin
-kylin-common
-test-jar
-test
-${project.parent.version}
-
-
-
-
-org.apache.kylin
-kylin-metadata
-${project.parent.version}
-
-
-org.apache.kylin
-kylin-dictionary
-${project.parent.version}
-
-
-
-commons-cli
-commons-cli
-
-
-commons-lang
-commons-lang
-
-
-commons-io
-commons-io
-
-
-log4j
-log4j
-
-
-com.fasterxml.jackson.core
-jackson-databind
-
-
-commons-httpclient
-commons-httpclient
-
-
-com.google.guava
-guava
-
-
-com.ning
-compress-lzf
-
-
-org.roaringbitmap
-RoaringBitmap
-
-
-
-
-
-
-org.apache.hadoop
-hadoop-common
-provided
-
-
-org.apache.hadoop
-hadoop-annotations
-provided
-
-
-org.apache.hadoop
-hadoop-mapreduce-client-core
-provided
-
-
-org.apache.hadoop
-hadoop-minicluster
-test
-
-
-org.apache.mrunit
-mrunit
-hadoop2
-test
-
-
-org.apache.hbase
-hbase-hadoop2-compat
-provided
-
-
-org.apache.hbase
-hbase-common
-provided
-
-
-org.apache.hbase
-hbase-client
-provided
-
-
-org.apache.hbase
-hbase-server
-provided
-
-
-
-org.apache.hadoop
-hadoop-mapreduce-client-jobclient
-
-
-
-
-org.apache.hadoop
-hadoop-mapreduce-client-jobclient
-provided
-
-
-junit
-junit
-test
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/kylin/blob/bb6e1f84/metadata/pom.xml
--
diff --git a/metadata/pom.xml b/metadata/pom.xml
deleted file mode 100644
index 49db6b9..000
--- a/metadata/pom.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
-4.0.0
-
-kylin-metadata
-jar
-Kylin:Metadata
-
-
-org.apache.kylin
-kylin
-1.1.1-incubating-SNAPSHOT
-
-
-
-
-
-
-
-org.apache.kylin
-kylin-common
-${project.parent.version}
-
-
-
-org.apache.kylin
-kylin-common
-test-jar
-test
-${project.parent.version}
-
-
-
-com.fasterxml.jackson.core
-

[1/5] kylin git commit: KYLIN-1327 Tool for batch updating host information of htables

2016-01-19 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging ea95e6b0d -> 109e1daf8


KYLIN-1327 Tool for batch updating host information of htables


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

Branch: refs/heads/2.x-staging
Commit: b2789868ac697424409080414f1396f491a1385b
Parents: ea95e6b
Author: lidongsjtu 
Authored: Mon Jan 18 16:18:51 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 17:15:43 2016 +0800

--
 .../storage/hbase/util/UpdateHTableHostCLI.java | 192 +++
 1 file changed, 192 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b2789868/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
new file mode 100644
index 000..1ff98a4
--- /dev/null
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
@@ -0,0 +1,192 @@
+/*
+ * 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.storage.hbase.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.apache.kylin.common.KylinConfig;
+import org.apache.kylin.cube.CubeInstance;
+import org.apache.kylin.cube.CubeManager;
+import org.apache.kylin.cube.CubeSegment;
+import org.apache.kylin.invertedindex.IIInstance;
+import org.apache.kylin.invertedindex.IIManager;
+import org.apache.kylin.invertedindex.IISegment;
+import org.apache.kylin.metadata.model.SegmentStatusEnum;
+import org.apache.kylin.metadata.realization.IRealizationConstants;
+import org.apache.kylin.metadata.realization.RealizationStatusEnum;
+import org.apache.kylin.storage.hbase.HBaseConnection;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Created by dongli on 1/18/16.
+ */
+public class UpdateHTableHostCLI {
+private static final Log logger = 
LogFactory.getLog(UpdateHTableHostCLI.class);
+private List updatedResources = Lists.newArrayList();
+private List errorMsgs = Lists.newArrayList();
+
+private List htables;
+private HBaseAdmin hbaseAdmin;
+private KylinConfig kylinConfig;
+
+public UpdateHTableHostCLI(List htables) throws IOException {
+this.htables = htables;
+this.hbaseAdmin = new 
HBaseAdmin(HBaseConnection.getCurrentHBaseConfiguration());
+this.kylinConfig = KylinConfig.getInstanceFromEnv();
+}
+
+public static void main(String args[]) throws Exception {
+if (args.length < 1) {
+printUsageAndExit();
+}
+
+List tableNames = 
getHTableNames(KylinConfig.getInstanceFromEnv());
+String filterType = args[0].toLowerCase();
+if (filterType.equals("-table")) {
+tableNames = filterByTables(tableNames, 
Arrays.asList(args).subList(1, args.length));
+} else if (filterType.equals("-cube")) {
+tableNames = filterByCubes(tableNames, 
Arrays.asList(args).subList(1, args.length));
+} else if (!filterType.equals("-all")) {
+printUsageAndExit();
+}
+
+UpdateHTableHostCLI updateHTableHostCLI = new 
UpdateHTableHostCLI(tableNames);
+updateHTableHostCLI.execute();
+
+
logger.info("=");
+logger.info("Run UpdateHTableHostCLI completed;");
+
+if 

kylin git commit: KYLIN-1335 Disable PrintResult in KylinQueryTest

2016-01-19 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 4f4532260 -> 7ad2eeb3b


KYLIN-1335 Disable PrintResult in KylinQueryTest


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

Branch: refs/heads/1.x-staging
Commit: 7ad2eeb3b24dd6e9e358d77570c00dfd276354ac
Parents: 4f45322
Author: lidongsjtu 
Authored: Tue Jan 19 17:28:25 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 17:28:35 2016 +0800

--
 .../src/test/java/org/apache/kylin/query/test/KylinTestBase.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/7ad2eeb3/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java
--
diff --git a/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java 
b/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java
index 95a11f8..f9205b7 100644
--- a/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java
+++ b/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java
@@ -209,7 +209,7 @@ public class KylinTestBase {
 if (needSort) {
 queryTable = new SortedTable(queryTable, columnNames);
 }
- printResult(queryTable);
+// printResult(queryTable);
 
 return queryTable;
 }
@@ -265,7 +265,7 @@ public class KylinTestBase {
 if (needSort) {
 queryTable = new SortedTable(queryTable, columnNames);
 }
- printResult(queryTable);
+// printResult(queryTable);
 return queryTable;
 }
 



[2/2] kylin git commit: KYLIN-1327 Add from filter to UpdateHTableHostCLI

2016-01-18 Thread lidong
KYLIN-1327 Add from filter to UpdateHTableHostCLI


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

Branch: refs/heads/2.0-rc
Commit: dfcebb3eaf33b60cdf6e3b93933994e7021591e6
Parents: 203f63b
Author: lidongsjtu 
Authored: Tue Jan 19 10:40:00 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 10:40:18 2016 +0800

--
 .../storage/hbase/util/UpdateHTableHostCLI.java | 32 +---
 1 file changed, 21 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/dfcebb3e/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
index 1ff98a4..f70ca10 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/UpdateHTableHostCLI.java
@@ -54,9 +54,11 @@ public class UpdateHTableHostCLI {
 private List htables;
 private HBaseAdmin hbaseAdmin;
 private KylinConfig kylinConfig;
+private String oldHostValue;
 
-public UpdateHTableHostCLI(List htables) throws IOException {
+public UpdateHTableHostCLI(List htables, String oldHostValue) 
throws IOException {
 this.htables = htables;
+this.oldHostValue = oldHostValue;
 this.hbaseAdmin = new 
HBaseAdmin(HBaseConnection.getCurrentHBaseConfiguration());
 this.kylinConfig = KylinConfig.getInstanceFromEnv();
 }
@@ -67,16 +69,21 @@ public class UpdateHTableHostCLI {
 }
 
 List tableNames = 
getHTableNames(KylinConfig.getInstanceFromEnv());
-String filterType = args[0].toLowerCase();
+if (!args[0].toLowerCase().equals("-from")) {
+printUsageAndExit();
+}
+String oldHostValue = args[1].toLowerCase();
+String filterType = args[2].toLowerCase();
 if (filterType.equals("-table")) {
-tableNames = filterByTables(tableNames, 
Arrays.asList(args).subList(1, args.length));
+tableNames = filterByTables(tableNames, 
Arrays.asList(args).subList(3, args.length));
 } else if (filterType.equals("-cube")) {
-tableNames = filterByCubes(tableNames, 
Arrays.asList(args).subList(1, args.length));
+tableNames = filterByCubes(tableNames, 
Arrays.asList(args).subList(3, args.length));
 } else if (!filterType.equals("-all")) {
 printUsageAndExit();
 }
+logger.info("These htables are needed to be updated: " + 
StringUtils.join(tableNames, ","));
 
-UpdateHTableHostCLI updateHTableHostCLI = new 
UpdateHTableHostCLI(tableNames);
+UpdateHTableHostCLI updateHTableHostCLI = new 
UpdateHTableHostCLI(tableNames, oldHostValue);
 updateHTableHostCLI.execute();
 
 
logger.info("=");
@@ -104,7 +111,7 @@ public class UpdateHTableHostCLI {
 }
 
 private static void printUsageAndExit() {
-logger.info("Usage: exec -all|-cube cubeA,cubeB|-table tableA,tableB");
+logger.info("Usage: exec -from oldHostValue -all|-cube 
cubeA,cubeB|-table tableA,tableB");
 System.exit(0);
 }
 
@@ -172,17 +179,20 @@ public class UpdateHTableHostCLI {
 
 private void updateHtable(String tableName) throws IOException {
 HTableDescriptor desc = 
hbaseAdmin.getTableDescriptor(TableName.valueOf(tableName));
-hbaseAdmin.disableTable(tableName);
-desc.setValue(IRealizationConstants.HTableTag, 
kylinConfig.getMetadataUrlPrefix());
-hbaseAdmin.modifyTable(tableName, desc);
-hbaseAdmin.enableTable(tableName);
+if 
(oldHostValue.equals(desc.getValue(kylinConfig.getMetadataUrlPrefix( {
+desc.setValue(IRealizationConstants.HTableTag, 
kylinConfig.getMetadataUrlPrefix());
+hbaseAdmin.disableTable(tableName);
+hbaseAdmin.modifyTable(tableName, desc);
+hbaseAdmin.enableTable(tableName);
+
+updatedResources.add(tableName);
+}
 }
 
 public void execute() {
 for (String htable : htables) {
 try {
 updateHtable(htable);
-updatedResources.add(htable);
 } catch (IOException ex) {
 ex.printStackTrace();
 errorMsgs.add("Update HTable[" + htable + "] failed: " + 

kylin git commit: minor, removed unused pom files

2016-01-18 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc dfcebb3ea -> d3b97e25e


minor, removed unused pom files


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

Branch: refs/heads/2.0-rc
Commit: d3b97e25efd42558322e8f0f1b84e25293bf4752
Parents: dfcebb3
Author: lidongsjtu 
Authored: Tue Jan 19 10:54:38 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 10:54:38 2016 +0800

--
 cube/pom.xml | 186 --
 metadata/pom.xml | 156 --
 monitor/pom.xml  | 152 -
 3 files changed, 494 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/d3b97e25/cube/pom.xml
--
diff --git a/cube/pom.xml b/cube/pom.xml
deleted file mode 100644
index 7e23dea..000
--- a/cube/pom.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
-4.0.0
-
-kylin-cube
-jar
-Kylin:Cube
-
-
-org.apache.kylin
-kylin
-1.1.1-incubating-SNAPSHOT
-
-
-
-
-
-org.apache.kylin
-kylin-common
-test-jar
-test
-${project.parent.version}
-
-
-
-
-org.apache.kylin
-kylin-metadata
-${project.parent.version}
-
-
-org.apache.kylin
-kylin-dictionary
-${project.parent.version}
-
-
-
-commons-cli
-commons-cli
-
-
-commons-lang
-commons-lang
-
-
-commons-io
-commons-io
-
-
-log4j
-log4j
-
-
-com.fasterxml.jackson.core
-jackson-databind
-
-
-commons-httpclient
-commons-httpclient
-
-
-com.google.guava
-guava
-
-
-com.ning
-compress-lzf
-
-
-org.roaringbitmap
-RoaringBitmap
-
-
-
-
-
-
-org.apache.hadoop
-hadoop-common
-provided
-
-
-org.apache.hadoop
-hadoop-annotations
-provided
-
-
-org.apache.hadoop
-hadoop-mapreduce-client-core
-provided
-
-
-org.apache.hadoop
-hadoop-minicluster
-test
-
-
-org.apache.mrunit
-mrunit
-hadoop2
-test
-
-
-org.apache.hbase
-hbase-hadoop2-compat
-provided
-
-
-org.apache.hbase
-hbase-common
-provided
-
-
-org.apache.hbase
-hbase-client
-provided
-
-
-org.apache.hbase
-hbase-server
-provided
-
-
-
-org.apache.hadoop
-hadoop-mapreduce-client-jobclient
-
-
-
-
-org.apache.hadoop
-hadoop-mapreduce-client-jobclient
-provided
-
-
-junit
-junit
-test
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/kylin/blob/d3b97e25/metadata/pom.xml
--
diff --git a/metadata/pom.xml b/metadata/pom.xml
deleted file mode 100644
index 49db6b9..000
--- a/metadata/pom.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
-4.0.0
-
-kylin-metadata
-jar
-Kylin:Metadata
-
-
-org.apache.kylin
-kylin
-1.1.1-incubating-SNAPSHOT
-
-
-
-
-
-
-
-org.apache.kylin
-kylin-common
-${project.parent.version}
-
-
-
-org.apache.kylin
-kylin-common
-test-jar
-test
-${project.parent.version}
-
-

[1/2] kylin git commit: KYLIN-1329 Bug fix for ACL exception when deleting model

2016-01-18 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc 32bdcdbd3 -> dfcebb3ea


KYLIN-1329 Bug fix for ACL exception when deleting model


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

Branch: refs/heads/2.0-rc
Commit: 203f63baa0fa0e4cae3a5cabe1dfedbd8e3c0d8d
Parents: 32bdcdb
Author: lidongsjtu 
Authored: Tue Jan 19 10:29:22 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 10:40:17 2016 +0800

--
 .../main/java/org/apache/kylin/rest/service/AccessService.java   | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/203f63ba/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/service/AccessService.java 
b/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
index cd93eba..5370bba 100644
--- a/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
+++ b/server/src/main/java/org/apache/kylin/rest/service/AccessService.java
@@ -219,6 +219,10 @@ public class AccessService {
 public void clean(AclEntity ae, boolean deleteChildren) {
 Assert.notNull(ae, "Acl domain object required");
 
+// For those may have null uuid, like DataModel, won't delete Acl.
+if (ae.getId() == null)
+return;
+
 ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), 
ae.getId());
 
 try {



kylin git commit: KYLIN-1328 add break after remove model cache

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


KYLIN-1328 add break after remove model cache


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

Branch: refs/heads/2.x-staging
Commit: ea95e6b0dccb93c976ada7a1d403b9909a860b94
Parents: 000d883
Author: lidongsjtu 
Authored: Tue Jan 19 15:30:32 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 19 15:32:04 2016 +0800

--
 .../src/main/java/org/apache/kylin/rest/service/CacheService.java   | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/ea95e6b0/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
--
diff --git 
a/server/src/main/java/org/apache/kylin/rest/service/CacheService.java 
b/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
index 27650b2..83b9ac7 100644
--- a/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
+++ b/server/src/main/java/org/apache/kylin/rest/service/CacheService.java
@@ -262,6 +262,7 @@ public class CacheService extends BasicService {
 throw new UnsupportedOperationException(log);
 case DATA_MODEL:
 getMetadataManager().removeModelCache(cacheKey);
+break;
 default:
 throw new RuntimeException("invalid cacheType:" + cacheType);
 }



svn commit: r1750269 - in /kylin/site: development/dev_env.html feed.xml images/develop/eclipse_code_formatter_config.png images/develop/kylin-intellij-code-style.png

2016-06-26 Thread lidong
Author: lidong
Date: Mon Jun 27 03:43:27 2016
New Revision: 1750269

URL: http://svn.apache.org/viewvc?rev=1750269=rev
Log:
update dev env

Added:
kylin/site/images/develop/kylin-intellij-code-style.png   (with props)
Modified:
kylin/site/development/dev_env.html
kylin/site/feed.xml
kylin/site/images/develop/eclipse_code_formatter_config.png

Modified: kylin/site/development/dev_env.html
URL: 
http://svn.apache.org/viewvc/kylin/site/development/dev_env.html?rev=1750269=1750268=1750269=diff
==
--- kylin/site/development/dev_env.html (original)
+++ kylin/site/development/dev_env.html Mon Jun 27 03:43:27 2016
@@ -578,11 +578,16 @@ bower --allow-root install<
 
 
   
-Install “Eclipse Code Formatter” and configure it as follows:
+Install “Eclipse Code Formatter” and use 
“org.eclipse.jdt.core.prefs” and “org.eclipse.jdt.ui.prefs” in 
core-common/.settings to configure “Eclipse Java Formatter config file” and 
“Import order”
 
 
   
   
+Go to Preference = Code Style = Java, set “Scheme” to 
Default, and set both “Class count to use import with ‘*’” and “Names 
count to use static import with ‘*’” to 99.
+
+
+  
+  
 Disable intellij IDEA’s “Optimize imports on the fly”
 
 

Modified: kylin/site/feed.xml
URL: 
http://svn.apache.org/viewvc/kylin/site/feed.xml?rev=1750269=1750268=1750269=diff
==
--- kylin/site/feed.xml (original)
+++ kylin/site/feed.xml Mon Jun 27 03:43:27 2016
@@ -19,8 +19,8 @@
 Apache Kylin Home
 http://kylin.apache.org/
 http://kylin.apache.org/feed.xml; rel="self" 
type="application/rss+xml"/>
-Sun, 12 Jun 2016 04:36:27 -0700
-Sun, 12 Jun 2016 04:36:27 -0700
+Mon, 27 Jun 2016 04:41:50 -0700
+Mon, 27 Jun 2016 04:41:50 -0700
 Jekyll v2.5.3
 
   

Modified: kylin/site/images/develop/eclipse_code_formatter_config.png
URL: 
http://svn.apache.org/viewvc/kylin/site/images/develop/eclipse_code_formatter_config.png?rev=1750269=1750268=1750269=diff
==
Binary files - no diff available.

Added: kylin/site/images/develop/kylin-intellij-code-style.png
URL: 
http://svn.apache.org/viewvc/kylin/site/images/develop/kylin-intellij-code-style.png?rev=1750269=auto
==
Binary file - no diff available.

Propchange: kylin/site/images/develop/kylin-intellij-code-style.png
--
svn:mime-type = application/octet-stream




[2/3] kylin git commit: minor, rename in Hybrid tool

2016-01-25 Thread lidong
minor, rename in Hybrid tool


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

Branch: refs/heads/2.x-staging
Commit: 74116bce6946d7399bfa7968985a2b7e55b5b4a0
Parents: 3825a83
Author: lidongsjtu 
Authored: Mon Jan 25 09:49:14 2016 +0800
Committer: lidongsjtu 
Committed: Tue Jan 26 12:10:34 2016 +0800

--
 .../hbase/util/ExtendCubeToHybridCLI.java   | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/74116bce/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ExtendCubeToHybridCLI.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ExtendCubeToHybridCLI.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ExtendCubeToHybridCLI.java
index 21d02ed..e5f1f1a 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ExtendCubeToHybridCLI.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/ExtendCubeToHybridCLI.java
@@ -62,6 +62,8 @@ import com.google.common.collect.Lists;
  */
 public class ExtendCubeToHybridCLI {
 public static final String ACL_INFO_FAMILY = "i";
+private static final String CUBE_POSTFIX = "_old";
+private static final String HYBRID_POSTFIX = "_hybrid";
 private static final Logger logger = 
LoggerFactory.getLogger(ExtendCubeToHybridCLI.class);
 private static final String ACL_INFO_FAMILY_PARENT_COLUMN = "p";
 
@@ -133,12 +135,12 @@ public class ExtendCubeToHybridCLI {
 long partitionDate = partitionDateStr != null ? 
DateFormat.stringToMillis(partitionDateStr, dateFormat) : 0;
 
 // get new name for old cube and cube_desc
-String newCubeDescName = rename(cubeDesc.getName());
-String newCubeInstanceName = rename(cubeInstance.getName());
+String newCubeDescName = renameCube(cubeDesc.getName());
+String newCubeInstanceName = renameCube(cubeInstance.getName());
 while (cubeDescManager.getCubeDesc(newCubeDescName) != null)
-newCubeDescName = rename(newCubeDescName);
+newCubeDescName = renameCube(newCubeDescName);
 while (cubeManager.getCube(newCubeInstanceName) != null)
-newCubeInstanceName = rename(newCubeInstanceName);
+newCubeInstanceName = renameCube(newCubeInstanceName);
 
 // create new cube_instance for old segments
 CubeInstance newCubeInstance = CubeInstance.getCopyOf(cubeInstance);
@@ -191,7 +193,7 @@ public class ExtendCubeToHybridCLI {
 List realizationEntries = 
Lists.newArrayListWithCapacity(2);
 realizationEntries.add(RealizationEntry.create(RealizationType.CUBE, 
cubeInstance.getName()));
 realizationEntries.add(RealizationEntry.create(RealizationType.CUBE, 
newCubeInstance.getName()));
-HybridInstance hybridInstance = HybridInstance.create(kylinConfig, 
cubeInstance.getName(), realizationEntries);
+HybridInstance hybridInstance = HybridInstance.create(kylinConfig, 
renameHybrid(cubeInstance.getName()), realizationEntries);
 store.putResource(hybridInstance.getResourcePath(), hybridInstance, 
HybridManager.HYBRID_SERIALIZER);
 
ProjectManager.getInstance(kylinConfig).moveRealizationToProject(RealizationType.HYBRID,
 hybridInstance.getName(), projectName, owner);
 logger.info("HybridInstance was saved at: " + 
hybridInstance.getResourcePath());
@@ -215,8 +217,12 @@ public class ExtendCubeToHybridCLI {
 HybridManager.getInstance(kylinConfig);
 }
 
-private String rename(String origName) {
-return origName + "_legacy";
+private String renameCube(String origName) {
+return origName + CUBE_POSTFIX;
+}
+
+private String renameHybrid(String origName) {
+return origName + HYBRID_POSTFIX;
 }
 
 private void copyAcl(String origCubeId, String newCubeId, String 
projectName) throws Exception {



kylin git commit: KYLIN-1232 ODBC - Refine connection and configuration dialog UI

2016-01-31 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 957dd42e7 -> 9b19b69f1


KYLIN-1232 ODBC - Refine connection and configuration dialog UI


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

Branch: refs/heads/2.x-staging
Commit: 9b19b69f1776a5fa6edcdcdaa64bdde88af9837a
Parents: 957dd42
Author: lidongsjtu 
Authored: Mon Feb 1 15:29:46 2016 +0800
Committer: lidongsjtu 
Committed: Mon Feb 1 15:29:46 2016 +0800

--
 odbc/Driver/GODBC.RC   | 205 +++-
 odbc/Driver/KO_CONN.CPP|  47 +++-
 odbc/Driver/KO_Config.cpp  |  90 +++---
 odbc/Driver/banner.bmp | Bin 0 -> 93654 bytes
 odbc/Driver/driver.vcxproj |   5 +-
 odbc/Driver/driver.vcxproj.filters |   7 +-
 odbc/Driver/resource.h |  10 +-
 7 files changed, 255 insertions(+), 109 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/9b19b69f/odbc/Driver/GODBC.RC
--
diff --git a/odbc/Driver/GODBC.RC b/odbc/Driver/GODBC.RC
index dd2cb3f..9e0f4c3 100644
--- a/odbc/Driver/GODBC.RC
+++ b/odbc/Driver/GODBC.RC
@@ -31,6 +31,23 @@
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /
+// Chinese (Simplified, PRC) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
+LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
+#pragma code_page(936)
+
+/
+//
+// Bitmap
+//
+
+IDB_BITMAP1 BITMAP  "banner.bmp"
+#endif// Chinese (Simplified, PRC) resources
+/
+
+
+/
 // English (United States) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
@@ -43,21 +60,21 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE
+1 TEXTINCLUDE 
 BEGIN
-"resource.h\0"
+"resource.h\0"
 END
 
-2 TEXTINCLUDE
+2 TEXTINCLUDE 
 BEGIN
-"#include ""afxres.h""\r\n"
-"\0"
+"#include ""afxres.h""\r\n"
+"\0"
 END
 
-3 TEXTINCLUDE
+3 TEXTINCLUDE 
 BEGIN
-"\r\n"
-"\0"
+"\r\n"
+"\0"
 END
 
 #endif// APSTUDIO_INVOKED
@@ -69,36 +86,36 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
-FILEVERSION 1, 0, 0, 1
-PRODUCTVERSION 1, 0, 0, 1
-FILEFLAGSMASK 0x3fL
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
-FILEFLAGS 0x1L
+ FILEFLAGS 0x1L
 #else
-FILEFLAGS 0x0L
+ FILEFLAGS 0x0L
 #endif
-FILEOS 0x40004L
-FILETYPE 0x2L
-FILESUBTYPE 0x0L
-BEGIN
-BLOCK "StringFileInfo"
-BEGIN
-BLOCK "040904b0"
-BEGIN
-VALUE "CompanyName", "kylinolap"
-VALUE "FileDescription", "Kylin ODBC Driver"
-VALUE "FileVersion", "1, 0, 0, 1"
-VALUE "InternalName", "KylinODBC"
-VALUE "LegalCopyright", "Copyright ?2014"
-VALUE "OriginalFilename", "driver.dll"
-VALUE "ProductName", "Kylin ODBC Driver"
-VALUE "ProductVersion", "1, 0, 0, 1"
-END
-END
-BLOCK "VarFileInfo"
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
 BEGIN
-VALUE "Translation", 0x409, 1200
-END
+BLOCK "StringFileInfo"
+BEGIN
+BLOCK "040904b0"
+BEGIN
+VALUE "CompanyName", "kylinolap"
+VALUE "FileDescription", "Kylin ODBC Driver"
+VALUE "FileVersion", "1, 0, 0, 1"
+VALUE "InternalName", "KylinODBC"
+VALUE "LegalCopyright", "Copyright ?2014"
+VALUE "OriginalFilename", "driver.dll"
+VALUE "ProductName", "Kylin ODBC Driver"
+VALUE "ProductVersion", "1, 0, 0, 1"
+END
+END
+BLOCK "VarFileInfo"
+BEGIN
+VALUE "Translation", 0x409, 1200
+END
 END
 
 
@@ -107,48 +124,52 @@ END
 // Dialog
 //
 
-IDD_DSN_CFG1 DIALOGEX 0, 0, 263, 162
+IDD_DSN_CFG1 DIALOGEX 0, 0, 265, 210
 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
-CAPTION "Kylin Driver Connect Dialog"
+CAPTION "Apache Kylin Driver Connection"
 FONT 8, "MS Sans Serif", 0, 0, 0x0
 BEGIN
-PUSHBUTTON  "Cancel", IDCANCEL, 152, 138, 50, 14
-LTEXT   "Server Host", IDC_STATIC, 49, 16, 38, 8
-LTEXT   "Port", IDC_STATIC, 69, 32, 14, 8
-EDITTEXTIDC_SERVER, 92, 14, 110, 12, ES_AUTOHSCROLL
-EDITTEXTIDC_PORT, 92, 31, 30, 12, ES_AUTOHSCROLL
-LTEXT   "(only https service permitted)", IDC_STATIC, 93, 45, 90, 8
-LTEXT   "Username", IDC_STATIC, 52, 60, 33, 8
-LTEXT   "Password", IDC_STATIC, 54, 79, 32, 8
-EDITTEXTIDC_UID, 92, 59, 111, 

kylin git commit: KYLIN-1386 ODBC - Fix issue of duplicated projects in Connection/DSN dialog

2016-01-31 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 84b56665d -> 3869540c5


KYLIN-1386 ODBC - Fix issue of duplicated projects in Connection/DSN dialog


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

Branch: refs/heads/2.x-staging
Commit: 3869540c5ef8c3bd4b3b7204c1e1b831b2b6a15e
Parents: 84b5666
Author: lidongsjtu 
Authored: Mon Feb 1 11:10:06 2016 +0800
Committer: lidongsjtu 
Committed: Mon Feb 1 11:10:55 2016 +0800

--
 odbc/Driver/KO_CONN.CPP   | 2 ++
 odbc/Driver/KO_Config.cpp | 2 ++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/3869540c/odbc/Driver/KO_CONN.CPP
--
diff --git a/odbc/Driver/KO_CONN.CPP b/odbc/Driver/KO_CONN.CPP
index 7c3c43d..9d31df0 100644
--- a/odbc/Driver/KO_CONN.CPP
+++ b/odbc/Driver/KO_CONN.CPP
@@ -395,6 +395,8 @@ INT_PTR CALLBACK DlgDSNCfg1Proc ( HWND hDlg, UINT uMsg, 
WPARAM wParam, LPARAM lP
 std::vector projects;
 restListProjects ( pgConn->Server, 
pgConn->ServerPort, pgConn->UserName, pgConn->Password, projects );
 
+   // reload project list
+   SendMessage ( 
hwndCombo, CB_RESETCONTENT, 0, 0 );
 for ( unsigned int i = 0 ; i < projects.size(); 
++i ) {
 SendMessage ( hwndCombo, ( UINT ) 
CB_ADDSTRING, ( WPARAM ) 0, ( LPARAM ) projects.at ( i ).c_str() );
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/3869540c/odbc/Driver/KO_Config.cpp
--
diff --git a/odbc/Driver/KO_Config.cpp b/odbc/Driver/KO_Config.cpp
index 69b9d97..bb27fb4 100644
--- a/odbc/Driver/KO_Config.cpp
+++ b/odbc/Driver/KO_Config.cpp
@@ -592,6 +592,8 @@ INT_PTR CALLBACK DlgDSNCfg2Proc ( HWND hDlg, UINT uMsg, 
WPARAM wParam, LPARAM lP
 std::vector projects;
 restListProjects ( serverStr, port, 
uidStr, pwdStr, projects );
 
+   // 
reload project list
+   
SendMessage ( hwndCombo, CB_RESETCONTENT, 0, 0 );
 for ( unsigned int i = 0 ; i < 
projects.size(); ++i ) {
 SendMessage ( hwndCombo, ( UINT ) 
CB_ADDSTRING, ( WPARAM ) 0, ( LPARAM ) projects.at ( i ).c_str() );
 }



[10/11] kylin git commit: KYLIN-1389 ODBC - Reformatting C++ Code

2016-02-01 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/Common/REST.cpp
--
diff --git a/odbc/Common/REST.cpp b/odbc/Common/REST.cpp
index 15921aa..bc3a6b8 100644
--- a/odbc/Common/REST.cpp
+++ b/odbc/Common/REST.cpp
@@ -15,8 +15,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- 
+
+
 #include 
 #include 
 #include 
@@ -45,9 +45,10 @@ using namespace concurrency::streams;
 using namespace web;
 using namespace web::json;
 
-void printLog ( const char* msg ) {
-time_t now = time ( 0 );
-struct tm  tstruct;
+void printLog ( const char* msg )
+{
+time_t now = time ( 0 );
+struct tm tstruct;
 char buffer[100];
 tstruct = *localtime (  );
 strftime ( buffer, 100, "%Y-%m-%d.%X",  );
@@ -63,17 +64,21 @@ void printLog ( const char* msg ) {
 /// 
 /// 
 /// 
-int ScanForLength ( std::vector results, int column ) {
+int ScanForLength ( std::vector  results, int column )
+{
 int max = 0;
-
-for ( auto p = results.begin(); p < results.end(); p++ ) {
+
+for ( auto p = results . begin (); p < results . end (); p++ )
+{
 SQLRowContent* result = *p;
-int length = result->contents[column].size();
-
+int length = result -> contents[column] . size ();
+
 if ( length > max )
-{ max = length; }
+{
+max = length;
+}
 }
-
+
 return max;
 }
 
@@ -84,299 +89,355 @@ int ScanForLength ( std::vector results, 
int column ) {
 /// 
 /// 
 /// 
-int ScanForScale ( std::vector results, int column ) {
+int ScanForScale ( std::vector  results, int column )
+{
 int max = 0;
-
-for ( auto p = results.begin(); p < results.end(); p++ ) {
+
+for ( auto p = results . begin (); p < results . end (); p++ )
+{
 SQLRowContent* result = *p;
-int length = result->contents[column].size();
-int dotLocation = result->contents[column].find ( L"." );
-
-if ( dotLocation != string::npos ) {
+int length = result -> contents[column] . size ();
+int dotLocation = result -> contents[column] . find ( L"." );
+
+if ( dotLocation != string::npos )
+{
 int scale = length - 1 - dotLocation;
-
+
 if ( scale > max )
-{ max = scale; }
+{
+max = scale;
+}
 }
 }
-
+
 return max;
 }
 
 
-void overwrite ( SQLResponse* res ) {
-for ( int i = 0; i < ( int ) res->columnMetas.size(); ++i ) {
-SelectedColumnMeta* meta = res->columnMetas[i];
-ODBCTypes t = ( ODBCTypes ) meta->columnType;
+void overwrite ( SQLResponse* res )
+{
+for ( int i = 0; i < ( int ) res -> columnMetas . size (); ++i )
+{
+SelectedColumnMeta* meta = res -> columnMetas[i];
+ODBCTypes t = ( ODBCTypes ) meta -> columnType;
 int scale = 0;
 int length = 0;
-
-switch ( t ) {
-case ODBCTypes::ODBC_Numeric:
-case ODBCTypes::ODBC_Decimal:
-case ODBCTypes::ODBC_Double:
-case ODBCTypes::ODBC_Real:
-case ODBCTypes::ODBC_Float:
-scale = ScanForScale ( res->results, i );
-meta->scale = scale;
-meta->scale = 4;
+
+switch ( t )
+{
+case ODBCTypes::ODBC_Numeric :
+case ODBCTypes::ODBC_Decimal :
+case ODBCTypes::ODBC_Double :
+case ODBCTypes::ODBC_Real :
+case ODBCTypes::ODBC_Float :
+scale = ScanForScale ( res -> results, i );
+meta -> scale = scale;
+meta -> scale = 4;
 break;
-
-case ODBCTypes::ODBC_Char:
-case ODBCTypes::ODBC_VarChar:
-case ODBCTypes::ODBC_LongVarChar:
-case ODBCTypes::ODBC_WChar:
-case ODBCTypes::ODBC_WVarChar:
-case ODBCTypes::ODBC_WLongVarChar:
-case ODBCTypes::ODBC_DateTime:
-case ODBCTypes::ODBC_Type_Date:
-case ODBCTypes::ODBC_Type_Time:
-case ODBCTypes::ODBC_Type_Timestamp:
-length = ScanForLength ( res->results, i );
-meta->displaySize = length;
-meta->precision = length;
+
+case ODBCTypes::ODBC_Char :
+case ODBCTypes::ODBC_VarChar :
+case ODBCTypes::ODBC_LongVarChar :
+case ODBCTypes::ODBC_WChar :
+case ODBCTypes::ODBC_WVarChar :
+case ODBCTypes::ODBC_WLongVarChar :
+case ODBCTypes::ODBC_DateTime :
+case ODBCTypes::ODBC_Type_Date :
+case ODBCTypes::ODBC_Type_Time :
+case ODBCTypes::ODBC_Type_Timestamp :
+

[08/11] kylin git commit: KYLIN-1389 ODBC - Reformatting C++ Code

2016-02-01 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/Driver/KO_CONN.CPP
--
diff --git a/odbc/Driver/KO_CONN.CPP b/odbc/Driver/KO_CONN.CPP
index 28642b1..cee9b39 100644
--- a/odbc/Driver/KO_CONN.CPP
+++ b/odbc/Driver/KO_CONN.CPP
@@ -15,8 +15,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- 
+
+
 // 
 //
 // File:KO_CONN.CPP
@@ -58,110 +58,126 @@
 INT_PTR CALLBACK DlgDSNCfg1Proc ( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM 
lParam );
 
 // - local functions --
-static eGoodBad CreateAndSetConnProp ( pODBCConn pConn, Word pPropID, 
void* pPropValue );
+static eGoodBad CreateAndSetConnProp ( pODBCConn pConn, Word pPropID, void* 
pPropValue );
 
-static eGoodBad PutDataToDlgDSNCfg1 ( pODBCConn pConn, HWND hDlg );
+static eGoodBad PutDataToDlgDSNCfg1 ( pODBCConn pConn, HWND hDlg );
 
-static eGoodBad GetDataFromDlgDSNCfg1 ( HWND hDlg, pODBCConn pConn );
+static eGoodBad GetDataFromDlgDSNCfg1 ( HWND hDlg, pODBCConn pConn );
 
-static Word PromptForConnInfo ( SQLHDBC pConn );
+static Word PromptForConnInfo ( SQLHDBC pConn );
 
-static eGoodBad LoadKeyValuesfromFileDSN ( pODBCConn pConn, CStrPtr 
pDSNName, Word* pNumPair,
-   struct ODBCKV** pKV );
+static eGoodBad LoadKeyValuesfromFileDSN ( pODBCConn pConn, CStrPtr pDSNName, 
Word* pNumPair,
+   struct ODBCKV** pKV );
 
-static bool AddKVToConnStr ( StrPtr pKey, StrPtr pValue, Word* iPos, 
StrPtr pStrConn, Word pMaxLen );
-static bool BuildConnStr ( char* pStrConn, Word pMaxLen, pODBCConn 
pConn, struct ODBCKV* KVInput,
-   Word iKVInputPairs, struct ODBCKV* 
KVFileDSN, Word iKVFileDSNPairs );
+static bool AddKVToConnStr ( StrPtr pKey, StrPtr pValue, Word* iPos, StrPtr 
pStrConn, Word pMaxLen );
+static bool BuildConnStr ( char* pStrConn, Word pMaxLen, pODBCConn pConn, 
struct ODBCKV* KVInput,
+   Word iKVInputPairs, struct ODBCKV* KVFileDSN, Word 
iKVFileDSNPairs );
 
-static const char *supportedProtocols[] = { PROTOCOL_HTTPS, PROTOCOL_HTTP };
-static const char *defaultPorts[] = { PORT_HTTPS_DEFAULT, PORT_HTTP_DEFAULT };
+static const char* supportedProtocols[] = { PROTOCOL_HTTPS, PROTOCOL_HTTP };
+static const char* defaultPorts[] = { PORT_HTTPS_DEFAULT, PORT_HTTP_DEFAULT };
 
 // ---
 // to set a specified property in the connection structure
 // ---
 
-eGoodBad SetConnProp ( pODBCConn pConn, Word pPropID, void* pPropValue ) {
+eGoodBad SetConnProp ( pODBCConn pConn, Word pPropID, void* pPropValue )
+{
 // note
 // this function does not create a copy of char data
 // it just transfers the pointer
 // numeric data is assumed to be a pointer
-
+
 // check property
-switch ( pPropID ) {
-case CONN_PROP_SERVER:
-
+switch ( pPropID )
+{
+case CONN_PROP_SERVER :
+
 // check if a new value has to be put
-if ( pPropValue ) {
-copyTrimmed ( & ( ( char* ) pConn->Server ), ( char* ) 
pPropValue );
+if ( pPropValue )
+{
+copyTrimmed ( & ( ( char* ) pConn -> Server ), ( char* ) 
pPropValue );
 }
-
-if ( pConn->Server == NULL || strlen ( pConn->Server ) == 0 ) {
+
+if ( pConn -> Server == NULL || strlen ( pConn -> Server ) == 0 )
+{
 __ODBCPopMsg ( "Server cannot be empty" );
 return BAD;
 }
-
+
 __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG, "The server is set to 
%s", pConn->Server ) );
 break;
-
-case CONN_PROP_PORT:
-
+
+case CONN_PROP_PORT :
+
 // numeric values are passed as pointer to value
 if ( pPropValue )
-{ pConn->ServerPort = * ( ( ULong* ) pPropValue ); }
-
-if ( pConn->ServerPort == 0 ) {
+{
+pConn -> ServerPort = * ( ( ULong* ) pPropValue );
+}
+
+if ( pConn -> ServerPort == 0 )
+{
 __ODBCPopMsg ( "ServerPort cannot be 0" );
 return BAD;
 }
-
+
 __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG, "The port is set to %d", 
pConn->ServerPort ) );
 break;
-
-case CONN_PROP_UID:
-
+
+case CONN_PROP_UID :
+
 // check if a new value has to be put
 if ( pPropValue )
-{ copyTrimmed ( & ( ( char* ) 

[05/11] kylin git commit: KYLIN-1389 ODBC - Reformatting C++ Code

2016-02-01 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/Driver/KO_DIAG.CPP
--
diff --git a/odbc/Driver/KO_DIAG.CPP b/odbc/Driver/KO_DIAG.CPP
index a74dd9d..e296335 100644
--- a/odbc/Driver/KO_DIAG.CPP
+++ b/odbc/Driver/KO_DIAG.CPP
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 
 // 
 //
@@ -65,441 +65,573 @@
 #include 
 
 
-
-
-
 // - local functions -
-static pODBCDiagRow  _SQLGetDiagRowX ( pODBCDiag pHandle, Word pRowNum );
-static pODBCDiag _SQLGetDiagHandle ( SQLSMALLINT pHandleType, 
SQLHANDLE pHandle );
+static pODBCDiagRow _SQLGetDiagRowX ( pODBCDiag pHandle, Word pRowNum );
+static pODBCDiag _SQLGetDiagHandle ( SQLSMALLINT pHandleType, SQLHANDLE 
pHandle );
 
 // - local functions -
-static LogLevel currentLogLevel =
-LogLevel_INFO;// Global variable to be set at the begining of pragram 
starts
+static LogLevel currentLogLevel =
+LogLevel_INFO;// Global variable to be set at the begining of pragram starts
 
 // ---
 // to get a specified field from the specified diag row
 // ---
 
 
-RETCODE SQL_API SQLGetDiagFieldW ( SQLSMALLINT pHandleType,
-   SQLHANDLE   pHandle,
-   SQLSMALLINT pRecNum,
-   SQLSMALLINT pFldID,
-   SQLPOINTER  pDataPtr,
-   SQLSMALLINT pDataSize,
-   SQLSMALLINT*pDataSizePtr ) {
+RETCODE SQL_API SQLGetDiagFieldW ( SQLSMALLINT pHandleType,
+   SQLHANDLE pHandle,
+   SQLSMALLINT pRecNum,
+   SQLSMALLINT pFldID,
+   SQLPOINTER pDataPtr,
+   SQLSMALLINT pDataSize,
+   SQLSMALLINT* pDataSizePtr )
+{
 __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG,
-  "SQLGetDiagFieldW called, HandleType: %d, 
RecNum: %d, InfoType: %d, BufLen: %d", pHandleType, pRecNum, pFldID,
-  pDataSize ) );
-boolc;
-pODBCDiagdiag;
+"SQLGetDiagFieldW called, HandleType: %d, RecNum: %d, InfoType: %d, 
BufLen: %d", pHandleType, pRecNum, pFldID,
+pDataSize ) );
+bool c;
+pODBCDiag diag;
 pODBCDiagRow diagrow;
 SQLSMALLINT dummySize = 0;//used when pDataSizePtr is NULL
-
+
 if ( pDataSizePtr == NULL )
-{ pDataSizePtr =  }
-
+{
+pDataSizePtr = 
+}
+
 __CHK_HANDLE ( pHandle, pHandleType, SQL_ERROR );
 diag = _SQLGetDiagHandle ( pHandleType, pHandle );
-
-if ( !diag ) { return SQL_ERROR; }
-
+
+if ( !diag )
+{
+return SQL_ERROR;
+}
+
 // field may be in diag header
 c = FALSE;
-
+
 // check the field type - header fields
-switch ( pFldID ) {
-case SQL_DIAG_CURSOR_ROW_COUNT:
-case SQL_DIAG_ROW_COUNT:// rows affected 
by update/insert
-if ( pHandleType == SQL_HANDLE_STMT ) {
+switch ( pFldID )
+{
+case SQL_DIAG_CURSOR_ROW_COUNT :
+case SQL_DIAG_ROW_COUNT : // rows affected by update/insert
+if ( pHandleType == SQL_HANDLE_STMT )
+{
 if ( pDataPtr )
-{ * ( ( SQLLEN* ) pDataPtr ) = ( pHandle ) ? ( ( pODBCStmt ) 
pHandle )->RowCount : 0; }
-
+{
+* ( ( SQLLEN* ) pDataPtr ) = ( pHandle ) ? ( ( pODBCStmt ) 
pHandle ) -> RowCount : 0;
+}
+
 return SQL_SUCCESS;
 }
-
+
 else
-{ return SQL_ERROR; }
-
-case SQL_DIAG_DYNAMIC_FUNCTION:
-if ( pHandleType == SQL_HANDLE_STMT ) {
-_SQLCopyWCharDataW ( diag, pDataPtr, pDataSize, pDataSizePtr, 
16, ( ( pODBCStmt ) pHandle )->Stmt,
- ( ( pODBCStmt ) pHandle )->StmtLen );
+{
+return SQL_ERROR;
+}
+
+case SQL_DIAG_DYNAMIC_FUNCTION :
+if ( pHandleType == SQL_HANDLE_STMT )
+{
+_SQLCopyWCharDataW ( diag, pDataPtr, pDataSize, pDataSizePtr, 
16, ( ( pODBCStmt ) pHandle ) -> Stmt,
+ ( ( pODBCStmt ) pHandle ) -> StmtLen );
 return SQL_SUCCESS;
 }
-
+
 else
-{ return 

[01/11] kylin git commit: KYLIN-1389 ODBC - Reformatting C++ Code

2016-02-01 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.x-staging 9b19b69f1 -> 3c2329dc1


http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/TestDLL/CompareQueryTests.cpp
--
diff --git a/odbc/TestDLL/CompareQueryTests.cpp 
b/odbc/TestDLL/CompareQueryTests.cpp
index c7788a2..87d6875 100644
--- a/odbc/TestDLL/CompareQueryTests.cpp
+++ b/odbc/TestDLL/CompareQueryTests.cpp
@@ -41,37 +41,39 @@
 }
 
 // -- structure ---
-typedef struct BindColInfo {
-SQLSMALLINT iColTitleSize;  // size of column title
-wchar_t*szColTitle; // column title
-SQLLEN  iColDisplaySize;// size to display
-void*   szColData;  // display buffer
-int iType;
-boolisSigned;
-SQLLEN  indPtr; // size or null indicator
-BOOLfChar;  // character col flag
-struct BindColInfo* next;   // linked list
+typedef struct BindColInfo
+{
+SQLSMALLINT iColTitleSize; // size of column title
+wchar_t* szColTitle; // column title
+SQLLEN iColDisplaySize; // size to display
+void* szColData; // display buffer
+int iType;
+bool isSigned;
+SQLLEN indPtr; // size or null indicator
+BOOL fChar; // character col flag
+struct BindColInfo* next; // linked list
 } BIND_COL_INFO;
 
 // -- function prototypes -
-voidShowDiagMessages ( SQLSMALLINT hType, SQLHANDLE hValue, SQLRETURN 
iStatus, char* szMsg );
+void ShowDiagMessages ( SQLSMALLINT hType, SQLHANDLE hValue, SQLRETURN 
iStatus, char* szMsg );
 
-SQLRETURN   CheckResults ( HSTMT hStmt , wchar_t* sql );
-voidFreeBindings ( BIND_COL_INFO* pBindColInfo );
+SQLRETURN CheckResults ( HSTMT hStmt, wchar_t* sql );
+void FreeBindings ( BIND_COL_INFO* pBindColInfo );
 
 int totalCount;
 int successCount;
 int failCount;
-std::vector failedQueries;
+std::vector  failedQueries;
 
-void validateOneQuery ( wchar_t* sql ) {
+void validateOneQuery ( wchar_t* sql )
+{
 Sleep ( 1000 );
-SQLRETURN   status;
-SQLHANDLE   hEnv = 0;
-SQLHANDLE   hConn = 0;
-SQLHANDLE   hStmt = 0;
+SQLRETURN status;
+SQLHANDLE hEnv = 0;
+SQLHANDLE hConn = 0;
+SQLHANDLE hStmt = 0;
 wchar_t szConnStrOut[1024];
-SQLSMALLINT x;
+SQLSMALLINT x;
 // show query to be executed
 wprintf ( L"The query being validated: %ls \n", sql );
 // BEFORE U CONNECT
@@ -80,27 +82,27 @@ void validateOneQuery ( wchar_t* sql ) {
 // check for error
 ODBC_CHK_ERROR ( SQL_HANDLE_ENV, hEnv, status, "" );
 // set the ODBC version for behaviour expected
-status = SQLSetEnvAttr ( hEnv,  SQL_ATTR_ODBC_VERSION, ( SQLPOINTER ) 
SQL_OV_ODBC3, 0 );
+status = SQLSetEnvAttr ( hEnv, SQL_ATTR_ODBC_VERSION, ( SQLPOINTER ) 
SQL_OV_ODBC3, 0 );
 // check for error
 ODBC_CHK_ERROR ( SQL_HANDLE_ENV, hEnv, status, "" );
 // allocate CONNECTION
 status = SQLAllocHandle ( SQL_HANDLE_DBC, hEnv,  );
 // check for error
 ODBC_CHK_ERROR ( SQL_HANDLE_ENV, hEnv, status, "" );
-#ifdef  _WIN64
+#ifdef _WIN64
 // --- real connection takes place at this point
 // --- option 1: user is prompted for DSN & options
 status = SQLDriverConnect ( hConn, GetDesktopWindow(),
 ( unsigned char* ) "",
 SQL_NTS, szConnStrOut, 1024, ,
 SQL_DRIVER_COMPLETE );
-#else
-status = SQLDriverConnectW ( hConn , GetDesktopWindow(),
+#else
+status = SQLDriverConnectW ( hConn, GetDesktopWindow (),
  //L"DSN=testDSN;",
  
L"DRIVER={KylinODBCDriver};PROJECT=default;UID=ADMIN;SERVER=http://localhost;PORT=80;;,
  SQL_NTS, szConnStrOut, 1024, ,
  SQL_DRIVER_COMPLETE );
-#endif
+#endif
 // check for error
 ODBC_CHK_ERROR ( SQL_HANDLE_DBC, hConn, status, "" );
 // CONGRATUALTIONS  u r connected to a DBMS via an ODBC driver
@@ -117,199 +119,245 @@ void validateOneQuery ( wchar_t* sql ) {
 // show the full results row by row
 status = CheckResults ( hStmt, sql );
 totalCount++;
-
-if ( status == SQL_ERROR ) {
-setPrintColorRED();
+
+if ( status == SQL_ERROR )
+{
+setPrintColorRED ();
 fputs ( "[FAIL]\n", stdout );
-resetPrintColor();
+resetPrintColor ();
 failCount++;
-failedQueries.push_back ( sql );
+failedQueries . push_back ( sql );
 }
-
-else if ( status == SQL_SUCCESS ) {
-setPrintColorGreen();
+
+else if ( status == SQL_SUCCESS )

[02/11] kylin git commit: KYLIN-1389 ODBC - Reformatting C++ Code

2016-02-01 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/Driver/KO_PARAM.CPP
--
diff --git a/odbc/Driver/KO_PARAM.CPP b/odbc/Driver/KO_PARAM.CPP
index 9bbe14c..e05efce 100644
--- a/odbc/Driver/KO_PARAM.CPP
+++ b/odbc/Driver/KO_PARAM.CPP
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 
 // 
 //
@@ -38,38 +38,38 @@
 #include "stdafx.h"
 
 
-
 // ---
 // to bind a buffer to a parameter marker in an SQL statement
 // ---
 
-RETCODE SQL_API SQLBindParameter ( SQLHSTMTpStmt,
-   SQLUSMALLINTpParamNum,
-   SQLSMALLINT pIOType,
-   SQLSMALLINT pValueType,
-   SQLSMALLINT pParamType,
-   SQLUINTEGER pColSize,
-   SQLSMALLINT pDecimalDigits,
-   SQLPOINTER  pParamValuePtr,
-   SQLINTEGER  pParamValueSize,
-   SQLINTEGER* pParamValueSizePtr ) {
+RETCODE SQL_API SQLBindParameter ( SQLHSTMT pStmt,
+   SQLUSMALLINT pParamNum,
+   SQLSMALLINT pIOType,
+   SQLSMALLINT pValueType,
+   SQLSMALLINT pParamType,
+   SQLUINTEGER pColSize,
+   SQLSMALLINT pDecimalDigits,
+   SQLPOINTER pParamValuePtr,
+   SQLINTEGER pParamValueSize,
+   SQLINTEGER* pParamValueSizePtr )
+{
 __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG, "SQLBindParameter called" ) );
 __ODBCPOPMSG ( _ODBCPopMsg ( "SQLBindParameter not implemented" ) );
 return SQL_ERROR;
 }
 
 
-
 // ---
 // to get param descriptions for a specified bound param
 // ---
 
-RETCODE SQL_API SQLDescribeParam ( SQLHSTMTpStmt,
-   SQLUSMALLINTpParamNum,
-   SQLSMALLINT*pDataTypePtr,
-   SQLUINTEGER*pParamSizePtr,
-   SQLSMALLINT*pDecimalDigitsPtr,
-   SQLSMALLINT*pNullablePtr ) {
+RETCODE SQL_API SQLDescribeParam ( SQLHSTMT pStmt,
+   SQLUSMALLINT pParamNum,
+   SQLSMALLINT* pDataTypePtr,
+   SQLUINTEGER* pParamSizePtr,
+   SQLSMALLINT* pDecimalDigitsPtr,
+   SQLSMALLINT* pNullablePtr )
+{
 __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG, "SQLDescribeParam called" ) );
 __ODBCPOPMSG ( _ODBCPopMsg ( "SQLDescribeParam not implemented" ) );
 return SQL_ERROR;
@@ -80,15 +80,18 @@ RETCODE SQL_API SQLDescribeParam ( SQLHSTMTpStmt,
 // to get the number of parameters in a statement
 // ---
 
-RETCODE SQL_API SQLNumParams ( SQLHSTMT pStmt, SQLSMALLINT* pParamCountPtr ) {
+RETCODE SQL_API SQLNumParams ( SQLHSTMT pStmt, SQLSMALLINT* pParamCountPtr )
+{
 // since the concept of parameters has not been implemented
 // this function returns zero in the number of params to
 // make sure that the calle does not proceed forward on this issue
 __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG, "SQLNumParams called" ) );
-
+
 if ( pParamCountPtr )
-{ *pParamCountPtr = 0; }
-
+{
+*pParamCountPtr = 0;
+}
+
 return SQL_SUCCESS;
 }
 
@@ -96,8 +99,10 @@ RETCODE SQL_API SQLNumParams ( SQLHSTMT pStmt, SQLSMALLINT* 
pParamCountPtr ) {
 // to be used wth SQLPutData to provide param data at execution time
 // ---
 
-RETCODE SQL_API SQLParamData ( SQLHSTMT pStmt, SQLPOINTER* pValuePtrPtr ) {
+RETCODE SQL_API SQLParamData ( SQLHSTMT pStmt, SQLPOINTER* pValuePtrPtr )
+{
 __ODBCLOG ( _ODBCLogMsg ( LogLevel_DEBUG, "SQLParamData called" ) );
 __ODBCPOPMSG ( _ODBCPopMsg ( "SQLParamData not implemented" ) );
 return SQL_ERROR;
 }
+

http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/Driver/KO_UTILS.CPP
--
diff --git a/odbc/Driver/KO_UTILS.CPP b/odbc/Driver/KO_UTILS.CPP
index 

[04/11] kylin git commit: KYLIN-1389 ODBC - Reformatting C++ Code

2016-02-01 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/Driver/KO_FETCH.CPP
--
diff --git a/odbc/Driver/KO_FETCH.CPP b/odbc/Driver/KO_FETCH.CPP
index 39f0915..880ed10 100644
--- a/odbc/Driver/KO_FETCH.CPP
+++ b/odbc/Driver/KO_FETCH.CPP
@@ -1,4 +1,4 @@
-/*
+/*
  * 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
@@ -15,7 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 
 // 
 //
@@ -87,14 +87,14 @@
 #include "Dump.h"
 
 // - local functions -
-RETCODE SQL_API _SQLFetch ( pODBCStmt pStmt, Word pFetchOrientation, Long 
pFetchOffset, ULong* pRowCountPtr,
-UWord* pRowStatusArray );
-RETCODE SQL_API _SQLColConvert ( pODBCStmt pStmt, void* pTgtDataPtr, Long* 
pTgtDataSizePtr, CStrPtr pSrcColData,
- pARDItem pARDCol , bool isSigned );
-RETCODE SQL_API _SQLFetchMoveNext ( pODBCStmt pStmt );
-RETCODE SQL_API _SQLResetRowPos ( pODBCStmt pStmt );
+RETCODE SQL_API _SQLFetch ( pODBCStmt pStmt, Word pFetchOrientation, Long 
pFetchOffset, ULong* pRowCountPtr,
+UWord* pRowStatusArray );
+RETCODE SQL_API _SQLColConvert ( pODBCStmt pStmt, void* pTgtDataPtr, Long* 
pTgtDataSizePtr, CStrPtr pSrcColData,
+ pARDItem pARDCol, bool isSigned );
+RETCODE SQL_API _SQLFetchMoveNext ( pODBCStmt pStmt );
+RETCODE SQL_API _SQLResetRowPos ( pODBCStmt pStmt );
 
-SQLRowContent* GetIfExist ( std::vector& container, int index 
);
+SQLRowContent* GetIfExist ( std::vector & container, int index 
);
 
 // ---
 // to get specific detail//attribute about a col returned from server --- FROM 
IRD
@@ -102,128 +102,141 @@ SQLRowContent* GetIfExist ( 
std::vector& container, int index );
 // ---
 
 
-RETCODE  _SQLColAttribute_basic ( SQLHSTMTpStmt,
-  SQLUSMALLINTpColNum,
-  SQLUSMALLINTpFldID,
-  SQLPOINTER  pDataPtr,
-  SQLSMALLINT pDataSize,
-  SQLSMALLINT*pDataSizePtr, // in bytes
-  SQLPOINTER  pNumValuePtr ,// integer
-  bool isANSI
-) { //if returned data is numeric, feed this
-Longn;
-SQLResponse*ird;
-pIRDItemcol;
+RETCODE _SQLColAttribute_basic ( SQLHSTMT pStmt,
+ SQLUSMALLINT pColNum,
+ SQLUSMALLINT pFldID,
+ SQLPOINTER pDataPtr,
+ SQLSMALLINT pDataSize,
+ SQLSMALLINT* pDataSizePtr, // in bytes
+ SQLPOINTER pNumValuePtr,// integer
+ bool isANSI
+)
+{ //if returned data is numeric, feed this
+Long n;
+SQLResponse* ird;
+pIRDItem col;
 __CHK_HANDLE ( pStmt, SQL_HANDLE_STMT, SQL_ERROR );
 // free diags
 _SQLFreeDiag ( _DIAGSTMT ( pStmt ) );
-
+
 // precaution
-if ( pColNum == 0 ) {
+if ( pColNum == 0 )
+{
 _SQLPutDiagRow ( SQL_HANDLE_STMT, pStmt, "SQLColAttribute", "01000", 
-1, "bad params" );
 return SQL_ERROR;
 }
-
+
 // get the row descriptor obtained with response
-ird = ( ( ( pODBCStmt ) pStmt )->IRD ).RowDesc.get();
-
+ird = ( ( ( pODBCStmt ) pStmt ) -> IRD ) . RowDesc . get ();
+
 // check
-if ( ird == NULL ) {
+if ( ird == NULL )
+{
 _SQLPutDiagRow ( SQL_HANDLE_STMT, pStmt, "SQLColAttribute", "01000", 
-1, "No resultset or no col descriptors" );
 return SQL_ERROR;
 }
-
+
 // find the xth element/col
-col = _SQLGetIRDItem ( & ( ( ( pODBCStmt ) pStmt )->IRD ), pColNum );
-
+col = _SQLGetIRDItem ( & ( ( ( pODBCStmt ) pStmt ) -> IRD ), pColNum );
+
 // check
-if ( col == NULL ) {
+if ( col == NULL )
+{
 _SQLPutDiagRow ( SQL_HANDLE_STMT, pStmt, "SQLColAttribute", "01000", 
-1, "Invalid col num" );
 return SQL_ERROR;
 }
-
+
 // get value from descriptor as per field type
-switch ( pFldID ) {
-// numeric types clubbed together
-case SQL_DESC_AUTO_UNIQUE_VALUE:// is col 
auto-incrementing
-case SQL_DESC_CASE_SENSITIVE:   // is col 

[06/11] kylin git commit: KYLIN-1389 ODBC - Reformatting C++ Code

2016-02-01 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/3c2329dc/odbc/Driver/KO_DESC.CPP
--
diff --git a/odbc/Driver/KO_DESC.CPP b/odbc/Driver/KO_DESC.CPP
index b72deab..7aa6ed0 100644
--- a/odbc/Driver/KO_DESC.CPP
+++ b/odbc/Driver/KO_DESC.CPP
@@ -1,4 +1,4 @@
-/*
+/*
  * 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
@@ -15,8 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- 
+
 
 // 
 //
@@ -60,119 +59,123 @@
 
 
 //  local functions ---
-pAPDItem _SQLGetAPDItem ( const pODBCAPD pDesc, Word pRecNum );
-pIPDItem _SQLGetIPDItem ( const pODBCIPD pDesc, Word pRecNum );
-pARDItem _SQLGetARDItem ( const pODBCARD pDesc, Word pRecNum );
-pIRDItem _SQLGetIRDItem ( const pODBCIRD pDesc, Word pRecNum );
-
-eGoodBad_SQLSetAPDFieldsDefault ( pODBCAPD pDesc, const pODBCStmt 
pStmt );
-eGoodBad_SQLSetAPDItemFieldsDefault ( pAPDItem pDescItem );
-
-eGoodBad_SQLSetIPDFieldsDefault ( pODBCIPD pDesc, const pODBCStmt 
pStmt );
-eGoodBad_SQLSetIPDItemFieldsDefault ( pIPDItem pDescItem );
-
-eGoodBad_SQLSetARDFieldsDefault ( pODBCARD pDesc, const pODBCStmt 
pStmt );
-eGoodBad_SQLSetARDItemFieldsDefault ( pARDItem pDescItem, Word 
pRecNum );
-
-eGoodBad_SQLSetIRDFieldsDefault ( pODBCIRD pDesc, const pODBCStmt 
pStmt );
-eGoodBad_SQLSetIRDItemFieldsDefault ( pIRDItem pDescItem );
-
-RETCODE SQL_API _SQLSetAPDField ( pODBCAPD pDesc, Word pFldID, const void* 
pDataPtr, Long pDataSize );
-RETCODE SQL_API _SQLSetAPDItemField ( pODBCAPD pDesc, pAPDItem pDescItem, 
Word pRecNum, Word pFldID,
-  const void* pDataPtr, Long pDataSize 
);
-RETCODE SQL_API _SQLGetAPDField ( const pODBCAPD pDesc, Word pFldID, void* 
pDataPtr, Long pDataSize,
-  Long* pDataSizePtr );
-RETCODE SQL_API _SQLGetAPDItemField ( const pODBCAPD pDesc, const pAPDItem 
pDescItem, Word pRecNum,
-  Word pFldID, void* pDataPtr, Long 
pDataSize, Long* pDataSizePtr );
-
-RETCODE SQL_API _SQLSetIPDField ( pODBCIPD pDesc, Word pFldID, const void* 
pDataPtr, Long pDataSize );
-RETCODE SQL_API _SQLSetIPDItemField ( pODBCIPD pDesc, pIPDItem pDescItem, 
Word pRecNum, Word pFldID,
-  const void* pDataPtr, Long pDataSize 
);
-RETCODE SQL_API _SQLGetIPDField ( const pODBCIPD pDesc, Word pFldID, void* 
pDataPtr, Long pDataSize,
-  Long* pDataSizePtr );
-RETCODE SQL_API _SQLGetIPDItemField ( const pODBCIPD pDesc, const pIPDItem 
pDescItem, Word pRecNum,
-  Word pFldID, void* pDataPtr, Long 
pDataSize, Long* pDataSizePtr );
-
-RETCODE SQL_API _SQLSetARDField ( pODBCARD pDesc, Word pFldID, const void* 
pDataPtr, Long pDataSize );
-RETCODE SQL_API _SQLSetARDItemField ( pODBCARD pDesc, pARDItem pDescItem, 
Word pRecNum, Word pFldID,
-  const void* pDataPtr, Long pDataSize 
);
-RETCODE SQL_API _SQLGetARDField ( const pODBCARD pDesc, Word pFldID, void* 
pDataPtr, Long pDataSize,
-  Long* pDataSizePtr );
-RETCODE SQL_API _SQLGetARDItemField ( const pODBCARD pDesc, const pARDItem 
pDescItem, Word pRecNum,
-  Word pFldID, void* pDataPtr, Long 
pDataSize, Long* pDataSizePtr );
-
-RETCODE SQL_API _SQLSetIRDField ( pODBCIRD pDesc, Word pFldID, const void* 
pDataPtr, Long pDataSize );
-RETCODE SQL_API _SQLSetIRDItemField ( pODBCIRD pDesc, pIRDItem pDescItem, 
Word pRecNum, Word pFldID,
-  const void* pDataPtr, Long pDataSize 
);
-RETCODE SQL_API _SQLGetIRDField ( const pODBCIRD pDesc, Word pFldID, void* 
pDataPtr, Long pDataSize,
-  Long* pDataSizePtr );
-RETCODE SQL_API _SQLGetIRDItemField ( const pODBCIRD pDesc, const pIRDItem 
pDescItem, Word pRecNum,
-  Word pFldID, void* pDataPtr, Long 
pDataSize, Long* pDataSizePtr , bool isANSI );
-
-RETCODE SQL_API _SQLFreeAPDContent ( const pODBCAPD pDesc );
-RETCODE SQL_API _SQLFreeIPDContent ( const pODBCIPD pDesc );
-RETCODE SQL_API _SQLFreeARDContent ( const pODBCARD pDesc );
-RETCODE SQL_API _SQLFreeIRDContent ( const pODBCIRD pDesc );
-
-eGoodBad_SQLAttachARDItem ( pODBCARD pDesc, pARDItem pDescItem );
-eGoodBad_SQLDetachARDItem ( pODBCARD pDesc, pARDItem pDescItem );
+pAPDItem 

kylin git commit: minor, update documents on jekyll installation

2016-02-01 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/1.x-staging 555a2e566 -> b507b44f2


minor, update documents on jekyll installation


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

Branch: refs/heads/1.x-staging
Commit: b507b44f25b3887489f31bfd81da26617fafbb51
Parents: 555a2e5
Author: dongli 
Authored: Mon Feb 1 22:13:00 2016 +0800
Committer: dongli 
Committed: Mon Feb 1 22:13:00 2016 +0800

--
 website/_dev/howto_docs.md | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/b507b44f/website/_dev/howto_docs.md
--
diff --git a/website/_dev/howto_docs.md b/website/_dev/howto_docs.md
index 3eca761..4850750 100644
--- a/website/_dev/howto_docs.md
+++ b/website/_dev/howto_docs.md
@@ -17,6 +17,7 @@ Install following tools before you add or edit documentation:
 2. Then, install [Jekyll](http://jekyllrb.com), and required plugins
* `gem install jekyll jekyll-multiple-languages kramdown rouge`  
* __Note__: Some specific version of jekyll and 
jekyll-multiple-languages does not work together (I got a "undefined method" 
error with jekyll 3.0.1 and jekyll-multiple-languages 2.0.3). In that case, 
`jekyll 2.5.3` and `jekyll-multiple-languages 1.0.8` is the known working 
version.
+* eg. Use `gem install jekyll --version "=2.5.3"` to install a 
specific version.

 3. And optionally any markdown editor you prefer
 



[2/3] kylin git commit: KYLIN-1286 Add missing license header

2016-02-01 Thread lidong
http://git-wip-us.apache.org/repos/asf/kylin/blob/cf2aebe4/core-metadata/src/main/java/org/apache/kylin/metadata/realization/StreamSQLDigest.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/StreamSQLDigest.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/StreamSQLDigest.java
index 1420470..1f4ef16 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/realization/StreamSQLDigest.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/realization/StreamSQLDigest.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.kylin.metadata.realization;
 
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/kylin/blob/cf2aebe4/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/CompoundTupleIterator.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/CompoundTupleIterator.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/CompoundTupleIterator.java
index 02af3ca..fdbd25d 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/CompoundTupleIterator.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/CompoundTupleIterator.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.kylin.metadata.tuple;
 
 import java.util.Iterator;

http://git-wip-us.apache.org/repos/asf/kylin/blob/cf2aebe4/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/IEvaluatableTuple.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/IEvaluatableTuple.java
 
b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/IEvaluatableTuple.java
index d5a5061..b29de7f 100644
--- 
a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/IEvaluatableTuple.java
+++ 
b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/IEvaluatableTuple.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.kylin.metadata.tuple;
 
 import org.apache.kylin.metadata.model.TblColRef;

http://git-wip-us.apache.org/repos/asf/kylin/blob/cf2aebe4/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/SimpleTupleIterator.java
--
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/SimpleTupleIterator.java
 

[3/3] kylin git commit: KYLIN-1286 Add missing license header

2016-02-01 Thread lidong
KYLIN-1286 Add missing license header


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

Branch: refs/heads/2.0-rc
Commit: cf2aebe45594a8cbd7ecdcb2fbcf239218c1311e
Parents: d3250ac
Author: lidongsjtu 
Authored: Tue Feb 2 14:17:07 2016 +0800
Committer: lidongsjtu 
Committed: Tue Feb 2 14:17:07 2016 +0800

--
 .../kylin/job/hadoop/invertedindex/IITest.java| 18 ++
 .../kylin/job/streaming/KafkaDataLoader.java  | 18 ++
 .../streaming/StreamingTableDataGenerator.java| 18 ++
 .../kylin/common/persistence/RawResource.java | 18 ++
 .../apache/kylin/common/util/Log4jConfigurer.java | 18 ++
 .../org/apache/kylin/common/util/RangeUtil.java   | 18 ++
 .../org/apache/kylin/common/util/SortUtil.java| 18 ++
 .../kylin/common/util/StreamingMessage.java   | 18 ++
 .../org/apache/kylin/common/util/TimeUtil.java| 18 ++
 .../kylin/common/util/ITMockHTableTest.java   | 18 ++
 .../kylin/common/util/IdentityUtilTest.java   | 18 ++
 .../org/apache/kylin/common/util/RangeTest.java   | 18 ++
 .../apache/kylin/common/util/RangeUtilTest.java   | 18 ++
 .../apache/kylin/common/util/TimeUtilTest.java| 18 ++
 .../kylin/cube/gridtable/CubeCodeSystem.java  | 18 ++
 .../kylin/cube/gridtable/CubeGridTable.java   | 18 ++
 .../cube/gridtable/CuboidToGridTableMapping.java  | 18 ++
 .../kylin/cube/inmemcubing/CuboidResult.java  | 18 ++
 .../kylin/cube/model/CubeJoinedFlatTableDesc.java | 18 ++
 .../kylin/gridtable/DefaultGTComparator.java  | 18 ++
 .../kylin/gridtable/GTAggregateScanner.java   | 18 ++
 .../org/apache/kylin/gridtable/GTBuilder.java | 18 ++
 .../apache/kylin/gridtable/GTFilterScanner.java   | 18 ++
 .../java/org/apache/kylin/gridtable/GTInfo.java   | 18 ++
 .../apache/kylin/gridtable/GTInvertedIndex.java   | 18 ++
 .../kylin/gridtable/GTInvertedIndexOfColumn.java  | 18 ++
 .../java/org/apache/kylin/gridtable/GTRecord.java | 18 ++
 .../org/apache/kylin/gridtable/GTRowBlock.java| 18 ++
 .../kylin/gridtable/GTSampleCodeSystem.java   | 18 ++
 .../org/apache/kylin/gridtable/GTScanRange.java   | 18 ++
 .../kylin/gridtable/GTScanRangePlanner.java   | 18 ++
 .../org/apache/kylin/gridtable/GTScanRequest.java | 18 ++
 .../java/org/apache/kylin/gridtable/GTUtil.java   | 18 ++
 .../org/apache/kylin/gridtable/GridTable.java | 18 ++
 .../org/apache/kylin/gridtable/IGTCodeSystem.java | 18 ++
 .../org/apache/kylin/gridtable/IGTComparator.java | 18 ++
 .../org/apache/kylin/gridtable/IGTScanner.java| 18 ++
 .../java/org/apache/kylin/gridtable/IGTStore.java | 18 ++
 .../org/apache/kylin/gridtable/IGTWriter.java | 18 ++
 .../gridtable/memstore/GTSimpleMemStore.java  | 18 ++
 .../org/apache/kylin/dict/DictCodeSystem.java | 18 ++
 .../apache/kylin/dict/DictionarySerializer.java   | 18 ++
 .../kylin/dict/DistinctColumnValuesProvider.java  | 18 ++
 .../org/apache/kylin/dict/TimeStrDictionary.java  | 18 ++
 .../org/apache/kylin/dict/lookup/SnapshotCLI.java | 18 ++
 .../apache/kylin/dict/TimeStrDictionaryTests.java | 18 ++
 .../kylin/engine/IStreamingCubingEngine.java  | 18 ++
 .../java/org/apache/kylin/job/lock/JobLock.java   | 18 ++
 .../org/apache/kylin/job/lock/MockJobLock.java| 18 ++
 .../org/apache/kylin/job/BasicLocalMetaTest.java  | 18 ++
 .../measure/serializer/DateTimeSerializer.java| 18 ++
 .../measure/serializer/StringSerializer.java  | 18 ++
 .../metadata/realization/IRealizationSegment.java | 18 ++
 .../kylin/metadata/realization/SQLDigestUtil.java | 18 ++
 .../metadata/realization/StreamSQLDigest.java | 18 ++
 .../metadata/tuple/CompoundTupleIterator.java | 18 ++
 .../kylin/metadata/tuple/IEvaluatableTuple.java   | 18 ++
 .../kylin/metadata/tuple/SimpleTupleIterator.java | 18 ++
 

[1/3] kylin git commit: KYLIN-1286 Add missing license header

2016-02-01 Thread lidong
Repository: kylin
Updated Branches:
  refs/heads/2.0-rc d3250acf3 -> cf2aebe45


http://git-wip-us.apache.org/repos/asf/kylin/blob/cf2aebe4/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java
index 61bea36..06dc36b 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java
@@ -1,3 +1,21 @@
+/*
+ * 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.storage.hbase.steps;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/kylin/blob/cf2aebe4/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMRSteps.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMRSteps.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMRSteps.java
index c3bd7b5..1ab14b4 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMRSteps.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HBaseMRSteps.java
@@ -1,3 +1,21 @@
+/*
+ * 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.storage.hbase.steps;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/kylin/blob/cf2aebe4/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/KeyValueCreator.java
--
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/KeyValueCreator.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/KeyValueCreator.java
index e56e2ea..16bb3c5 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/KeyValueCreator.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/KeyValueCreator.java
@@ -1,3 +1,21 @@
+/*
+ * 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.storage.hbase.steps;
 
 import java.nio.ByteBuffer;

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

[2/4] kylin git commit: KYLIN-1445 Check HIVE_CONF directory before startup Kylin instance

2016-02-25 Thread lidong
KYLIN-1445 Check HIVE_CONF directory before startup Kylin instance


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

Branch: refs/heads/1.x-staging
Commit: 513ec2d32e029aa05cb00cc2f79ecf9673cf6c1e
Parents: f4bd22a
Author: lidongsjtu 
Authored: Wed Feb 24 15:42:52 2016 +0800
Committer: lidongsjtu 
Committed: Thu Feb 25 13:53:21 2016 +0800

--
 bin/find-hive-dependency.sh | 24 +---
 1 file changed, 21 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/513ec2d3/bin/find-hive-dependency.sh
--
diff --git a/bin/find-hive-dependency.sh b/bin/find-hive-dependency.sh
index 7e434ba..add7d23 100755
--- a/bin/find-hive-dependency.sh
+++ b/bin/find-hive-dependency.sh
@@ -33,6 +33,13 @@ hive_classpath=`echo $hive_env | grep 'env:CLASSPATH' | awk 
-F '=' '{print $2}'`
 arr=(`echo $hive_classpath | cut -d ":"  --output-delimiter=" " -f 1-`)
 hive_conf_path=
 hive_exec_path=
+
+if [ -n "$HIVE_CONF" ]
+then
+echo "HIVE_CONF is set to: $HIVE_CONF, use it to locate hive 
configurations."
+hive_conf_path=$HIVE_CONF
+fi
+
 for data in ${arr[@]}
 do
 result=`echo $data | grep -e 'hive-exec[a-z0-9A-Z\.-]*jar'`
@@ -40,13 +47,24 @@ do
 then
 hive_exec_path=$data
 fi
-result=`echo $data | grep -e 'hive[^/]*/conf'`
-if [ $result ]
+
+# in some versions of hive config is not in hive's classpath, find it 
separately
+if [ -z "$hive_conf_path" ]
 then
-hive_conf_path=$data
+result=`echo $data | grep -e 'hive[^/]*/conf'`
+if [ $result ]
+then
+hive_conf_path=$data
+fi
 fi
 done
 
+if [ -z "$hive_conf_path" ]
+then
+echo "Couldn't find hive configuration directory. Please set HIVE_CONF to 
the path which contains hive-site.xml."
+exit 1
+fi
+
 # in some versions of hive hcatalog is not in hive's classpath, find it 
separately
 if [ -z "$HCAT_HOME" ]
 then



[4/4] kylin git commit: KYLIN-1054 Fix some test issues

2016-02-25 Thread lidong
KYLIN-1054 Fix some test issues


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

Branch: refs/heads/1.x-staging
Commit: e72a6b6b311510eb6d42625b7c9abdbe506e1227
Parents: 1dad1ed
Author: lidongsjtu 
Authored: Thu Feb 25 13:52:12 2016 +0800
Committer: lidongsjtu 
Committed: Thu Feb 25 16:43:36 2016 +0800

--
 conf/kylin.properties|  4 
 examples/test_case_data/sandbox/kylin.properties |  3 +--
 .../java/org/apache/kylin/job/common/HiveCmdBuilder.java | 11 ++-
 .../java/org/apache/kylin/job/HiveCmdBuilderTest.java|  2 ++
 4 files changed, 13 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/e72a6b6b/conf/kylin.properties
--
diff --git a/conf/kylin.properties b/conf/kylin.properties
index 07af97b..e0727ed 100644
--- a/conf/kylin.properties
+++ b/conf/kylin.properties
@@ -70,10 +70,6 @@ kylin.job.status.with.kerberos=false
 # Hive database name for putting the intermediate flat tables
 kylin.job.hive.database.for.intermediatetable=default
 
-# Hive client modes: cli or beeline, cli by default
-kylin.hive.client=
-kylin.hive.beeline.params=
-
 #default compression codec for htable,snappy,lzo,gzip,lz4
 kylin.hbase.default.compression.codec=snappy
 

http://git-wip-us.apache.org/repos/asf/kylin/blob/e72a6b6b/examples/test_case_data/sandbox/kylin.properties
--
diff --git a/examples/test_case_data/sandbox/kylin.properties 
b/examples/test_case_data/sandbox/kylin.properties
index 1901a64..be1e272 100644
--- a/examples/test_case_data/sandbox/kylin.properties
+++ b/examples/test_case_data/sandbox/kylin.properties
@@ -60,8 +60,7 @@ kylin.job.yarn.app.rest.check.interval.seconds=10
 kylin.job.hive.database.for.intermediatetable=default
 
 # Hive client modes: cli or beeline, cli by default
-kylin.hive.client=
-kylin.hive.beeline.params=-u 'jdbc:hive2://localhost:1'
+kylin.hive.beeline.params=--hiveconf 
hive.security.authorization.sqlstd.confwhitelist.append='mapreduce.job.*|dfs.*' 
-u 'jdbc:hive2://localhost:1'
 
 #default compression codec for htable,snappy,lzo,gzip,lz4
 kylin.hbase.default.compression.codec=gzip

http://git-wip-us.apache.org/repos/asf/kylin/blob/e72a6b6b/job/src/main/java/org/apache/kylin/job/common/HiveCmdBuilder.java
--
diff --git a/job/src/main/java/org/apache/kylin/job/common/HiveCmdBuilder.java 
b/job/src/main/java/org/apache/kylin/job/common/HiveCmdBuilder.java
index abfd5e3..db345c8 100644
--- a/job/src/main/java/org/apache/kylin/job/common/HiveCmdBuilder.java
+++ b/job/src/main/java/org/apache/kylin/job/common/HiveCmdBuilder.java
@@ -26,6 +26,8 @@ import java.util.ArrayList;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.kylin.common.KylinConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Lists;
 
@@ -33,6 +35,8 @@ import com.google.common.collect.Lists;
  * Created by dongli on 2/21/16.
  */
 public class HiveCmdBuilder {
+private static final Logger logger = 
LoggerFactory.getLogger(HiveCmdBuilder.class);
+
 public enum HiveClientMode {
 CLI, BEELINE
 }
@@ -60,11 +64,14 @@ public class HiveCmdBuilder {
 case BEELINE:
 BufferedWriter bw = null;
 try {
-File tmpHql = File.createTempFile("beeline", ".hql");
+File tmpHql = File.createTempFile("beeline_", ".hql");
+StringBuffer hqlBuf = new StringBuffer();
 bw = new BufferedWriter(new FileWriter(tmpHql));
 for (String statement : statements) {
 bw.write(statement);
 bw.newLine();
+
+hqlBuf.append(statement).append("\n");
 }
 buf.append("beeline ");
 buf.append(kylinConfig.getHiveBeelineParams());
@@ -72,6 +79,8 @@ public class HiveCmdBuilder {
 buf.append(tmpHql.getAbsolutePath());
 buf.append(";rm -f ");
 buf.append(tmpHql.getAbsolutePath());
+
+logger.info("The statements to execute in beeline: \n" + 
hqlBuf);
 } catch (IOException e) {
 throw new RuntimeException(e);
 } finally {

http://git-wip-us.apache.org/repos/asf/kylin/blob/e72a6b6b/job/src/test/java/org/apache/kylin/job/HiveCmdBuilderTest.java

  1   2   3   4   5   6   7   8   9   10   >