[jira] [Updated] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread peng.jianhua (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

peng.jianhua updated KYLIN-3119:

Attachment: 0001-kylin-3119.patch

> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 0001-kylin-3119.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Zhixiong Chen (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhixiong Chen resolved KYLIN-2884.
--
Resolution: Fixed

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Zhixiong Chen (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16358000#comment-16358000
 ] 

Zhixiong Chen commented on KYLIN-2884:
--

OK.

It's fine with me.

I will merge it into kYLIN.

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Pan, Julian (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357987#comment-16357987
 ] 

Pan, Julian commented on KYLIN-2884:


Hi [~Zhixiong Chen], I recreated a patch according currently master branch.
Please help to merge. Thanks!

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Pan, Julian (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pan, Julian updated KYLIN-2884:
---
Attachment: KYLIN-2884.patch

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3224) data can't show when use kylin pushdown model

2018-02-08 Thread Zhixiong Chen (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357968#comment-16357968
 ] 

Zhixiong Chen commented on KYLIN-3224:
--

Hi,[~peng.jianhua]

You mean you want to fix this issue by front-end ?
Do you fine why query by cube and query by pushdown show differently ?

 

 

> data can't show when use kylin pushdown model 
> --
>
> Key: KYLIN-3224
> URL: https://issues.apache.org/jira/browse/KYLIN-3224
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Web 
>Affects Versions: v2.2.0, v2.3.0
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3224.patch, 01.PNG, 02.PNG, 03.PNG
>
>
> select * from kylin_sales
> use pushdown model,and the result shows like 01.png



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3224) data can't show when use kylin pushdown model

2018-02-08 Thread peng.jianhua (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357960#comment-16357960
 ] 

peng.jianhua commented on KYLIN-3224:
-

Hi [~Zhixiong Chen] && [~yimingliu], this is a compatibility modification, it 
not only solved the original problem, it will not introduce new problems. 
Please help to review and merge it to Kylin 2.3. I had carefully tested it. 
Thanks!

> data can't show when use kylin pushdown model 
> --
>
> Key: KYLIN-3224
> URL: https://issues.apache.org/jira/browse/KYLIN-3224
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Web 
>Affects Versions: v2.2.0, v2.3.0
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3224.patch, 01.PNG, 02.PNG, 03.PNG
>
>
> select * from kylin_sales
> use pushdown model,and the result shows like 01.png



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread peng.jianhua (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357961#comment-16357961
 ] 

peng.jianhua commented on KYLIN-3119:
-

[~R0ger] ok,I know what you mean,I will keep the sql original

> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread Roger Shi (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357945#comment-16357945
 ] 

Roger Shi edited comment on KYLIN-3119 at 2/9/18 5:40 AM:
--

[~peng.jianhua], for this line I also have a question. If a string contains 
continous white space such as 'A    B', it will be replaced to 'A B'. It's 
not the expected behavior. It seems more tests are required to cover these 
cases.


was (Author: r0ger):
[~peng.jianhua], for this line I also have a question. If a string contains 
continous white space such as 'A    B', it will be replaced to 'A B'. It's 
not the expected behavior.

> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread Roger Shi (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357945#comment-16357945
 ] 

Roger Shi commented on KYLIN-3119:
--

[~peng.jianhua], for this line I also have a question. If a string contains 
continous white space such as 'A    B', it will be replaced to 'A B'. It's 
not the expected behavior.

> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3239) Refactor the ACL code about "checkPermission" and "hasPermission"

2018-02-08 Thread peng.jianhua (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357938#comment-16357938
 ] 

peng.jianhua commented on KYLIN-3239:
-

+1. 
Hi [~Shaofengshi] && [~yimingliu], please help to merge this issue. 

> Refactor the ACL code about "checkPermission" and "hasPermission"
> -
>
> Key: KYLIN-3239
> URL: https://issues.apache.org/jira/browse/KYLIN-3239
> Project: Kylin
>  Issue Type: Improvement
>  Components: Security
>Affects Versions: v2.2.0
>Reporter: Guangyao Li
>Assignee: Guangyao Li
>Priority: Minor
> Fix For: v2.3.0
>
> Attachments: 
> KYLIN-3239-Refactor-the-ACL-code-about-checkPermissi.patch
>
>
> According to the design of "checkPermission" and "HasPermission",
> Refactoring the ACL code



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread peng.jianhua (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357886#comment-16357886
 ] 

peng.jianhua commented on KYLIN-3119:
-

Hi,[~R0ger]
{code:java}
sql = sql.replaceAll("\\s+", " ");
{code}
this function would transform multi-line query to one-line query.

is that means you want to keep '\n' in  multi-line sql instead of transform it 
to space?



> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Zhixiong Chen (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357874#comment-16357874
 ] 

Zhixiong Chen commented on KYLIN-2884:
--

Hi,[~julianpan]

This patch is fine with me.

However I can't merge it into Kylin.Please check the code.

Thanks! 

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Zhixiong Chen (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhixiong Chen resolved KYLIN-3247.
--
Resolution: Fixed

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3247.patch
>
>
> Currently, the API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' return 
> cube's sql, it should return cube segment sql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Zhixiong Chen (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357870#comment-16357870
 ] 

Zhixiong Chen commented on KYLIN-3247:
--

OK. Thanks.

I will merge it into Kylin.

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3247.patch
>
>
> Currently, the API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' return 
> cube's sql, it should return cube segment sql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Shaofeng SHI (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357869#comment-16357869
 ] 

Shaofeng SHI commented on KYLIN-3247:
-

 +1 

