kylin git commit: KYLIN-2689 Only dimension columns can join when create a model

2017-06-27 Thread chen
Repository: kylin
Updated Branches:
  refs/heads/master 3f3cb39e1 -> 2bc90f933


KYLIN-2689 Only dimension columns can join when create a model


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

Branch: refs/heads/master
Commit: 2bc90f9331bcdc2e64b43cb5025640f95ec4efe1
Parents: 3f3cb39
Author: luguosheng1314 <550175...@qq.com>
Authored: Wed Jun 28 00:56:39 2017 +0800
Committer: chenzhx <346839...@qq.com>
Committed: Wed Jun 28 09:10:33 2017 +0800

--
 webapp/app/js/controllers/modelMeasures.js  | 33 +++-
 webapp/app/js/filters/filter.js | 17 ++
 .../partials/modelDesigner/model_measures.html  |  2 +-
 3 files changed, 37 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/2bc90f93/webapp/app/js/controllers/modelMeasures.js
--
diff --git a/webapp/app/js/controllers/modelMeasures.js 
b/webapp/app/js/controllers/modelMeasures.js
index 342f341..5a3ac61 100644
--- a/webapp/app/js/controllers/modelMeasures.js
+++ b/webapp/app/js/controllers/modelMeasures.js
@@ -22,7 +22,7 @@
 
 'use strict';
 
-KylinApp.controller('ModelMeasuresCtrl', function ($scope, 
$modal,MetaModel,modelsManager,VdmUtil) {
+KylinApp.controller('ModelMeasuresCtrl', function ($scope, 
$modal,MetaModel,modelsManager,VdmUtil,$filter) {
 $scope.modelsManager = modelsManager;
 $scope.availableFactTables = [];
 $scope.selectedFactTables = {};
@@ -33,20 +33,25 @@ KylinApp.controller('ModelMeasuresCtrl', function ($scope, 
$modal,MetaModel,mode
   $scope.availableFactTables.push(joinTable[j].alias);
 }
 }
+$scope.changeColumns = function (table){
+  angular.forEach($scope.selectedFactTables[table],function(column){
+if($scope.modelsManager.selectedModel.metrics.indexOf(column)==-1){
+  $scope.modelsManager.selectedModel.metrics.push(column);
+}
+  });
+  
angular.forEach($scope.modelsManager.selectedModel.metrics,function(metric){
+
if($scope.selectedFactTables[VdmUtil.getNameSpaceAliasName(metric)].indexOf(metric)==-1){
+  
$scope.modelsManager.selectedModel.metrics.splice($scope.modelsManager.selectedModel.metrics.indexOf(metric),1);
+}
+  });
+}
 
angular.forEach($scope.modelsManager.selectedModel.metrics,function(metric){
-   
$scope.selectedFactTables[VdmUtil.getNameSpaceAliasName(metric)]=$scope.selectedFactTables[VdmUtil.getNameSpaceAliasName(metric)]||[];
-   
$scope.selectedFactTables[VdmUtil.getNameSpaceAliasName(metric)].push(metric);
+   var aliasName = VdmUtil.getNameSpaceAliasName(metric)
+   
$scope.selectedFactTables[aliasName]=$scope.selectedFactTables[aliasName]||[];
+   $scope.selectedFactTables[aliasName].push(metric);
 });
-$scope.changeColumns = function (table){
-   angular.forEach($scope.selectedFactTables[table],function(column){
-  if($scope.modelsManager.selectedModel.metrics.indexOf(column)==-1){
- $scope.modelsManager.selectedModel.metrics.push(column);
-  }
-   });
-   
angular.forEach($scope.modelsManager.selectedModel.metrics,function(metric){
-  
if($scope.selectedFactTables[VdmUtil.getNameSpaceAliasName(metric)].indexOf(metric)==-1){
-
$scope.modelsManager.selectedModel.metrics.splice($scope.modelsManager.selectedModel.metrics.indexOf(metric),1);
-  }
-   });
+for (var i in $scope.selectedFactTables) {
+  $scope.selectedFactTables[i] = 
$filter('notInJoin')($scope.selectedFactTables[i], i, 
$scope.modelsManager.selectedModel.lookups)
+  $scope.changeColumns(i)
 }
 });

http://git-wip-us.apache.org/repos/asf/kylin/blob/2bc90f93/webapp/app/js/filters/filter.js
--
diff --git a/webapp/app/js/filters/filter.js b/webapp/app/js/filters/filter.js
index 78f6cf9..8b6cffa 100755
--- a/webapp/app/js/filters/filter.js
+++ b/webapp/app/js/filters/filter.js
@@ -204,6 +204,23 @@ KylinApp
   });
   return out;
 }