I checked the patch, the main change to let the /api/cubes/\{cubeName}/sql to 
include derived columns; So it it safe.

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3247.patch
>
>
> Currently, the API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' return 
> cube's sql, it should return cube segment sql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread Roger Shi (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357867#comment-16357867
 ] 

Roger Shi commented on KYLIN-3119:
--

Hi [~peng.jianhua], it's a good catch. I have one comment on the patch. The 
regex seems not to match multi-line query. Would you please add a UT to prove 
it?

> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3223) Query for the list of hybrid cubes results in NPE

2018-02-08 Thread Billy Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357856#comment-16357856
 ] 

Billy Liu commented on KYLIN-3223:
--

Agree. The access check is missing on this API. 
LGTM.
Patch merged at http://git-wip-us.apache.org/repos/asf/kylin/commit/0655dbc3. 
Thank you, [~seva_ostapenko]

> Query for the list of hybrid cubes results in NPE
> -
>
> Key: KYLIN-3223
> URL: https://issues.apache.org/jira/browse/KYLIN-3223
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, Kylin 2.2
>Reporter: Vsevolod Ostapenko
>Assignee: Vsevolod Ostapenko
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 
> 0001-KYLIN-3223-Query-for-the-list-of-hybrid-cubes-result.patch
>
>
> Calling REST API to get the list of hybrid cubes returns stack trace with NPE 
> exception.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {}  
> [http://localhost:7070/kylin/api/hybrids]
>  {quote}
>  
> If a parameter project without a value is specified, call succeeds. E.g.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {} 
> [http://localhost:7070/kylin/api/hybrids?project]
> {quote}
> Quick look at the HybridService.java suggests that there is a bug in the 
> code, where the very first line tries to check ACLs on the project using the 
> project name, which is NULL, when project parameter is not specified as part 
> of the URL.
>  If parameter is specified without a value, ACL check is not performed, so 
> it's another bug, as the list of projects is retrieved without read 
> permission checking.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KYLIN-3223) Query for the list of hybrid cubes results in NPE

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu resolved KYLIN-3223.
--
   Resolution: Fixed
Fix Version/s: v2.3.0

> Query for the list of hybrid cubes results in NPE
> -
>
> Key: KYLIN-3223
> URL: https://issues.apache.org/jira/browse/KYLIN-3223
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, Kylin 2.2
>Reporter: Vsevolod Ostapenko
>Assignee: Vsevolod Ostapenko
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 
> 0001-KYLIN-3223-Query-for-the-list-of-hybrid-cubes-result.patch
>
>
> Calling REST API to get the list of hybrid cubes returns stack trace with NPE 
> exception.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {}  
> [http://localhost:7070/kylin/api/hybrids]
>  {quote}
>  
> If a parameter project without a value is specified, call succeeds. E.g.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {} 
> [http://localhost:7070/kylin/api/hybrids?project]
> {quote}
> Quick look at the HybridService.java suggests that there is a bug in the 
> code, where the very first line tries to check ACLs on the project using the 
> project name, which is NULL, when project parameter is not specified as part 
> of the URL.
>  If parameter is specified without a value, ACL check is not performed, so 
> it's another bug, as the list of projects is retrieved without read 
> permission checking.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Zhixiong Chen (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhixiong Chen updated KYLIN-2884:
-
Component/s: Web 

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Pan, Julian (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357854#comment-16357854
 ] 

Pan, Julian commented on KYLIN-2884:


Sorry for late reply, I have change the 
metaModel.model.partition_desc.partition_date_column to 
cube.model.partition_desc.partition_date_column, it should be resolve. New 
patch attached

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-2884) Add delete segment function for portal

2018-02-08 Thread Pan, Julian (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pan, Julian updated KYLIN-2884:
---
Attachment: KYLIN-2884.patch

> Add delete segment function for portal
> --
>
> Key: KYLIN-2884
> URL: https://issues.apache.org/jira/browse/KYLIN-2884
> Project: Kylin
>  Issue Type: Improvement
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: KYLIN-2884.patch, KYLIN-2884.patch
>
>
> Kylin restful already support delete segment function. Could we add a action 
> button for front-end to user?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KYLIN-3145) Support Kafka JSON message whose property name includes "_"

2018-02-08 Thread Shaofeng SHI (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shaofeng SHI resolved KYLIN-3145.
-
Resolution: Fixed
  Assignee: Shaofeng SHI

Checkin to master and 2.3.x branch; commits:

5075f590d843e808186f9d859e0c09ab1877fb0b

01bd0d41475962e4f63e09c17c0bb1cd319384db

> Support Kafka JSON message whose property name includes "_"
> ---
>
> Key: KYLIN-3145
> URL: https://issues.apache.org/jira/browse/KYLIN-3145
> Project: Kylin
>  Issue Type: Improvement
>  Components: Streaming
>Reporter: Shaofeng SHI
>Assignee: Shaofeng SHI
>Priority: Major
> Fix For: v2.3.0
>
>
> So far Kylin doesn't support JSON message which has property name with "_", 
> because that would be conflict with Kylin's logic.
> For example, the JSON message is :
> {code}
> { 
>  "user" : {
>   "first_name" : "Tom",
>   "age" : "20"
>   }
> }
> {code}
> When map this topic to a table, the "first_name" is mapped to 
> "user_first_name"; When Kylin parse the message, it separates by "_" and then 
> try to find "user" -> "first" -> "name"; as there is no "first" property, an 
> error is reported.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3139) Failure in map-reduce job due to undefined hdp.version variable when using HDP stack and remote HBase cluster

2018-02-08 Thread Billy Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357788#comment-16357788
 ] 

Billy Liu commented on KYLIN-3139:
--

Thanks [~seva_ostapenko] for the reminder. 
LGTM. Merged at http://git-wip-us.apache.org/repos/asf/kylin/commit/46d4f97c

> Failure in map-reduce job due to undefined hdp.version variable when using 
> HDP stack and remote HBase cluster
> -
>
> Key: KYLIN-3139
> URL: https://issues.apache.org/jira/browse/KYLIN-3139
> Project: Kylin
>  Issue Type: Bug
>  Components: Others
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, two cluster setup, Kylin 2.2.0 in a cluster 
> with Hive only, remote HBase cluster for data storage
>Reporter: Vsevolod Ostapenko
>Assignee: Vsevolod Ostapenko
>Priority: Minor
>  Labels: hdp
> Fix For: v2.3.0
>
> Attachments: KYLIN-3139.master.001.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> When running on top of HDP stack and using a setup where Hive and HBase run 
> in different clusters cube build/refresh fails on the step "Extract Fact 
> Table Distinct Columns" with the error
> {quote}java.lang.IllegalArgumentException: Unable to parse 
> '/hdp/apps/$\{hdp.version\}/mapreduce/mapreduce.tar.gz#mr-framework' as a 
> URI, check the setting for mapreduce.application.framework.path{quote}
> Based on existing JIRA discussions in Ambari project, it's responsibility of 
> a service to set hdp.version Java property. When HBase is not installed as a 
> service in a cluster where Kylin server is running, hbase launcher (invoked 
> by kylin.sh) does not set this property (presumably because HBase in that 
> case is just a client and not a service).
> The only suitable workaround found so far is to set property as part of the 
> conf/setenv.sh script.
> In order to avoid hard coding of the HDP version info, suggested change to 
> setenv.sh will attempt to detect HDP version at run-time. It should work for 
> all released HDP version from 2.2.x to 2.6.x
> In addition to that, it will also try to locate and set Java native library 
> path, when running on top of HDP.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KYLIN-3139) Failure in map-reduce job due to undefined hdp.version variable when using HDP stack and remote HBase cluster

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu resolved KYLIN-3139.
--
   Resolution: Fixed
Fix Version/s: v2.3.0

> Failure in map-reduce job due to undefined hdp.version variable when using 
> HDP stack and remote HBase cluster
> -
>
> Key: KYLIN-3139
> URL: https://issues.apache.org/jira/browse/KYLIN-3139
> Project: Kylin
>  Issue Type: Bug
>  Components: Others
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, two cluster setup, Kylin 2.2.0 in a cluster 
> with Hive only, remote HBase cluster for data storage
>Reporter: Vsevolod Ostapenko
>Assignee: Vsevolod Ostapenko
>Priority: Minor
>  Labels: hdp
> Fix For: v2.3.0
>
> Attachments: KYLIN-3139.master.001.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> When running on top of HDP stack and using a setup where Hive and HBase run 
> in different clusters cube build/refresh fails on the step "Extract Fact 
> Table Distinct Columns" with the error
> {quote}java.lang.IllegalArgumentException: Unable to parse 
> '/hdp/apps/$\{hdp.version\}/mapreduce/mapreduce.tar.gz#mr-framework' as a 
> URI, check the setting for mapreduce.application.framework.path{quote}
> Based on existing JIRA discussions in Ambari project, it's responsibility of 
> a service to set hdp.version Java property. When HBase is not installed as a 
> service in a cluster where Kylin server is running, hbase launcher (invoked 
> by kylin.sh) does not set this property (presumably because HBase in that 
> case is just a client and not a service).
> The only suitable workaround found so far is to set property as part of the 
> conf/setenv.sh script.
> In order to avoid hard coding of the HDP version info, suggested change to 
> setenv.sh will attempt to detect HDP version at run-time. It should work for 
> all released HDP version from 2.2.x to 2.6.x
> In addition to that, it will also try to locate and set Java native library 
> path, when running on top of HDP.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (KYLIN-3250) Upgrade jetty version to 9.2.24.v20180105

2018-02-08 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3250:
-

 Summary: Upgrade jetty version to 9.2.24.v20180105
 Key: KYLIN-3250
 URL: https://issues.apache.org/jira/browse/KYLIN-3250
 Project: Kylin
  Issue Type: Improvement
Reporter: Ted Yu


Currently Kylin depends on 9.2.20.v20161216 which is quite old.

This issue is to upgrade to 9.2.24.v20180105



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-2517) Upgrade hbase dependency to 1.4.1

2018-02-08 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated KYLIN-2517:
--
Summary: Upgrade hbase dependency to 1.4.1  (was: Upgrade hbase dependency 
to 1.3.1)

> Upgrade hbase dependency to 1.4.1
> -
>
> Key: KYLIN-2517
> URL: https://issues.apache.org/jira/browse/KYLIN-2517
> Project: Kylin
>  Issue Type: Improvement
>Reporter: Ted Yu
>Priority: Major
>
> There have been major enhancements / bug fixes since the hbase 1.1.1 release.
> This issue is to upgrade to 1.3.1 release.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3249) Default hybrid cube priority should be the same as of a regular cube

2018-02-08 Thread Vsevolod Ostapenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vsevolod Ostapenko updated KYLIN-3249:
--
Description: 
Hybrid cubes are assigned default priority lower than regular cubes, which 
leads to incorrect selection of a hybrid cube while a regular non-hybridized 
cube with lower cost is available.

For example, model has a wide cube with full set of metrics and narrower cube 
with top-N entries for a subset of metrics.

If wide cube is hybridized (due to a new metric addition), but top-N cube 
remains unchanged and non-hybridized, top-N cube will be no longer queried, 
causing query performance degradation.

The issue can be tracked to the 
query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where hybrid 
cubes are assigned priority 0, while regular cubes are assigned priority of 1.
 This unconditional priority assignment is incorrect as it only holds for cases 