+  }).filter('notInJoin', function ($filter) {
+return function (inputArr, table, arr) {
+  var out=[];
+  angular.forEach(inputArr, function (inputItem) {
+var isInJoin = false
+ angular.forEach(arr,function(item) {
+var checkColumn = inputItem.name ? table + '.' + inputItem.name : 
inputItem;
+if (item.join.foreign_key.indexOf(checkColumn) !== -1 || 
item.join.primary_key.indexOf(checkColumn) !== -1) {
+  isInJoin = true;
+}
+  });
+ if (!isInJoin) {

kylin git commit: KYLIN-1668

2017-06-27 Thread chen
Repository: kylin
Updated Branches:
  refs/heads/master a9b0b6ed3 -> 3f3cb39e1


KYLIN-1668


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

Branch: refs/heads/master
Commit: 3f3cb39e1cfa56231d9a6ede5c8becd5a0c6c6af
Parents: a9b0b6e
Author: luguosheng 
Authored: Tue Jun 27 21:37:12 2017 +0800
Committer: chenzhx <346839...@qq.com>
Committed: Tue Jun 27 21:46:30 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/3f3cb39e/webapp/app/partials/cubeDesigner/advanced_settings.html
--
diff --git a/webapp/app/partials/cubeDesigner/advanced_settings.html 
b/webapp/app/partials/cubeDesigner/advanced_settings.html
index ffa7589..f0c3bcd 100755
--- a/webapp/app/partials/cubeDesigner/advanced_settings.html
+++ b/webapp/app/partials/cubeDesigner/advanced_settings.html
@@ -221,7 +221,7 @@
 
   
   
 



kylin git commit: KYLIN-2592 Fix serialization issue for distinct count in Spark cubing 2

2017-06-27 Thread shaofengshi
Repository: kylin
Updated Branches:
  refs/heads/master 2b07f2915 -> a9b0b6ed3


KYLIN-2592 Fix serialization issue for distinct count in Spark cubing 2

Signed-off-by: shaofengshi 


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

Branch: refs/heads/master
Commit: a9b0b6ed3de04dbc2395e44dd6f7241c466a3d8b
Parents: 2b07f29
Author: kangkaisen 
Authored: Mon Jun 26 22:08:57 2017 +0800
Committer: shaofengshi 
Committed: Tue Jun 27 19:17:59 2017 +0800

--
 .../java/org/apache/kylin/engine/spark/KylinKryoRegistrator.java| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/a9b0b6ed/engine-spark/src/main/java/org/apache/kylin/engine/spark/KylinKryoRegistrator.java
--
diff --git 
a/engine-spark/src/main/java/org/apache/kylin/engine/spark/KylinKryoRegistrator.java
 
b/engine-spark/src/main/java/org/apache/kylin/engine/spark/KylinKryoRegistrator.java
index 6011ab2..106653f 100644
--- 
a/engine-spark/src/main/java/org/apache/kylin/engine/spark/KylinKryoRegistrator.java
+++ 
b/engine-spark/src/main/java/org/apache/kylin/engine/spark/KylinKryoRegistrator.java
@@ -96,6 +96,7 @@ public class KylinKryoRegistrator implements KryoRegistrator {
 
 addClassQuitely(kyroClasses, 
"com.google.common.collect.EmptyImmutableList");
 addClassQuitely(kyroClasses, "java.nio.HeapShortBuffer");
+addClassQuitely(kyroClasses, "java.nio.HeapLongBuffer");
 addClassQuitely(kyroClasses, 
"scala.collection.immutable.Map$EmptyMap$");
 addClassQuitely(kyroClasses, 
"org.apache.spark.sql.catalyst.expressions.GenericInternalRow");
 addClassQuitely(kyroClasses, 
"org.apache.spark.unsafe.types.UTF8String");



svn commit: r1800042 - in /kylin/site: cn/docs20/install/manual_install_guide.html docs20/howto/howto_update_coprocessor.html docs20/install/hadoop_env.html docs20/tutorial/cube_spark.html feed.xml

2017-06-27 Thread lidong
Author: lidong
Date: Tue Jun 27 09:36:42 2017
New Revision: 1800042

URL: http://svn.apache.org/viewvc?rev=1800042=rev
Log:
Misc updates on v2.0 documentation

Modified:
kylin/site/cn/docs20/install/manual_install_guide.html
kylin/site/docs20/howto/howto_update_coprocessor.html
kylin/site/docs20/install/hadoop_env.html
kylin/site/docs20/tutorial/cube_spark.html
kylin/site/feed.xml

Modified: kylin/site/cn/docs20/install/manual_install_guide.html
URL: 
http://svn.apache.org/viewvc/kylin/site/cn/docs20/install/manual_install_guide.html?rev=1800042=1800041=1800042=diff
==
--- kylin/site/cn/docs20/install/manual_install_guide.html (original)
+++ kylin/site/cn/docs20/install/manual_install_guide.html Tue Jun 27 09:36:42 
2017
@@ -1286,37 +1286,18 @@
 
 前提条件
 
-  已安装Tomcat,输出到CATALINA_HOME(with CATALINA_HOME 
exported).
-  Kylin 
二进制文件拷贝至本地并解压,之后使用$KYLIN_HOME引用
+  Kylin 
二进制文件拷贝至本地并解压,之后使用$KYLIN_HOME引用
+export KYLIN_HOME=/path/to/kylin
+cd $KYLIN_HOME
 
 
-步骤
-
-准备Jars
-
-Kylin会需要使用两个jar包,两个jar包和é…
ç½®åœ¨é»˜è®¤kylin.properties:(there two jars and configured in the default 
kylin.properties)
-
-kylin.job.jar=/tmp/kylin/kylin-job-latest.jar
-
-
-
-
-这是Kylin用于MR jobs的job jar包。你需要复制 
$KYLIN_HOME/job/target/kylin-job-latest.jar 到 /tmp/kylin/
-
-kylin.coprocessor.local.jar=/tmp/kylin/kylin-coprocessor-latest.jar
-
-
-
-
-这是一个Kylin会放在hbase上的hbase协处理jar包
。它用于提高性能。你需要复制 
$KYLIN_HOME/storage/target/kylin-coprocessor-latest.jar 到 /tmp/kylin/
-
 启动Kylin
 
-以./kylin.sh start
+以./bin/kylin.sh start
 
 启动Kylin
 
-并以./Kylin.sh stop
+并以./bin/Kylin.sh stop
 
 停止Kylin
 

Modified: kylin/site/docs20/howto/howto_update_coprocessor.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs20/howto/howto_update_coprocessor.html?rev=1800042=1800041=1800042=diff
==
--- kylin/site/docs20/howto/howto_update_coprocessor.html (original)
+++ kylin/site/docs20/howto/howto_update_coprocessor.html Tue Jun 27 09:36:42 
2017
@@ -2704,7 +2704,7 @@
 
 There’s a CLI tool to update HBase Coprocessor:
 
-$KYLIN_HOME/bin/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 default 
all
 
 


Modified: kylin/site/docs20/install/hadoop_env.html
URL: 
http://svn.apache.org/viewvc/kylin/site/docs20/install/hadoop_env.html?rev=1800042=1800041=1800042=diff
==
--- kylin/site/docs20/install/hadoop_env.html (original)
+++ kylin/site/docs20/install/hadoop_env.html Tue Jun 27 09:36:42 2017
@@ -2700,7 +2700,7 @@


 
-   Kylin need run in a 
Hadoop node, to get better stability, we suggest you to deploy it a pure Hadoop 
client machine, on which it the command lines like hive, hbase, hadoop, hdfs already be installed and configured. The 
Linux account that running Kylin has got permission to the Hadoop cluster, 
including create/write hdfs, hive tables, hbase tables and submit MR jobs.
+   Kylin need run in a 
Hadoop node, to get better stability, we suggest you to deploy it a pure Hadoop 
client machine, on which  the command lines like hive, hbase, hadoop, hdfs already be installed and configured. The 
Linux account that running Kylin has got permission to the Hadoop cluster, 
including create/write hdfs, hive tables, hbase tables and submit MR jobs.
 
 Recommended Hadoop Versions
 
@@ -2729,14 +2729,6 @@ ambari-server start
 
 With both command successfully run you can go to ambari homepage at http://your_sandbox_ip:8080;>http://your_sandbox_ip:8080 
(user:admin,password:admin) to check everything’s status. By default 
hortonworks ambari disables Hbase, you need manually start the Hbase service at ambari homepage.
 
-https://raw.githubusercontent.com/KylinOLAP/kylinolap.github.io/master/docs/installation/starthbase.png;
 alt="start hbase in ambari" />
-
-Additonal Info for setting up Hortonworks Sandbox on Virtual 
Box
-
-Please make sure 
Hbase Master port [Default 6] and Zookeeper [Default 2181] is forwarded to 
Host OS.
-
-
-
 



Modified: kylin/site/docs20/tutorial/cube_spark.html
URL: 

kylin git commit: Misc updates on v2.0 documentation

2017-06-27 Thread shaofengshi
Repository: kylin
Updated Branches:
  refs/heads/document 254cc9e4d -> 4c1c736eb


Misc updates on v2.0 documentation


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

Branch: refs/heads/document
Commit: 4c1c736ebb435502a094202491e1c2785e9316e9
Parents: 254cc9e
Author: shaofengshi 
Authored: Tue Jun 27 17:33:15 2017 +0800
Committer: shaofengshi 
Committed: Tue Jun 27 17:33:15 2017 +0800

--
 .../_docs20/howto/howto_update_coprocessor.md   |  2 +-
 website/_docs20/install/hadoop_evn.md   |  6 +
 .../_docs20/install/manual_install_guide.cn.md  | 27 +++-
 website/_docs20/tutorial/cube_spark.md  |  5 ++--
 4 files changed, 9 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/kylin/blob/4c1c736e/website/_docs20/howto/howto_update_coprocessor.md
--
diff --git a/website/_docs20/howto/howto_update_coprocessor.md 
b/website/_docs20/howto/howto_update_coprocessor.md
index 8f83d70..9df6ca5 100644
--- a/website/_docs20/howto/howto_update_coprocessor.md
+++ b/website/_docs20/howto/howto_update_coprocessor.md
@@ -10,5 +10,5 @@ Kylin leverages HBase coprocessor to optimize query 
performance. After new versi
 There's a CLI tool to update HBase Coprocessor:
 
 {% highlight Groff markup %}
-$KYLIN_HOME/bin/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 default all
 {% endhighlight %}

http://git-wip-us.apache.org/repos/asf/kylin/blob/4c1c736e/website/_docs20/install/hadoop_evn.md
--
diff --git a/website/_docs20/install/hadoop_evn.md 
b/website/_docs20/install/hadoop_evn.md
index 51f82f2..a0be883 100644
--- a/website/_docs20/install/hadoop_evn.md
+++ b/website/_docs20/install/hadoop_evn.md
@@ -5,7 +5,7 @@ categories: install
 permalink: /docs20/install/hadoop_env.html
 ---
 
-Kylin need run in a Hadoop node, to get better stability, we suggest you to 
deploy it a pure Hadoop client machine, on which it the command lines like 
`hive`, `hbase`, `hadoop`, `hdfs` already be installed and configured. The 
Linux account that running Kylin has got permission to the Hadoop cluster, 
including create/write hdfs, hive tables, hbase tables and submit MR jobs. 
+Kylin need run in a Hadoop node, to get better stability, we suggest you to 
deploy it a pure Hadoop client machine, on which  the command lines like 
`hive`, `hbase`, `hadoop`, `hdfs` already be installed and configured. The 
Linux account that running Kylin has got permission to the Hadoop cluster, 
including create/write hdfs, hive tables, hbase tables and submit MR jobs. 
 
 ## Recommended Hadoop Versions
 
@@ -32,9 +32,5 @@ ambari-server start
 
 With both command successfully run you can go to ambari homepage at 
 (user:admin,password:admin) to check everything's 
status. **By default hortonworks ambari disables Hbase, you need manually start 
the `Hbase` service at ambari homepage.**
 
-![start hbase in 
ambari](https://raw.githubusercontent.com/KylinOLAP/kylinolap.github.io/master/docs/installation/starthbase.png)
 
-**Additonal Info for setting up Hortonworks Sandbox on Virtual Box**
-
-   Please make sure Hbase Master port [Default 6] and Zookeeper 
[Default 2181] is forwarded to Host OS.
  

http://git-wip-us.apache.org/repos/asf/kylin/blob/4c1c736e/website/_docs20/install/manual_install_guide.cn.md
--
diff --git a/website/_docs20/install/manual_install_guide.cn.md 
b/website/_docs20/install/manual_install_guide.cn.md
index b369568..e080c88 100644
--- a/website/_docs20/install/manual_install_guide.cn.md
+++ b/website/_docs20/install/manual_install_guide.cn.md
@@ -14,35 +14,16 @@ since: v0.7.1
 基本上本文解释了自动脚本中的每一步骤。我们假设你
已经对Linux上的Hadoop操作非常熟悉。
 
 ## 前提条件
-* 已安装Tomcat,输出到CATALINA_HOME(with CATALINA_HOME exported). 
 * Kylin 二进制文件拷贝至本地并解压,之后使用$KYLIN_HOME引用
-
-## 步骤
-
-### 准备Jars
-
-Kylin会需要使用两个jar包,两个jar包和é…
ç½®åœ¨é»˜è®¤kylin.properties:(there two jars and configured in the default 
kylin.properties)
-
-```
-kylin.job.jar=/tmp/kylin/kylin-job-latest.jar
-
-```
-
-这是Kylin用于MR jobs的job jar包。你需要复制 
$KYLIN_HOME/job/target/kylin-job-latest.jar 到