when there is only one cube "flavor" in the model or when all the cubes of 
various "flavors" are hybridized at the same time.

Simplest fix is to have hybrid priority to be the same as of a regular cube.
 Plus, as an enhancement to the cube selection algorithm a new rule can be 
implemented that will filter out regular candidate cubes that are included into 
candidate hybrid cubes.

  was:
Hybrid cubes are assigned default priority lower than regular cubes, which 
leads to incorrect selection of a hybrid cube while a regular non-hybridized 
cube with lower cost is available.

For example, model has a wide cube with full set of metrics and narrower cube 
with top-N entries for a subset of metrics.

If wide cube is hybridized (due to a new metric addition), but top-N cube 
remains unchanged and non-hybridized, top-N cube will be no longer queried, 
causing query performance degradation.

The issue can be tracked to the 
query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where hybrid 
cubes are assigned priority 0, while regular cubes are assigned priority of 1.
 This unconditional priority assignment is incorrect as it only holds for cases 
when there is only one cube "type" in the model or when all the cubes are 
hybridized at the same time.

Simplest fix is to have hybrid priority to be the same as of a regular cube.
 Plus, as an enhancement to the cube selection algorithm a new rule can be 
implemented that will filter out regular candidate cubes that are included into 
candidate hybrid cubes.


> Default hybrid cube priority should be the same as of a regular cube
> 
>
> Key: KYLIN-3249
> URL: https://issues.apache.org/jira/browse/KYLIN-3249
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, Kylin 2.2
>Reporter: Vsevolod Ostapenko
>Priority: Major
>
> Hybrid cubes are assigned default priority lower than regular cubes, which 
> leads to incorrect selection of a hybrid cube while a regular non-hybridized 
> cube with lower cost is available.
> For example, model has a wide cube with full set of metrics and narrower cube 
> with top-N entries for a subset of metrics.
> If wide cube is hybridized (due to a new metric addition), but top-N cube 
> remains unchanged and non-hybridized, top-N cube will be no longer queried, 
> causing query performance degradation.
> The issue can be tracked to the 
> query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where 
> hybrid cubes are assigned priority 0, while regular cubes are assigned 
> priority of 1.
>  This unconditional priority assignment is incorrect as it only holds for 
> cases when there is only one cube "flavor" in the model or when all the cubes 
> of various "flavors" are hybridized at the same time.
> Simplest fix is to have hybrid priority to be the same as of a regular cube.
>  Plus, as an enhancement to the cube selection algorithm a new rule can be 
> implemented that will filter out regular candidate cubes that are included 
> into candidate hybrid cubes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (KYLIN-3249) Default hybrid cube priority should be the same as of a regular cube

2018-02-08 Thread Vsevolod Ostapenko (JIRA)
Vsevolod Ostapenko created KYLIN-3249:
-

 Summary: Default hybrid cube priority should be the same as of a 
regular cube
 Key: KYLIN-3249
 URL: https://issues.apache.org/jira/browse/KYLIN-3249
 Project: Kylin
  Issue Type: Bug
  Components: Query Engine
Affects Versions: v2.2.0
 Environment: HDP 2.5.6, Kylin 2.2
Reporter: Vsevolod Ostapenko


Hybrid cubes are assigned default priority lower than regular cubes, which 
leads to incorrect selection of a hybrid cube while a regular non-hybridized 
cube with lower cost is available.

For example, model has a wide cube with full set of metrics and narrower cube 
with top-N entries for a subset of metrics.

If wide cube is hybridized (due to a new metric addition), but top-N cube 
remains unchanged and non-hybridized, top-N cube will be no longer queried, 
'causing query performance degradation.

The issue can be tracked to the 
query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where hybrid 
cubes are assigned priority 0, while regular cubes are assigned priority of 1.
This unconditional priority assignment is incorrect as it only holds for cases 
when there is only one cube "type" in the model or when all the cubes are 
hybridized at the same time.

Simplest fix is to have hybrid priority to be the same as of a regular cube.
Plus, as an enhancement to the cube selection algorithm a new rule can be 
implemented that will filter out regular candidate cubes that are included into 
candidate hybrid cubes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3249) Default hybrid cube priority should be the same as of a regular cube

2018-02-08 Thread Vsevolod Ostapenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vsevolod Ostapenko updated KYLIN-3249:
--
Description: 
Hybrid cubes are assigned default priority lower than regular cubes, which 
leads to incorrect selection of a hybrid cube while a regular non-hybridized 
cube with lower cost is available.

For example, model has a wide cube with full set of metrics and narrower cube 
with top-N entries for a subset of metrics.

If wide cube is hybridized (due to a new metric addition), but top-N cube 
remains unchanged and non-hybridized, top-N cube will be no longer queried, 
causing query performance degradation.

The issue can be tracked to the 
query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where hybrid 
cubes are assigned priority 0, while regular cubes are assigned priority of 1.
 This unconditional priority assignment is incorrect as it only holds for cases 
when there is only one cube "type" in the model or when all the cubes are 
hybridized at the same time.

Simplest fix is to have hybrid priority to be the same as of a regular cube.
 Plus, as an enhancement to the cube selection algorithm a new rule can be 
implemented that will filter out regular candidate cubes that are included into 
candidate hybrid cubes.

  was:
Hybrid cubes are assigned default priority lower than regular cubes, which 
leads to incorrect selection of a hybrid cube while a regular non-hybridized 
cube with lower cost is available.

For example, model has a wide cube with full set of metrics and narrower cube 
with top-N entries for a subset of metrics.

If wide cube is hybridized (due to a new metric addition), but top-N cube 
remains unchanged and non-hybridized, top-N cube will be no longer queried, 
'causing query performance degradation.

The issue can be tracked to the 
query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where hybrid 
cubes are assigned priority 0, while regular cubes are assigned priority of 1.
This unconditional priority assignment is incorrect as it only holds for cases 
when there is only one cube "type" in the model or when all the cubes are 
hybridized at the same time.

Simplest fix is to have hybrid priority to be the same as of a regular cube.
Plus, as an enhancement to the cube selection algorithm a new rule can be 
implemented that will filter out regular candidate cubes that are included into 
candidate hybrid cubes.


> Default hybrid cube priority should be the same as of a regular cube
> 
>
> Key: KYLIN-3249
> URL: https://issues.apache.org/jira/browse/KYLIN-3249
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, Kylin 2.2
>Reporter: Vsevolod Ostapenko
>Priority: Major
>
> Hybrid cubes are assigned default priority lower than regular cubes, which 
> leads to incorrect selection of a hybrid cube while a regular non-hybridized 
> cube with lower cost is available.
> For example, model has a wide cube with full set of metrics and narrower cube 
> with top-N entries for a subset of metrics.
> If wide cube is hybridized (due to a new metric addition), but top-N cube 
> remains unchanged and non-hybridized, top-N cube will be no longer queried, 
> causing query performance degradation.
> The issue can be tracked to the 
> query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where 
> hybrid cubes are assigned priority 0, while regular cubes are assigned 
> priority of 1.
>  This unconditional priority assignment is incorrect as it only holds for 
> cases when there is only one cube "type" in the model or when all the cubes 
> are hybridized at the same time.
> Simplest fix is to have hybrid priority to be the same as of a regular cube.
>  Plus, as an enhancement to the cube selection algorithm a new rule can be 
> implemented that will filter out regular candidate cubes that are included 
> into candidate hybrid cubes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (KYLIN-3223) Query for the list of hybrid cubes results in NPE

2018-02-08 Thread Vsevolod Ostapenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vsevolod Ostapenko reassigned KYLIN-3223:
-

Assignee: Vsevolod Ostapenko  (was: nichunen)

> Query for the list of hybrid cubes results in NPE
> -
>
> Key: KYLIN-3223
> URL: https://issues.apache.org/jira/browse/KYLIN-3223
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, Kylin 2.2
>Reporter: Vsevolod Ostapenko
>Assignee: Vsevolod Ostapenko
>Priority: Major
> Attachments: 
> 0001-KYLIN-3223-Query-for-the-list-of-hybrid-cubes-result.patch
>
>
> Calling REST API to get the list of hybrid cubes returns stack trace with NPE 
> exception.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {}  
> [http://localhost:7070/kylin/api/hybrids]
>  {quote}
>  
> If a parameter project without a value is specified, call succeeds. E.g.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {} 
> [http://localhost:7070/kylin/api/hybrids?project]
> {quote}
> Quick look at the HybridService.java suggests that there is a bug in the 
> code, where the very first line tries to check ACLs on the project using the 
> project name, which is NULL, when project parameter is not specified as part 
> of the URL.
>  If parameter is specified without a value, ACL check is not performed, so 
> it's another bug, as the list of projects is retrieved without read 
> permission checking.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3223) Query for the list of hybrid cubes results in NPE

2018-02-08 Thread Vsevolod Ostapenko (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357639#comment-16357639
 ] 

Vsevolod Ostapenko commented on KYLIN-3223:
---

[~yimingliu], I attached the proposed patch for NPE and missing read access 
check on projects, when project either not specified or empty.
Please review or have someone to look at the changes and provide feedback.

> Query for the list of hybrid cubes results in NPE
> -
>
> Key: KYLIN-3223
> URL: https://issues.apache.org/jira/browse/KYLIN-3223
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, Kylin 2.2
>Reporter: Vsevolod Ostapenko
>Assignee: nichunen
>Priority: Major
> Attachments: 
> 0001-KYLIN-3223-Query-for-the-list-of-hybrid-cubes-result.patch
>
>
> Calling REST API to get the list of hybrid cubes returns stack trace with NPE 
> exception.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {}  
> [http://localhost:7070/kylin/api/hybrids]
>  {quote}
>  
> If a parameter project without a value is specified, call succeeds. E.g.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {} 
> [http://localhost:7070/kylin/api/hybrids?project]
> {quote}
> Quick look at the HybridService.java suggests that there is a bug in the 
> code, where the very first line tries to check ACLs on the project using the 
> project name, which is NULL, when project parameter is not specified as part 
> of the URL.
>  If parameter is specified without a value, ACL check is not performed, so 
> it's another bug, as the list of projects is retrieved without read 
> permission checking.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3223) Query for the list of hybrid cubes results in NPE

2018-02-08 Thread Vsevolod Ostapenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vsevolod Ostapenko updated KYLIN-3223:
--
Attachment: 0001-KYLIN-3223-Query-for-the-list-of-hybrid-cubes-result.patch

> Query for the list of hybrid cubes results in NPE
> -
>
> Key: KYLIN-3223
> URL: https://issues.apache.org/jira/browse/KYLIN-3223
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, Kylin 2.2
>Reporter: Vsevolod Ostapenko
>Assignee: nichunen
>Priority: Major
> Attachments: 
> 0001-KYLIN-3223-Query-for-the-list-of-hybrid-cubes-result.patch
>
>
> Calling REST API to get the list of hybrid cubes returns stack trace with NPE 
> exception.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {}  
> [http://localhost:7070/kylin/api/hybrids]
>  {quote}
>  
> If a parameter project without a value is specified, call succeeds. E.g.
> {quote}curl -u ADMIN:KYLIN -X GET -H 'Content-Type: application/json'  -d {} 
> [http://localhost:7070/kylin/api/hybrids?project]
> {quote}
> Quick look at the HybridService.java suggests that there is a bug in the 
> code, where the very first line tries to check ACLs on the project using the 
> project name, which is NULL, when project parameter is not specified as part 
> of the URL.
>  If parameter is specified without a value, ACL check is not performed, so 
> it's another bug, as the list of projects is retrieved without read 
> permission checking.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3139) Failure in map-reduce job due to undefined hdp.version variable when using HDP stack and remote HBase cluster

2018-02-08 Thread Vsevolod Ostapenko (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357607#comment-16357607
 ] 

Vsevolod Ostapenko commented on KYLIN-3139:
---

[~liyang], [~yimingliu]
guys, could we make a decision on this one? It's a trivial change, but it has 
been hanging around for more than a month now.

> Failure in map-reduce job due to undefined hdp.version variable when using 
> HDP stack and remote HBase cluster
> -
>
> Key: KYLIN-3139
> URL: https://issues.apache.org/jira/browse/KYLIN-3139
> Project: Kylin
>  Issue Type: Bug
>  Components: Others
>Affects Versions: v2.2.0
> Environment: HDP 2.5.6, two cluster setup, Kylin 2.2.0 in a cluster 
> with Hive only, remote HBase cluster for data storage
>Reporter: Vsevolod Ostapenko
>Assignee: Vsevolod Ostapenko
>Priority: Minor
>  Labels: hdp
> Attachments: KYLIN-3139.master.001.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> When running on top of HDP stack and using a setup where Hive and HBase run 
> in different clusters cube build/refresh fails on the step "Extract Fact 
> Table Distinct Columns" with the error
> {quote}java.lang.IllegalArgumentException: Unable to parse 
> '/hdp/apps/$\{hdp.version\}/mapreduce/mapreduce.tar.gz#mr-framework' as a 
> URI, check the setting for mapreduce.application.framework.path{quote}
> Based on existing JIRA discussions in Ambari project, it's responsibility of 
> a service to set hdp.version Java property. When HBase is not installed as a 
> service in a cluster where Kylin server is running, hbase launcher (invoked 
> by kylin.sh) does not set this property (presumably because HBase in that 
> case is just a client and not a service).
> The only suitable workaround found so far is to set property as part of the 
> conf/setenv.sh script.
> In order to avoid hard coding of the HDP version info, suggested change to 
> setenv.sh will attempt to detect HDP version at run-time. It should work for 
> all released HDP version from 2.2.x to 2.6.x
> In addition to that, it will also try to locate and set Java native library 
> path, when running on top of HDP.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (KYLIN-3248) Add batch grant API for project ACL.

2018-02-08 Thread jiatao.tao (JIRA)
jiatao.tao created KYLIN-3248:
-

 Summary: Add batch grant API for project ACL.
 Key: KYLIN-3248
 URL: https://issues.apache.org/jira/browse/KYLIN-3248
 Project: Kylin
  Issue Type: Improvement
Reporter: jiatao.tao
Assignee: jiatao.tao


Project ACL stored in one file, and leads to adding huge ACLs inefficient.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread Billy Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16356764#comment-16356764
 ] 

Billy Liu commented on KYLIN-3119:
--

[~rogershi], could you review this two patch?

> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3119) A few bugs in the function 'massageSql' of 'QueryUtil.java'

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu updated KYLIN-3119:
-
Component/s: Query Engine

> A few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---
>
> Key: KYLIN-3119
> URL: https://issues.apache.org/jira/browse/KYLIN-3119
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: peng.jianhua
>Assignee: peng.jianhua
>Priority: Major
> Attachments: 
> 0001-KYLIN-3119-A-few-bugs-in-the-function-massageSql-of-.patch, 
> 0001-KYLIN-3119-add-test-cases.patch, 01.PNG, 02.PNG
>
>
> in the function 'massageSql' of 'QueryUtil.java',there are a few bugs:
> 01:
> {code:java}
> while (sql.endsWith(";"))
> sql = sql.substring(0, sql.length() - 1);
> {code}
> if the sql end with ';' and after the ';' still has comments,will be 
> error.Because the sql will add ("\nLIMIT " + limit) at the end.
> 02:
> {code:java}
> if (limit > 0 && !sql.toLowerCase().contains("limit")) {
> sql += ("\nLIMIT " + limit);
> }
> if (offset > 0 && !sql.toLowerCase().contains("offset")) {
> sql += ("\nOFFSET " + offset);
> }
> {code}
> if the sql already has word 'limit' in it,such as Alias,Subquery,Comments,the 
> ‘limit’ in the Input box will be invalid.
> for example,the sql has subquery,and there is 'limit' in subquery.
> {code:java}
> select KYLIN_SALES.PART_DT, count(KYLIN_SALES.PRICE)
> from KYLIN_SALES
> inner join (select ACCOUNT_ID, ACCOUNT_BUYER_LEVEL from KYLIN_ACCOUNT where 
> ACCOUNT_COUNTRY = 'US' limit 1) as TT
> on KYLIN_SALES.BUYER_ID = TT.ACCOUNT_ID
> group by KYLIN_SALES.PART_DT
> {code}
> the ‘limit’ in the Input box will be invalid.please refer to 01.png and 
> 02.png.
> 03:
> {code:java}
> // https://issues.apache.org/jira/browse/KYLIN-2649
> if (kylinConfig.getForceLimit() > 0 && 
> !sql.toLowerCase().contains("limit")
> && sql.toLowerCase().contains("*")) {
> sql += ("\nLIMIT " + kylinConfig.getForceLimit());
> }
> {code}
> Because KYLIN-2649 is still unresolved,so I didn't change the code,but  it 
> has same 'limit' word bugs like above.
> And there are some situations that the sql contains \*,such as 
> {code:java}count(*),kylin_sales.*{code}
> Maybe the \* in subquery too.
> it seems improperly to deal with the sql just use {code:java}
> sql.toLowerCase().contains("*")
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3145) Support Kafka JSON message whose property name includes "_"

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu updated KYLIN-3145:
-
Fix Version/s: v2.3.0

> Support Kafka JSON message whose property name includes "_"
> ---
>
> Key: KYLIN-3145
> URL: https://issues.apache.org/jira/browse/KYLIN-3145
> Project: Kylin
>  Issue Type: Improvement
>  Components: Streaming
>Reporter: Shaofeng SHI
>Priority: Major
> Fix For: v2.3.0
>
>
> So far Kylin doesn't support JSON message which has property name with "_", 
> because that would be conflict with Kylin's logic.
> For example, the JSON message is :
> {code}
> { 
>  "user" : {
>   "first_name" : "Tom",
>   "age" : "20"
>   }
> }
> {code}
> When map this topic to a table, the "first_name" is mapped to 
> "user_first_name"; When Kylin parse the message, it separates by "_" and then 
> try to find "user" -> "first" -> "name"; as there is no "first" property, an 
> error is reported.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (KYLIN-3227) Automatically remove the blank at the end of lines in properties files

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu resolved KYLIN-3227.
--
Resolution: Fixed

LGTM. Thanks [~Guangyao Li].
Patch merged at 
https://git1-us-west.apache.org/repos/asf?p=kylin.git;a=commit;h=8826e1de

> Automatically remove the blank at the end of lines in properties files
> --
>
> Key: KYLIN-3227
> URL: https://issues.apache.org/jira/browse/KYLIN-3227
> Project: Kylin
>  Issue Type: Bug
>  Components: Environment 
>Affects Versions: v2.2.0
>Reporter: Guangyao Li
>Assignee: Guangyao Li
>Priority: Minor
> Fix For: v2.3.0
>
> Attachments: 
> KYLIN-3277-Automatically-remove-the-blank-at-the-end.patch
>
>
> In the 'kylin.properties' file:
> eg: kylin.engine.spark-conf.spark.executor.instances=1 
> There is a blank space bebind "1"
> The Kylin will startup failure.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (KYLIN-3227) Automatically remove the blank at the end of lines in properties files

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu reassigned KYLIN-3227:


Assignee: Guangyao Li  (was: Wang Cheng)

> Automatically remove the blank at the end of lines in properties files
> --
>
> Key: KYLIN-3227
> URL: https://issues.apache.org/jira/browse/KYLIN-3227
> Project: Kylin
>  Issue Type: Bug
>  Components: Environment 
>Affects Versions: v2.2.0
>Reporter: Guangyao Li
>Assignee: Guangyao Li
>Priority: Minor
> Fix For: v2.3.0
>
> Attachments: 
> KYLIN-3277-Automatically-remove-the-blank-at-the-end.patch
>
>
> In the 'kylin.properties' file:
> eg: kylin.engine.spark-conf.spark.executor.instances=1 
> There is a blank space bebind "1"
> The Kylin will startup failure.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Peng Xing (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16356695#comment-16356695
 ] 

Peng Xing commented on KYLIN-3247:
--

Hi ,[~Zhixiong Chen], please refer to KYLIN-3009, segment's SQL have the 
partition info in the where condition.

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3247.patch
>
>
> Currently, the API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' return 
> cube's sql, it should return cube segment sql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-2932) Simplify the thread model for in-memory cubing

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-2932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu updated KYLIN-2932:
-
Fix Version/s: (was: v2.3.0)
   Future

> Simplify the thread model for in-memory cubing
> --
>
> Key: KYLIN-2932
> URL: https://issues.apache.org/jira/browse/KYLIN-2932
> Project: Kylin
>  Issue Type: Improvement
>  Components: Job Engine
>Reporter: Wang Ken
>Assignee: Wang Ken
>Priority: Major
> Fix For: Future
>
> Attachments: APACHE-KYLIN-2932.patch
>
>
> The current implementation uses split threads, task threads and main thread 
> to do the cube building, there is complex join and error handling logic.
> The new implement leverages the ForkJoinPool from JDK,  the event split logic 
> is handled in
> main thread. Cuboid task and sub-tasks are handled in fork join pool, cube 
> results are collected
> async and can be write to output earlier.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Issue Comment Deleted] (KYLIN-3157) Enhance query timeout to entire query life cycle

2018-02-08 Thread Billy Liu (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Billy Liu updated KYLIN-3157:
-
Comment: was deleted

(was: Commit: 
https://github.com/apache/kylin/commit/1f33dd93123dd59795a16193a3b5064419f4b532)

> Enhance query timeout to entire query life cycle
> 
>
> Key: KYLIN-3157
> URL: https://issues.apache.org/jira/browse/KYLIN-3157
> Project: Kylin
>  Issue Type: Improvement
>Reporter: jiatao.tao
>Assignee: jiatao.tao
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3157-enhancement-Kylin-query-timeout.patch
>
>
> Nowadays, kylin's query timeout( kylin.query.timeout-seconds ) is only for 
> one OLAP context, should be for the entire query life cycle.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Zhixiong Chen (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16356665#comment-16356665
 ] 

Zhixiong Chen commented on KYLIN-3247:
--

Hi ,[~xingpeng1]

Could you show more detail about why you want to change it ?

Because the segments' sql should be the same with cube's sql.

 

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3247.patch
>
>
> Currently, the API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' return 
> cube's sql, it should return cube segment sql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Peng Xing (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peng Xing updated KYLIN-3247:
-
Attachment: 0001-KYLIN-3247.patch

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3247.patch
>
>
> Currently, the API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' return 
> cube's sql, it should return cube segment sql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Peng Xing (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peng Xing updated KYLIN-3247:
-
Description: Currently, the API 'GET 
/api/cubes/{cubeName}/segs/{segmentName}/sql' return cube's sql, it should 
return cube segment sql

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
>
> Currently, the API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' return 
> cube's sql, it should return cube segment sql



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a cube segment sql

2018-02-08 Thread Peng Xing (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peng Xing updated KYLIN-3247:
-
Summary: REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should 
return a cube segment sql  (was: REST API 'GET 
/api/cubes/{cubeName}/segs/{segmentName}/sql' shuold return a cube segment sql)

> REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' should return a 
> cube segment sql
> 
>
> Key: KYLIN-3247
> URL: https://issues.apache.org/jira/browse/KYLIN-3247
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service
>Reporter: Peng Xing
>Assignee: Peng Xing
>Priority: Major
> Fix For: v2.3.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (KYLIN-3247) REST API 'GET /api/cubes/{cubeName}/segs/{segmentName}/sql' shuold return a cube segment sql

2018-02-08 Thread Peng Xing (JIRA)
Peng Xing created KYLIN-3247:


 Summary: REST API 'GET 
/api/cubes/{cubeName}/segs/{segmentName}/sql' shuold return a cube segment sql
 Key: KYLIN-3247
 URL: https://issues.apache.org/jira/browse/KYLIN-3247
 Project: Kylin
  Issue Type: Bug
  Components: REST Service
Reporter: Peng Xing
Assignee: Peng Xing
 Fix For: v2.3.0






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3157) Enhance query timeout to entire query life cycle

2018-02-08 Thread jiatao.tao (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16356635#comment-16356635
 ] 

jiatao.tao commented on KYLIN-3157:
---

[^0001-KYLIN-3157-enhancement-Kylin-query-timeout.patch]

> Enhance query timeout to entire query life cycle
> 
>
> Key: KYLIN-3157
> URL: https://issues.apache.org/jira/browse/KYLIN-3157
> Project: Kylin
>  Issue Type: Improvement
>Reporter: jiatao.tao
>Assignee: jiatao.tao
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3157-enhancement-Kylin-query-timeout.patch
>
>
> Nowadays, kylin's query timeout( kylin.query.timeout-seconds ) is only for 
> one OLAP context, should be for the entire query life cycle.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3157) Enhance query timeout to entire query life cycle

2018-02-08 Thread jiatao.tao (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jiatao.tao updated KYLIN-3157:
--
Attachment: 0001-KYLIN-3157-enhancement-Kylin-query-timeout.patch

> Enhance query timeout to entire query life cycle
> 
>
> Key: KYLIN-3157
> URL: https://issues.apache.org/jira/browse/KYLIN-3157
> Project: Kylin
>  Issue Type: Improvement
>Reporter: jiatao.tao
>Assignee: jiatao.tao
>Priority: Major
> Fix For: v2.3.0
>
> Attachments: 0001-KYLIN-3157-enhancement-Kylin-query-timeout.patch
>
>
> Nowadays, kylin's query timeout( kylin.query.timeout-seconds ) is only for 
> one OLAP context, should be for the entire query life cycle.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3227) Automatically remove the blank at the end of lines in properties files

2018-02-08 Thread Guangyao Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guangyao Li updated KYLIN-3227:
---
Attachment: KYLIN-3277-Automatically-remove-the-blank-at-the-end.patch

> Automatically remove the blank at the end of lines in properties files
> --
>
> Key: KYLIN-3227
> URL: https://issues.apache.org/jira/browse/KYLIN-3227
> Project: Kylin
>  Issue Type: Bug
>  Components: Environment 
>Affects Versions: v2.2.0
>Reporter: Guangyao Li
>Assignee: Wang Cheng
>Priority: Minor
> Fix For: v2.3.0
>
> Attachments: 
> KYLIN-3277-Automatically-remove-the-blank-at-the-end.patch
>
>
> In the 'kylin.properties' file:
> eg: kylin.engine.spark-conf.spark.executor.instances=1 
> There is a blank space bebind "1"
> The Kylin will startup failure.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (KYLIN-3227) Automatically remove the blank at the end of lines in properties files

2018-02-08 Thread Guangyao Li (JIRA)

 [ 
https://issues.apache.org/jira/browse/KYLIN-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guangyao Li updated KYLIN-3227:
---
Attachment: (was: 
KYLIN-3227-Automatically-remove-the-blank-at-the-end.patch)

> Automatically remove the blank at the end of lines in properties files
> --
>
> Key: KYLIN-3227
> URL: https://issues.apache.org/jira/browse/KYLIN-3227
> Project: Kylin
>  Issue Type: Bug
>  Components: Environment 
>Affects Versions: v2.2.0
>Reporter: Guangyao Li
>Assignee: Wang Cheng
>Priority: Minor
> Fix For: v2.3.0
>
> Attachments: 
> KYLIN-3277-Automatically-remove-the-blank-at-the-end.patch
>
>
> In the 'kylin.properties' file:
> eg: kylin.engine.spark-conf.spark.executor.instances=1 
> There is a blank space bebind "1"
> The Kylin will startup failure.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)