[jira] [Commented] (KYLIN-3576) IllegalArgumentException: No enum constant org.apache.kylin.rest.service.JobService.JobSearchMode.

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI commented on KYLIN-3576:
-

Code change was committed against 
[KYLIN-3541|https://github.com/shaofengshi/kylin/commit/fc9444fd81cfebe96e0019ea0ca83c533db2951b]

> IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
> --
>
> Key: KYLIN-3576
> URL: https://issues.apache.org/jira/browse/KYLIN-3576
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine
>Reporter: Shaofeng SHI
>Assignee: Shaofeng SHI
>Priority: Minor
> Fix For: v2.6.0
>
>
> {code:java}
> 2018-09-22 19:58:20,258 INFO  [main] execution.ExecutableManager:69 : Using 
> metadata url: ../examples/test_metadata/
> 2018-09-22 19:58:20,265 ERROR [main] controller.JobController:81 : Invalid 
> value for JobSearchMode: '', skip it.
> java.lang.IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
>   at java.lang.Enum.valueOf(Enum.java:238)
>   at 
> org.apache.kylin.rest.service.JobService$JobSearchMode.valueOf(JobService.java:1236)
>   at 
> org.apache.kylin.rest.controller.JobController.list(JobController.java:79)
>   at 
> org.apache.kylin.rest.controller.JobControllerTest.testBasics(JobControllerTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at 
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
>   at 
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> {code}



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


[jira] [Commented] (KYLIN-3541) TableACLManagerTest failed

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3541:


Commit 632760603916c8b0412d7abed80abf8decbfb172 in kylin's branch 
refs/heads/2.4.x from shaofengshi
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=6327606 ]

KYLIN-3541 clean ci meaningless messages


> TableACLManagerTest failed
> --
>
> Key: KYLIN-3541
> URL: https://issues.apache.org/jira/browse/KYLIN-3541
> Project: Kylin
>  Issue Type: Bug
>Reporter: Yichen Zhou
>Priority: Major
>
> 2018-09-05 11:11:27,013 ERROR [pool-179-thread-1] cachesync.Broadcaster:137 : 
> Announce broadcast event failed, targetNode localhost:49607 broadcastEvent 
> BroadcastEvent\{entity=table_acl, event=create, cacheKey=default}, error msg: 
> org.apache.http.conn.HttpHostConnectException: Connection to
> [http://localhost:49607|http://localhost:49607/]
> refused 2018-09-05 11:11:27,013 ERROR [pool-179-thread-1] 
> cachesync.Broadcaster:330 : Announce broadcast event exceeds retry limit, 
> abandon targetNode localhost:49607 broadcastEvent 
> BroadcastEvent\{entity=table_acl, event=create, cacheKey=default} 2018-09-05 
> 11:11:27,015 INFO [main] server.AbstractConnector:318 : Stopped 
> ServerConnector@664c7565{HTTP/1.1,[http/1.1]}
> {0.0.0.0:49607}
> 2018-09-05 11:11:27,015 INFO [main] handler.ContextHandler:910 : Stopped 
> o.e.j.s.ServletContextHandler@515a8659\{/,null,UNAVAILABLE} 2018-09-05 
> 11:11:27,026 INFO [main] common.KylinConfig:113 : Destroy KylinConfig [ERROR] 
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.932 s <<< 
> FAILURE! - in org.apache.kylin.rest.security.TableACLManagerTest [ERROR] 
> test(org.apache.kylin.rest.security.TableACLManagerTest) Time elapsed: 2.856 
> s <<< FAILURE! java.lang.AssertionError: expected:<1> but was:<0> at 
> org.apache.kylin.rest.security.TableACLManagerTest.test(TableACLManagerTest.java:50)
> mvn test in sandbox:
> 2018-09-05 12:09:20,203 DEBUG [Thread-3] util.ZookeeperDistributedLock:223 : 
> 31...@sandbox.hortonworks.com trying to unlock 
> /kylin/../examples/test_metadata/job_engine/global_job_engine_lock
> Exception in thread "Thread-3" java.lang.RuntimeException: Error while 
> peeking at /kylin/../examples/test_metadata/job_engine/global_job_engine_lock
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.peekLock(ZookeeperDistributedLock.java:205)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.unlock(ZookeeperDistributedLock.java:225)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.unlockJobEngine(ZookeeperDistributedLock.java:312)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperJobLock.unlockJobEngine(ZookeeperJobLock.java:86)
>  at 
> org.apache.kylin.job.impl.threadpool.DefaultScheduler.shutdown(DefaultScheduler.java:194)
>  at org.apache.kylin.rest.service.JobService$2.run(JobService.java:143)
>  at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: instance must be started before 
> calling this method
>  at 
> org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:176)
>  at 
> org.apache.curator.framework.imps.CuratorFrameworkImpl.getData(CuratorFrameworkImpl.java:375)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.peekLock(ZookeeperDistributedLock.java:200)
>  ... 6 more



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


[jira] [Commented] (KYLIN-3541) TableACLManagerTest failed

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3541:


Commit fac0937dfae3a5f29fe513dae22f6ddf3b16f926 in kylin's branch 
refs/heads/2.5.x from shaofengshi
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=fac0937 ]

KYLIN-3541 clean ci meaningless messages


> TableACLManagerTest failed
> --
>
> Key: KYLIN-3541
> URL: https://issues.apache.org/jira/browse/KYLIN-3541
> Project: Kylin
>  Issue Type: Bug
>Reporter: Yichen Zhou
>Priority: Major
>
> 2018-09-05 11:11:27,013 ERROR [pool-179-thread-1] cachesync.Broadcaster:137 : 
> Announce broadcast event failed, targetNode localhost:49607 broadcastEvent 
> BroadcastEvent\{entity=table_acl, event=create, cacheKey=default}, error msg: 
> org.apache.http.conn.HttpHostConnectException: Connection to
> [http://localhost:49607|http://localhost:49607/]
> refused 2018-09-05 11:11:27,013 ERROR [pool-179-thread-1] 
> cachesync.Broadcaster:330 : Announce broadcast event exceeds retry limit, 
> abandon targetNode localhost:49607 broadcastEvent 
> BroadcastEvent\{entity=table_acl, event=create, cacheKey=default} 2018-09-05 
> 11:11:27,015 INFO [main] server.AbstractConnector:318 : Stopped 
> ServerConnector@664c7565{HTTP/1.1,[http/1.1]}
> {0.0.0.0:49607}
> 2018-09-05 11:11:27,015 INFO [main] handler.ContextHandler:910 : Stopped 
> o.e.j.s.ServletContextHandler@515a8659\{/,null,UNAVAILABLE} 2018-09-05 
> 11:11:27,026 INFO [main] common.KylinConfig:113 : Destroy KylinConfig [ERROR] 
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.932 s <<< 
> FAILURE! - in org.apache.kylin.rest.security.TableACLManagerTest [ERROR] 
> test(org.apache.kylin.rest.security.TableACLManagerTest) Time elapsed: 2.856 
> s <<< FAILURE! java.lang.AssertionError: expected:<1> but was:<0> at 
> org.apache.kylin.rest.security.TableACLManagerTest.test(TableACLManagerTest.java:50)
> mvn test in sandbox:
> 2018-09-05 12:09:20,203 DEBUG [Thread-3] util.ZookeeperDistributedLock:223 : 
> 31...@sandbox.hortonworks.com trying to unlock 
> /kylin/../examples/test_metadata/job_engine/global_job_engine_lock
> Exception in thread "Thread-3" java.lang.RuntimeException: Error while 
> peeking at /kylin/../examples/test_metadata/job_engine/global_job_engine_lock
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.peekLock(ZookeeperDistributedLock.java:205)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.unlock(ZookeeperDistributedLock.java:225)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.unlockJobEngine(ZookeeperDistributedLock.java:312)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperJobLock.unlockJobEngine(ZookeeperJobLock.java:86)
>  at 
> org.apache.kylin.job.impl.threadpool.DefaultScheduler.shutdown(DefaultScheduler.java:194)
>  at org.apache.kylin.rest.service.JobService$2.run(JobService.java:143)
>  at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: instance must be started before 
> calling this method
>  at 
> org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:176)
>  at 
> org.apache.curator.framework.imps.CuratorFrameworkImpl.getData(CuratorFrameworkImpl.java:375)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.peekLock(ZookeeperDistributedLock.java:200)
>  ... 6 more



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


[jira] [Commented] (KYLIN-3541) TableACLManagerTest failed

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3541:


Commit fc9444fd81cfebe96e0019ea0ca83c533db2951b in kylin's branch 
refs/heads/master from shaofengshi
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=fc9444f ]

KYLIN-3541 clean ci meaningless messages


> TableACLManagerTest failed
> --
>
> Key: KYLIN-3541
> URL: https://issues.apache.org/jira/browse/KYLIN-3541
> Project: Kylin
>  Issue Type: Bug
>Reporter: Yichen Zhou
>Priority: Major
>
> 2018-09-05 11:11:27,013 ERROR [pool-179-thread-1] cachesync.Broadcaster:137 : 
> Announce broadcast event failed, targetNode localhost:49607 broadcastEvent 
> BroadcastEvent\{entity=table_acl, event=create, cacheKey=default}, error msg: 
> org.apache.http.conn.HttpHostConnectException: Connection to
> [http://localhost:49607|http://localhost:49607/]
> refused 2018-09-05 11:11:27,013 ERROR [pool-179-thread-1] 
> cachesync.Broadcaster:330 : Announce broadcast event exceeds retry limit, 
> abandon targetNode localhost:49607 broadcastEvent 
> BroadcastEvent\{entity=table_acl, event=create, cacheKey=default} 2018-09-05 
> 11:11:27,015 INFO [main] server.AbstractConnector:318 : Stopped 
> ServerConnector@664c7565{HTTP/1.1,[http/1.1]}
> {0.0.0.0:49607}
> 2018-09-05 11:11:27,015 INFO [main] handler.ContextHandler:910 : Stopped 
> o.e.j.s.ServletContextHandler@515a8659\{/,null,UNAVAILABLE} 2018-09-05 
> 11:11:27,026 INFO [main] common.KylinConfig:113 : Destroy KylinConfig [ERROR] 
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.932 s <<< 
> FAILURE! - in org.apache.kylin.rest.security.TableACLManagerTest [ERROR] 
> test(org.apache.kylin.rest.security.TableACLManagerTest) Time elapsed: 2.856 
> s <<< FAILURE! java.lang.AssertionError: expected:<1> but was:<0> at 
> org.apache.kylin.rest.security.TableACLManagerTest.test(TableACLManagerTest.java:50)
> mvn test in sandbox:
> 2018-09-05 12:09:20,203 DEBUG [Thread-3] util.ZookeeperDistributedLock:223 : 
> 31...@sandbox.hortonworks.com trying to unlock 
> /kylin/../examples/test_metadata/job_engine/global_job_engine_lock
> Exception in thread "Thread-3" java.lang.RuntimeException: Error while 
> peeking at /kylin/../examples/test_metadata/job_engine/global_job_engine_lock
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.peekLock(ZookeeperDistributedLock.java:205)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.unlock(ZookeeperDistributedLock.java:225)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.unlockJobEngine(ZookeeperDistributedLock.java:312)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperJobLock.unlockJobEngine(ZookeeperJobLock.java:86)
>  at 
> org.apache.kylin.job.impl.threadpool.DefaultScheduler.shutdown(DefaultScheduler.java:194)
>  at org.apache.kylin.rest.service.JobService$2.run(JobService.java:143)
>  at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: instance must be started before 
> calling this method
>  at 
> org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:176)
>  at 
> org.apache.curator.framework.imps.CuratorFrameworkImpl.getData(CuratorFrameworkImpl.java:375)
>  at 
> org.apache.kylin.storage.hbase.util.ZookeeperDistributedLock.peekLock(ZookeeperDistributedLock.java:200)
>  ... 6 more



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


[jira] [Comment Edited] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu edited comment on KYLIN-3581 at 9/25/18 3:17 AM:
--

I think I can fix it.

 

My opinion:

According to java api, [https://docs.oracle.com/javase/8/docs/api/] says:
{quote}_It is strongly recommended, but not strictly required that 
{{(x.compareTo(y)==0) == (x.equals(y))}}. Generally speaking, any class that 
implements the {{Comparable}} interface and violates this condition should 
clearly indicate this fact. The recommended language is "Note: this class has a 
natural ordering that is inconsistent with equals."_
{quote}
And 
[https://dzone.com/articles/the-hidden-contract-between-equals-and-comparable]

 

I think I should provide both implementation of equals and hashCode.Maybe I can 
delegate equal to  compareTo(obj) == 0.Like:

 

 
{quote}{{public boolean equals(Object o) {}}
 {{  if (this == o) return true;}}
 {{  if (o == null || getClass() != o.getClass()) return false;}}
 {{  MergeSlot mergeSlot = (MergeSlot) o;}}
 {{  return compareTo(mergeSlot) == 0;}}
 {{}}}
{quote}
 

 


was (Author: hit_lacus):
I think I can fix it.

 

My opinion:

According to java api, [https://docs.oracle.com/javase/8/docs/api/] says:
{quote}_It is strongly recommended, but not strictly required that 
{{(x.compareTo(y)==0) == (x.equals(y))}}. Generally speaking, any class that 
implements the {{Comparable}} interface and violates this condition should 
clearly indicate this fact. The recommended language is "Note: this class has a 
natural ordering that is inconsistent with equals."_
{quote}
And 
[https://dzone.com/articles/the-hidden-contract-between-equals-and-comparable]

 

I think I should provide both implementation of equals and hashCode.Maybe I can 
delegate equal to  compareTo(obj) == 0.Like:

 

 
{quote}{{public boolean equals(Object o) {}}
{{  if (this == o) return true;}}
{{  if (o == null || getClass() != o.getClass()) return false;}}
{{  MergeSlot mergeSlot = (MergeSlot) o;}}
{{  return compareTo(mergeSlot) == 0;}}
{{}}}
{quote}
 

 

 

 

 

 
  

> compareTo method should be paired with equals method
> 
>
> Key: KYLIN-3581
> URL: https://issues.apache.org/jira/browse/KYLIN-3581
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> DoggedCubeBuilder$MergeSlot and InMemCubeBuilder$CuboidTask define compareTo 
> method.
> They should define equals method as well.



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


[jira] [Comment Edited] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu edited comment on KYLIN-3581 at 9/25/18 3:15 AM:
--

I think I can fix it.

 

My opinion:

According to java api, [https://docs.oracle.com/javase/8/docs/api/] says:
{quote}_It is strongly recommended, but not strictly required that 
{{(x.compareTo(y)==0) == (x.equals(y))}}. Generally speaking, any class that 
implements the {{Comparable}} interface and violates this condition should 
clearly indicate this fact. The recommended language is "Note: this class has a 
natural ordering that is inconsistent with equals."_
{quote}
And 
[https://dzone.com/articles/the-hidden-contract-between-equals-and-comparable]

 

I think I should provide both implementation of equals and hashCode.Maybe I can 
delegate equal to  compareTo(obj) == 0.Like:

 

 
{quote}{{public boolean equals(Object o) {}}
{{  if (this == o) return true;}}
{{  if (o == null || getClass() != o.getClass()) return false;}}
{{  MergeSlot mergeSlot = (MergeSlot) o;}}
{{  return compareTo(mergeSlot) == 0;}}
{{}}}
{quote}
 

 

 

 

 

 
  


was (Author: hit_lacus):
I think I can fix it.

 

My opinion:

According to java api, [https://docs.oracle.com/javase/8/docs/api/] says:
{quote}_It is strongly recommended, but not strictly required that 
{{(x.compareTo(y)==0) == (x.equals(y))}}. Generally speaking, any class that 
implements the {{Comparable}} interface and violates this condition should 
clearly indicate this fact. The recommended language is "Note: this class has a 
natural ordering that is inconsistent with equals."_
{quote}
And 
[https://dzone.com/articles/the-hidden-contract-between-equals-and-comparable]

 

I think I should provide both implementation of equals and hashCode.Maybe I can 
delegate equal to  compareTo(obj) == 0.Like:
{quote}public boolean equals(Object o){

  if (this == o) return true;     
  if (o == null || getClass() != o.getClass())return false;     
    MergeSlot mergeSlot = (MergeSlot) o;     
    return compareTo(mergeSlot) == 0; 
}{quote}
 
 

> compareTo method should be paired with equals method
> 
>
> Key: KYLIN-3581
> URL: https://issues.apache.org/jira/browse/KYLIN-3581
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> DoggedCubeBuilder$MergeSlot and InMemCubeBuilder$CuboidTask define compareTo 
> method.
> They should define equals method as well.



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


[jira] [Comment Edited] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu edited comment on KYLIN-3581 at 9/25/18 3:13 AM:
--

I think I can fix it.

 

My opinion:

According to java api, [https://docs.oracle.com/javase/8/docs/api/] says:
{quote}_It is strongly recommended, but not strictly required that 
{{(x.compareTo(y)==0) == (x.equals(y))}}. Generally speaking, any class that 
implements the {{Comparable}} interface and violates this condition should 
clearly indicate this fact. The recommended language is "Note: this class has a 
natural ordering that is inconsistent with equals."_
{quote}
And 
[https://dzone.com/articles/the-hidden-contract-between-equals-and-comparable]

 

I think I should provide both implementation of equals and hashCode.Maybe I can 
delegate equal to  compareTo(obj) == 0.Like:
{quote}public boolean equals(Object o){

  if (this == o) return true;     
  if (o == null || getClass() != o.getClass())return false;     
    MergeSlot mergeSlot = (MergeSlot) o;     
    return compareTo(mergeSlot) == 0; 
}{quote}
 
 


was (Author: hit_lacus):
I think I can fix it.

 

My opinion:

According to java api, https://docs.oracle.com/javase/8/docs/api/ says:
{quote}_It is strongly recommended, but not strictly required that 
{{(x.compareTo(y)==0) == (x.equals(y))}}. Generally speaking, any class that 
implements the {{Comparable}} interface and violates this condition should 
clearly indicate this fact. The recommended language is "Note: this class has a 
natural ordering that is inconsistent with equals."_
{quote}
And 
[https://dzone.com/articles/the-hidden-contract-between-equals-and-comparable]

 

I think I should provide both implementation of equals and hashCode.Maybe I can 
delegate equal to  compareTo(obj) == 0.Like:
{quote}public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    MergeSlot mergeSlot = (MergeSlot) o;
    return compareTo(mergeSlot) == 0;
}
{quote}

> compareTo method should be paired with equals method
> 
>
> Key: KYLIN-3581
> URL: https://issues.apache.org/jira/browse/KYLIN-3581
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> DoggedCubeBuilder$MergeSlot and InMemCubeBuilder$CuboidTask define compareTo 
> method.
> They should define equals method as well.



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


[jira] [Comment Edited] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu edited comment on KYLIN-3581 at 9/25/18 3:08 AM:
--

I think I can fix it.

 

My opinion:

According to java api, https://docs.oracle.com/javase/8/docs/api/ says:
{quote}_It is strongly recommended, but not strictly required that 
{{(x.compareTo(y)==0) == (x.equals(y))}}. Generally speaking, any class that 
implements the {{Comparable}} interface and violates this condition should 
clearly indicate this fact. The recommended language is "Note: this class has a 
natural ordering that is inconsistent with equals."_
{quote}
And 
[https://dzone.com/articles/the-hidden-contract-between-equals-and-comparable]

 

I think I should provide both implementation of equals and hashCode.Maybe I can 
delegate equal to  compareTo(obj) == 0.Like:
{quote}public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    MergeSlot mergeSlot = (MergeSlot) o;
    return compareTo(mergeSlot) == 0;
}
{quote}


was (Author: hit_lacus):
I think I can fix it.

> compareTo method should be paired with equals method
> 
>
> Key: KYLIN-3581
> URL: https://issues.apache.org/jira/browse/KYLIN-3581
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> DoggedCubeBuilder$MergeSlot and InMemCubeBuilder$CuboidTask define compareTo 
> method.
> They should define equals method as well.



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


[jira] [Updated] (KYLIN-3578) Do not synchronize on the intrinsic locks of high-level concurrency objects

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu updated KYLIN-3578:

Fix Version/s: v2.6.0

> Do not synchronize on the intrinsic locks of high-level concurrency objects
> ---
>
> Key: KYLIN-3578
> URL: https://issues.apache.org/jira/browse/KYLIN-3578
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Major
> Fix For: v2.6.0
>
>
> From 
> core-common/src/main/java/org/apache/kylin/common/util/MemoryBudgetController.java
>  :
> {code}
> private final ReentrantLock lock = new ReentrantLock();
> ...
> synchronized (lock) {
> {code}
> See the following for why such practice is to be avoided:
> https://wiki.sei.cmu.edu/confluence/display/java/LCK03-J.+Do+not+synchronize+on+the+intrinsic+locks+of+high-level+concurrency+objects



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


[jira] [Assigned] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu reassigned KYLIN-3574:
---

Assignee: XiaoXiang Yu

> Unclosed lookup table in DictionaryGeneratorCLI#processSegment
> --
>
> Key: KYLIN-3574
> URL: https://issues.apache.org/jira/browse/KYLIN-3574
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> Here is related code:
> {code}
> JoinDesc join = 
> cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
> cubeMgr.getLookupTable(cubeSeg, join);
> {code}
> The returned lookup table should be closed.



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


[jira] [Updated] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu updated KYLIN-3574:

Fix Version/s: v2.5.1
   v2.4.2

> Unclosed lookup table in DictionaryGeneratorCLI#processSegment
> --
>
> Key: KYLIN-3574
> URL: https://issues.apache.org/jira/browse/KYLIN-3574
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> Here is related code:
> {code}
> JoinDesc join = 
> cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
> cubeMgr.getLookupTable(cubeSeg, join);
> {code}
> The returned lookup table should be closed.



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


[jira] [Updated] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu updated KYLIN-3581:

Fix Version/s: v2.5.1
   v2.4.2

> compareTo method should be paired with equals method
> 
>
> Key: KYLIN-3581
> URL: https://issues.apache.org/jira/browse/KYLIN-3581
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> DoggedCubeBuilder$MergeSlot and InMemCubeBuilder$CuboidTask define compareTo 
> method.
> They should define equals method as well.



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


[jira] [Updated] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu updated KYLIN-3582:

Fix Version/s: v2.5.1
   v2.4.2

> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
> Fix For: v2.4.2, v2.5.1
>
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Commented] (KYLIN-3589) Different type is used to check presence in Collection in AclPermissionUtil

2018-09-24 Thread Yichen Zhou (JIRA)


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

Yichen Zhou commented on KYLIN-3589:


I will fix this.

> Different type is used to check presence in Collection in AclPermissionUtil
> ---
>
> Key: KYLIN-3589
> URL: https://issues.apache.org/jira/browse/KYLIN-3589
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Yichen Zhou
>Priority: Major
>
> Here is related code:
> {code}
> public static List transformAuthorities(Collection GrantedAuthority> authorities) {
> List ret = new ArrayList();
> for (GrantedAuthority auth : authorities) {
> if (!authorities.contains(auth.getAuthority())) {
> {code}
> auth.getAuthority() shouldn't be used to check presence in the Collection 
> since it is not of GrantedAuthority type.



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


[jira] [Commented] (KYLIN-3590) Missing argument to exception message String in ModelController

2018-09-24 Thread Yichen Zhou (JIRA)


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

Yichen Zhou commented on KYLIN-3590:


I will fix this.

> Missing argument to exception message String in ModelController
> ---
>
> Key: KYLIN-3590
> URL: https://issues.apache.org/jira/browse/KYLIN-3590
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Major
>
> Here is related code:
> {code}
> String.format(Locale.ROOT,
> "Invalid model name %s, only letters, numbers and 
> underscore " + "supported."),
> {code}
> There is no argument for '%s'



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


[jira] [Assigned] (KYLIN-3590) Missing argument to exception message String in ModelController

2018-09-24 Thread Yichen Zhou (JIRA)


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

Yichen Zhou reassigned KYLIN-3590:
--

Assignee: Yichen Zhou

> Missing argument to exception message String in ModelController
> ---
>
> Key: KYLIN-3590
> URL: https://issues.apache.org/jira/browse/KYLIN-3590
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Yichen Zhou
>Priority: Major
>
> Here is related code:
> {code}
> String.format(Locale.ROOT,
> "Invalid model name %s, only letters, numbers and 
> underscore " + "supported."),
> {code}
> There is no argument for '%s'



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


[jira] [Assigned] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu reassigned KYLIN-3582:
---

Assignee: XiaoXiang Yu

> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Assigned] (KYLIN-3589) Different type is used to check presence in Collection in AclPermissionUtil

2018-09-24 Thread Yichen Zhou (JIRA)


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

Yichen Zhou reassigned KYLIN-3589:
--

Assignee: Yichen Zhou

> Different type is used to check presence in Collection in AclPermissionUtil
> ---
>
> Key: KYLIN-3589
> URL: https://issues.apache.org/jira/browse/KYLIN-3589
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Yichen Zhou
>Priority: Major
>
> Here is related code:
> {code}
> public static List transformAuthorities(Collection GrantedAuthority> authorities) {
> List ret = new ArrayList();
> for (GrantedAuthority auth : authorities) {
> if (!authorities.contains(auth.getAuthority())) {
> {code}
> auth.getAuthority() shouldn't be used to check presence in the Collection 
> since it is not of GrantedAuthority type.



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


[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message

2018-09-24 Thread Yichen Zhou (JIRA)


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

Yichen Zhou commented on KYLIN-3587:


I will fix this.

> Null value is used in IllegalStateException message
> ---
>
> Key: KYLIN-3587
> URL: https://issues.apache.org/jira/browse/KYLIN-3587
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Yichen Zhou
>Priority: Minor
>
> In ProjectManager :
> {code}
> TableDesc table = metaMgr.getTableDesc(tableId, projectName);
> if (table == null) {
> throw new IllegalStateException("Cannot find table '" + 
> table + "' in metadata manager");
> {code}
> Since table is null, the exception message is not helpful.
> It seems including tableId in the message is better.



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


[jira] [Assigned] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu reassigned KYLIN-3581:
---

Assignee: XiaoXiang Yu

> compareTo method should be paired with equals method
> 
>
> Key: KYLIN-3581
> URL: https://issues.apache.org/jira/browse/KYLIN-3581
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Minor
>
> DoggedCubeBuilder$MergeSlot and InMemCubeBuilder$CuboidTask define compareTo 
> method.
> They should define equals method as well.



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


[jira] [Assigned] (KYLIN-3578) Do not synchronize on the intrinsic locks of high-level concurrency objects

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu reassigned KYLIN-3578:
---

Assignee: XiaoXiang Yu

> Do not synchronize on the intrinsic locks of high-level concurrency objects
> ---
>
> Key: KYLIN-3578
> URL: https://issues.apache.org/jira/browse/KYLIN-3578
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: XiaoXiang Yu
>Priority: Major
>
> From 
> core-common/src/main/java/org/apache/kylin/common/util/MemoryBudgetController.java
>  :
> {code}
> private final ReentrantLock lock = new ReentrantLock();
> ...
> synchronized (lock) {
> {code}
> See the following for why such practice is to be avoided:
> https://wiki.sei.cmu.edu/confluence/display/java/LCK03-J.+Do+not+synchronize+on+the+intrinsic+locks+of+high-level+concurrency+objects



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


[jira] [Assigned] (KYLIN-3587) Null value is used in IllegalStateException message

2018-09-24 Thread Yichen Zhou (JIRA)


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

Yichen Zhou reassigned KYLIN-3587:
--

Assignee: Yichen Zhou

> Null value is used in IllegalStateException message
> ---
>
> Key: KYLIN-3587
> URL: https://issues.apache.org/jira/browse/KYLIN-3587
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Yichen Zhou
>Priority: Minor
>
> In ProjectManager :
> {code}
> TableDesc table = metaMgr.getTableDesc(tableId, projectName);
> if (table == null) {
> throw new IllegalStateException("Cannot find table '" + 
> table + "' in metadata manager");
> {code}
> Since table is null, the exception message is not helpful.
> It seems including tableId in the message is better.



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


[jira] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3574:
---

hit-lacus opened a new pull request #246: KYLIN-3574 Close underlying resource 
of lookup table
URL: https://github.com/apache/kylin/pull/246
 
 
   HTable should be closed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Unclosed lookup table in DictionaryGeneratorCLI#processSegment
> --
>
> Key: KYLIN-3574
> URL: https://issues.apache.org/jira/browse/KYLIN-3574
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> JoinDesc join = 
> cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
> cubeMgr.getLookupTable(cubeSeg, join);
> {code}
> The returned lookup table should be closed.



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


[jira] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3574:
---

asfgit commented on issue #246: KYLIN-3574 Close underlying resource of lookup 
table
URL: https://github.com/apache/kylin/pull/246#issuecomment-424175245
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Unclosed lookup table in DictionaryGeneratorCLI#processSegment
> --
>
> Key: KYLIN-3574
> URL: https://issues.apache.org/jira/browse/KYLIN-3574
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> JoinDesc join = 
> cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
> cubeMgr.getLookupTable(cubeSeg, join);
> {code}
> The returned lookup table should be closed.



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


[jira] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3574:
---

asfgit commented on issue #246: KYLIN-3574 Close underlying resource of lookup 
table
URL: https://github.com/apache/kylin/pull/246#issuecomment-424175244
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Unclosed lookup table in DictionaryGeneratorCLI#processSegment
> --
>
> Key: KYLIN-3574
> URL: https://issues.apache.org/jira/browse/KYLIN-3574
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> JoinDesc join = 
> cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
> cubeMgr.getLookupTable(cubeSeg, join);
> {code}
> The returned lookup table should be closed.



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


[jira] [Commented] (KYLIN-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3586:
---

asfgit commented on issue #245: KYLIN-3586
URL: https://github.com/apache/kylin/pull/245#issuecomment-424172928
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Boxing/unboxing to parse a primitive is suboptimal
> --
>
> Key: KYLIN-3586
> URL: https://issues.apache.org/jira/browse/KYLIN-3586
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Lijun Cao
>Priority: Major
>
> An example is from HBaseLookupRowEncoder:
> {code}
> int valIdx = Integer.valueOf(Bytes.toString(qualifier));
> {code}
> valueOf returns an Integer object which would be unboxed and assigned to 
> valIdx.
> Integer.parseInt() should be used instead.



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


[jira] [Commented] (KYLIN-3569) Server with query mode still can submit/build job

2018-09-24 Thread Zongwei Li (JIRA)


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

Zongwei Li commented on KYLIN-3569:
---

Sure, let me try it.

> Server with query mode still can submit/build job
> -
>
> Key: KYLIN-3569
> URL: https://issues.apache.org/jira/browse/KYLIN-3569
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine, REST Service, Security
>Affects Versions: v2.4.1
> Environment: CentOS 6.7, HBase 1.2.0+cdh5.14.2+456
>Reporter: Zongwei Li
>Priority: Major
>  Labels: build, documentation, security
> Attachments: kylinCode.png
>
>
> From the Docs at Kylin site, 
> [http://kylin.apache.org/docs24/install/kylin_cluster.html]
>  * *query* : run query engine only; Kylin query engine accepts and answers 
> your SQL queries
> It seems that if server set with 'kylin.server.mode=query', it should not can 
> support submit/build job. But as we tested, server with query mode still can 
> submit/build job from UI or RESTFul API. 
> We analyzed the source code, found that there didn't exist any protect logic 
> to check whether server is at 'job' or 'build' mode in service layer for 
> submit/build job. Already attach the source code in this issue.
> This issue really confused us, because we considered query server cannot 
> build job in Kylin Docs and many Kylin books. And query server will exposed 
> to 3rd BI tool to query the data, if we forget to configure the suitable ACL 
> for Cubes, then the 3rd BI tool can trigger build job in any time.



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


[jira] [Resolved] (KYLIN-3565) User login error message is inaccurate

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI resolved KYLIN-3565.
-
Resolution: Fixed

> User login error message is inaccurate
> --
>
> Key: KYLIN-3565
> URL: https://issues.apache.org/jira/browse/KYLIN-3565
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service, Web 
>Affects Versions: v2.4.1
> Environment: CentOS 6.7, HBase 1.2.0+cdh5.14.2+456
>Reporter: Marc Wu
>Assignee: Roger
>Priority: Minor
>  Labels: usability
> Fix For: v2.5.1
>
> Attachments: 2018-09-17_16-56-12.png, 2018-09-17_16-56-38.png, 
> 2018-09-17_16-59-31.png, image-2018-09-17-20-22-20-294.png, 
> image-2018-09-17-20-25-54-896.png
>
>
> Hi Kylin team,
>  
> We found one issue when log in Kylin. The error message will misunderstood 
> user.
>  
> I couldn't log in Kylin even I input correct username & password (enable 
> LDAP).
> So I checked the log on server, it showed me that there exist HBase 
> connection issues.
> Root cause is that the HBase server which Kylin used as metadata server is 
> down, but the login message showed me that I should check my username or 
> password. It's really confusing.
> Then I read some source codes about login module, and found out Kylin shares 
> the same error message for different cases.
>  
> We suggested two options:
>  # redirect to global error page when HBase connection fail after login, 
> shows error message(e.g. System Error, please contact system administrator).
>  # enhance the error code for login logic, make the error message more 
> specific.
>  
> There are login error message and the log. And I log in successfully after 
> recover HBase servers.
> !image-2018-09-17-20-25-54-896.png!!image-2018-09-17-20-22-20-294.png!



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


[jira] [Resolved] (KYLIN-3567) Change scala dependency to provided

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI resolved KYLIN-3567.
-
Resolution: Fixed

> Change scala dependency to provided
> ---
>
> Key: KYLIN-3567
> URL: https://issues.apache.org/jira/browse/KYLIN-3567
> Project: Kylin
>  Issue Type: Bug
>Reporter: Chao Long
>Assignee: Chao Long
>Priority: Minor
> Fix For: v2.5.1
>
>
> The scope of scala dependency in "engine-spark" module should be "provided".
> 
>  org.scala-lang
>  scala-library
> 
> 
>  org.scala-lang
>  scala-compiler
> 
> 
>  org.scala-lang
>  scala-reflect
> 



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


[jira] [Commented] (KYLIN-3569) Server with query mode still can submit/build job

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI commented on KYLIN-3569:
-

Hi Zongwei, do you want to contribute a patch?

> Server with query mode still can submit/build job
> -
>
> Key: KYLIN-3569
> URL: https://issues.apache.org/jira/browse/KYLIN-3569
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine, REST Service, Security
>Affects Versions: v2.4.1
> Environment: CentOS 6.7, HBase 1.2.0+cdh5.14.2+456
>Reporter: Zongwei Li
>Priority: Major
>  Labels: build, documentation, security
> Attachments: kylinCode.png
>
>
> From the Docs at Kylin site, 
> [http://kylin.apache.org/docs24/install/kylin_cluster.html]
>  * *query* : run query engine only; Kylin query engine accepts and answers 
> your SQL queries
> It seems that if server set with 'kylin.server.mode=query', it should not can 
> support submit/build job. But as we tested, server with query mode still can 
> submit/build job from UI or RESTFul API. 
> We analyzed the source code, found that there didn't exist any protect logic 
> to check whether server is at 'job' or 'build' mode in service layer for 
> submit/build job. Already attach the source code in this issue.
> This issue really confused us, because we considered query server cannot 
> build job in Kylin Docs and many Kylin books. And query server will exposed 
> to 3rd BI tool to query the data, if we forget to configure the suitable ACL 
> for Cubes, then the 3rd BI tool can trigger build job in any time.



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


[jira] [Resolved] (KYLIN-3576) IllegalArgumentException: No enum constant org.apache.kylin.rest.service.JobService.JobSearchMode.

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI resolved KYLIN-3576.
-
Resolution: Fixed

> IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
> --
>
> Key: KYLIN-3576
> URL: https://issues.apache.org/jira/browse/KYLIN-3576
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine
>Reporter: Shaofeng SHI
>Assignee: Shaofeng SHI
>Priority: Minor
> Fix For: v2.6.0
>
>
> {code:java}
> 2018-09-22 19:58:20,258 INFO  [main] execution.ExecutableManager:69 : Using 
> metadata url: ../examples/test_metadata/
> 2018-09-22 19:58:20,265 ERROR [main] controller.JobController:81 : Invalid 
> value for JobSearchMode: '', skip it.
> java.lang.IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
>   at java.lang.Enum.valueOf(Enum.java:238)
>   at 
> org.apache.kylin.rest.service.JobService$JobSearchMode.valueOf(JobService.java:1236)
>   at 
> org.apache.kylin.rest.controller.JobController.list(JobController.java:79)
>   at 
> org.apache.kylin.rest.controller.JobControllerTest.testBasics(JobControllerTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at 
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
>   at 
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> {code}



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


[jira] [Commented] (KYLIN-3576) IllegalArgumentException: No enum constant org.apache.kylin.rest.service.JobService.JobSearchMode.

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI commented on KYLIN-3576:
-

These two exception trace are from test case which is meaningless (not happen 
in real case). I removed the error trace to avoid confusing.

> IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
> --
>
> Key: KYLIN-3576
> URL: https://issues.apache.org/jira/browse/KYLIN-3576
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine
>Reporter: Shaofeng SHI
>Assignee: Shaofeng SHI
>Priority: Minor
> Fix For: v2.6.0
>
>
> {code:java}
> 2018-09-22 19:58:20,258 INFO  [main] execution.ExecutableManager:69 : Using 
> metadata url: ../examples/test_metadata/
> 2018-09-22 19:58:20,265 ERROR [main] controller.JobController:81 : Invalid 
> value for JobSearchMode: '', skip it.
> java.lang.IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
>   at java.lang.Enum.valueOf(Enum.java:238)
>   at 
> org.apache.kylin.rest.service.JobService$JobSearchMode.valueOf(JobService.java:1236)
>   at 
> org.apache.kylin.rest.controller.JobController.list(JobController.java:79)
>   at 
> org.apache.kylin.rest.controller.JobControllerTest.testBasics(JobControllerTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at 
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
>   at 
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> {code}



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


[jira] [Updated] (KYLIN-3576) IllegalArgumentException: No enum constant org.apache.kylin.rest.service.JobService.JobSearchMode.

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI updated KYLIN-3576:

Fix Version/s: v2.6.0

> IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
> --
>
> Key: KYLIN-3576
> URL: https://issues.apache.org/jira/browse/KYLIN-3576
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine
>Reporter: Shaofeng SHI
>Assignee: Shaofeng SHI
>Priority: Minor
> Fix For: v2.6.0
>
>
> {code:java}
> 2018-09-22 19:58:20,258 INFO  [main] execution.ExecutableManager:69 : Using 
> metadata url: ../examples/test_metadata/
> 2018-09-22 19:58:20,265 ERROR [main] controller.JobController:81 : Invalid 
> value for JobSearchMode: '', skip it.
> java.lang.IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
>   at java.lang.Enum.valueOf(Enum.java:238)
>   at 
> org.apache.kylin.rest.service.JobService$JobSearchMode.valueOf(JobService.java:1236)
>   at 
> org.apache.kylin.rest.controller.JobController.list(JobController.java:79)
>   at 
> org.apache.kylin.rest.controller.JobControllerTest.testBasics(JobControllerTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at 
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
>   at 
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> {code}



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


[jira] [Commented] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3582:
---

shaofengshi closed pull request #244: KYLIN-3582 String compare should use 
equals method
URL: https://github.com/apache/kylin/pull/244
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/core-metrics/src/main/java/org/apache/kylin/metrics/lib/impl/RecordEvent.java 
b/core-metrics/src/main/java/org/apache/kylin/metrics/lib/impl/RecordEvent.java
index 894386ee9b..6452d78242 100644
--- 
a/core-metrics/src/main/java/org/apache/kylin/metrics/lib/impl/RecordEvent.java
+++ 
b/core-metrics/src/main/java/org/apache/kylin/metrics/lib/impl/RecordEvent.java
@@ -262,11 +262,10 @@ public String toString() {
 
 public RecordReserveKeyEnum getByKey(String key) {
 for (RecordReserveKeyEnum reserveKey : 
RecordReserveKeyEnum.values()) {
-if (reserveKey.reserveKey == key) {
+if (reserveKey.reserveKey.equals(key)) {
 return reserveKey;
 }
 }
-
 return null;
 }
 }


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Commented] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3582:


Commit d8c2a282930adb0d93e827ed014fbe7ceda69c09 in kylin's branch 
refs/heads/master from hit-lacus
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=d8c2a28 ]

KYLIN-3582 String compare should use equals method


> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Commented] (KYLIN-3590) Missing argument to exception message String in ModelController

2018-09-24 Thread Ted Yu (JIRA)


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

Ted Yu commented on KYLIN-3590:
---

There is similar issue in ProjectController#saveProject

> Missing argument to exception message String in ModelController
> ---
>
> Key: KYLIN-3590
> URL: https://issues.apache.org/jira/browse/KYLIN-3590
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Major
>
> Here is related code:
> {code}
> String.format(Locale.ROOT,
> "Invalid model name %s, only letters, numbers and 
> underscore " + "supported."),
> {code}
> There is no argument for '%s'



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


[jira] [Created] (KYLIN-3590) Missing argument to exception message String in ModelController

2018-09-24 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3590:
-

 Summary: Missing argument to exception message String in 
ModelController
 Key: KYLIN-3590
 URL: https://issues.apache.org/jira/browse/KYLIN-3590
 Project: Kylin
  Issue Type: Bug
Reporter: Ted Yu


Here is related code:
{code}
String.format(Locale.ROOT,
"Invalid model name %s, only letters, numbers and 
underscore " + "supported."),
{code}
There is no argument for '%s'



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


[jira] [Created] (KYLIN-3589) Different type is used to check presence in Collection in AclPermissionUtil

2018-09-24 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3589:
-

 Summary: Different type is used to check presence in Collection in 
AclPermissionUtil
 Key: KYLIN-3589
 URL: https://issues.apache.org/jira/browse/KYLIN-3589
 Project: Kylin
  Issue Type: Bug
Reporter: Ted Yu


Here is related code:
{code}
public static List transformAuthorities(Collection authorities) {
List ret = new ArrayList();
for (GrantedAuthority auth : authorities) {
if (!authorities.contains(auth.getAuthority())) {
{code}
auth.getAuthority() shouldn't be used to check presence in the Collection since 
it is not of GrantedAuthority type.



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


[jira] [Created] (KYLIN-3588) Potentially duplicate put to RemoveBlackoutRealizationsRule#filters map

2018-09-24 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3588:
-

 Summary: Potentially duplicate put to 
RemoveBlackoutRealizationsRule#filters map
 Key: KYLIN-3588
 URL: https://issues.apache.org/jira/browse/KYLIN-3588
 Project: Kylin
  Issue Type: Bug
Reporter: Ted Yu


Here is related code:
{code}
IRealizationFilter filter = filters.get(conf);
if (filter == null) {
try {
Class clz = 
ClassUtil.forName(conf.getQueryRealizationFilter(), IRealizationFilter.class);
filter = 
clz.getConstructor(KylinConfig.class).newInstance(conf);
} catch (Exception e) {
throw new RuntimeException(e);
}
filters.put(conf, filter);
{code}
Two threads may find out there is no filter for conf, they would proceed with 
creation of IRealizationFilter instances and try to put into the map.



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


[jira] [Created] (KYLIN-3587) Null value is used in IllegalStateException message

2018-09-24 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3587:
-

 Summary: Null value is used in IllegalStateException message
 Key: KYLIN-3587
 URL: https://issues.apache.org/jira/browse/KYLIN-3587
 Project: Kylin
  Issue Type: Bug
Reporter: Ted Yu


In ProjectManager :
{code}
TableDesc table = metaMgr.getTableDesc(tableId, projectName);
if (table == null) {
throw new IllegalStateException("Cannot find table '" + 
table + "' in metadata manager");
{code}
Since table is null, the exception message is not helpful.
It seems including tableId in the message is better.



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


[jira] [Commented] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3582:
---

asfgit commented on issue #244: KYLIN-3582 String compare should use equals 
method
URL: https://github.com/apache/kylin/pull/244#issuecomment-424014580
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Commented] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3582:
---

hit-lacus opened a new pull request #244: KYLIN-3582 String compare should use 
equals method
URL: https://github.com/apache/kylin/pull/244
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Commented] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3582:
---

asfgit commented on issue #244: KYLIN-3582 String compare should use equals 
method
URL: https://github.com/apache/kylin/pull/244#issuecomment-424014579
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu commented on KYLIN-3574:
-

I take it.

> Unclosed lookup table in DictionaryGeneratorCLI#processSegment
> --
>
> Key: KYLIN-3574
> URL: https://issues.apache.org/jira/browse/KYLIN-3574
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> JoinDesc join = 
> cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
> cubeMgr.getLookupTable(cubeSeg, join);
> {code}
> The returned lookup table should be closed.



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


[jira] [Assigned] (KYLIN-3576) IllegalArgumentException: No enum constant org.apache.kylin.rest.service.JobService.JobSearchMode.

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI reassigned KYLIN-3576:
---

Assignee: Shaofeng SHI

> IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
> --
>
> Key: KYLIN-3576
> URL: https://issues.apache.org/jira/browse/KYLIN-3576
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine
>Reporter: Shaofeng SHI
>Assignee: Shaofeng SHI
>Priority: Minor
>
> {code:java}
> 2018-09-22 19:58:20,258 INFO  [main] execution.ExecutableManager:69 : Using 
> metadata url: ../examples/test_metadata/
> 2018-09-22 19:58:20,265 ERROR [main] controller.JobController:81 : Invalid 
> value for JobSearchMode: '', skip it.
> java.lang.IllegalArgumentException: No enum constant 
> org.apache.kylin.rest.service.JobService.JobSearchMode.
>   at java.lang.Enum.valueOf(Enum.java:238)
>   at 
> org.apache.kylin.rest.service.JobService$JobSearchMode.valueOf(JobService.java:1236)
>   at 
> org.apache.kylin.rest.controller.JobController.list(JobController.java:79)
>   at 
> org.apache.kylin.rest.controller.JobControllerTest.testBasics(JobControllerTest.java:103)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at 
> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
>   at 
> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
> {code}



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


[jira] [Resolved] (KYLIN-3546) Kylin doesn't persist FK to intermediate table if FK is not a dimension

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI resolved KYLIN-3546.
-
Resolution: Fixed

> Kylin doesn't persist FK to intermediate table if FK is not a dimension
> ---
>
> Key: KYLIN-3546
> URL: https://issues.apache.org/jira/browse/KYLIN-3546
> Project: Kylin
>  Issue Type: Bug
>  Components: Streaming
>Affects Versions: v2.4.0
>Reporter: wlxie
>Assignee: XiaoXiang Yu
>Priority: Major
> Fix For: v2.4.2, v2.5.1
>
> Attachments: base_2018_09_18_09_23_53.zip, kylin_kafka.txt
>
>
> 各位老师好,
>    在使用kafka的streaming 
> table作为事实表创建cube时候,如果维度和指标都不选事实表中的关联键的话,在跑cube作业的时候,创建保存kafka数据的临时表会没有这个关联键,导致后面创建关联表的临时表会报错,具体报错信息请查看附件,谢谢。



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


[jira] [Commented] (KYLIN-3515) Cubing jobs may interfere with each other if use same hive view

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3515:


Commit c40188f40de14f7800dab58632e30b3ee42b6f39 in kylin's branch 
refs/heads/2.5.x from [~nichunen]
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=c40188f ]

KYLIN-3515 Add uuid for materialized table of hive view


> Cubing jobs may interfere with each other if use same hive view
> 
>
> Key: KYLIN-3515
> URL: https://issues.apache.org/jira/browse/KYLIN-3515
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine
>Affects Versions: v2.4.0
>Reporter: nichunen
>Assignee: nichunen
>Priority: Major
> Fix For: v2.6.0
>
> Attachments: Getting started
>
>
> The root cause is for hive view, during cubing, kylin will materialize the 
> view by creating an intermediate table(drop intermediate table first). The 
> intermediate tables' name is like kylin_intermediate_\{view_name}, that means 
> jobs will create tables with the same name if the same view is referenced. So 
> one job's intermediate table may be dropped by another job, in such cases, 
> error like "table not found" will happen



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


[jira] [Commented] (KYLIN-3546) Kylin doesn't persist FK to intermediate table if FK is not a dimension

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3546:


Commit 807dafcf3610f5b8210b6ad98626af5aa1af0363 in kylin's branch 
refs/heads/2.5.x from hit-lacus
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=807dafc ]

KYLIN-3546 Add column which belongs to root fact table in join relation but lost


> Kylin doesn't persist FK to intermediate table if FK is not a dimension
> ---
>
> Key: KYLIN-3546
> URL: https://issues.apache.org/jira/browse/KYLIN-3546
> Project: Kylin
>  Issue Type: Bug
>  Components: Streaming
>Affects Versions: v2.4.0
>Reporter: wlxie
>Assignee: XiaoXiang Yu
>Priority: Major
> Fix For: v2.4.2, v2.5.1
>
> Attachments: base_2018_09_18_09_23_53.zip, kylin_kafka.txt
>
>
> 各位老师好,
>    在使用kafka的streaming 
> table作为事实表创建cube时候,如果维度和指标都不选事实表中的关联键的话,在跑cube作业的时候,创建保存kafka数据的临时表会没有这个关联键,导致后面创建关联表的临时表会报错,具体报错信息请查看附件,谢谢。



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


[jira] [Commented] (KYLIN-3546) Kylin doesn't persist FK to intermediate table if FK is not a dimension

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3546:
---

shaofengshi closed pull request #241: KYLIN-3546 Add column which belongs to 
root fact table in join relation but lost
URL: https://github.com/apache/kylin/pull/241
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaInputBase.java 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaInputBase.java
index a624f8fbb8..cb2e14ce5c 100644
--- 
a/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaInputBase.java
+++ 
b/source-kafka/src/main/java/org/apache/kylin/source/kafka/KafkaInputBase.java
@@ -18,8 +18,11 @@
 
 package org.apache.kylin.source.kafka;
 
+import java.util.LinkedList;
 import java.util.List;
+import java.util.Set;
 
+import com.google.common.collect.Sets;
 import org.apache.kylin.cube.CubeSegment;
 import org.apache.kylin.cube.model.CubeDesc;
 import org.apache.kylin.engine.mr.JobBuilderSupport;
@@ -32,7 +35,10 @@
 import org.apache.kylin.metadata.model.DataModelDesc;
 import org.apache.kylin.metadata.model.IJoinedFlatTableDesc;
 import org.apache.kylin.metadata.model.ISegment;
+import org.apache.kylin.metadata.model.JoinDesc;
+import org.apache.kylin.metadata.model.JoinTableDesc;
 import org.apache.kylin.metadata.model.SegmentRange;
+import org.apache.kylin.metadata.model.TableRef;
 import org.apache.kylin.metadata.model.TblColRef;
 import org.apache.kylin.source.hive.CreateFlatHiveTableStep;
 import org.apache.kylin.source.hive.GarbageCollectionStep;
@@ -89,7 +95,23 @@ public DataModelDesc getDataModel() {
 
 @Override
 public List getAllColumns() {
-return flatDesc.getFactColumns();
+final Set factTableColumnSet = Sets.newHashSet();
+TableRef rootFactTable = getDataModel().getRootFactTable();
+for (TblColRef colRef : flatDesc.getAllColumns()) {
+if (colRef.getTableRef().equals(rootFactTable)) {
+factTableColumnSet.add(colRef);
+}
+}
+// Add column which belongs to root fact table in join 
relation but lost
+for (JoinTableDesc joinTableDesc : 
getDataModel().getJoinTables()) {
+JoinDesc join = joinTableDesc.getJoin();
+for (TblColRef colRef : join.getForeignKeyColumns()) {
+if (colRef.getTableRef().equals(rootFactTable)) {
+factTableColumnSet.add(colRef);
+}
+}
+}
+return new LinkedList<>(factTableColumnSet);
 }
 
 @Override


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Kylin doesn't persist FK to intermediate table if FK is not a dimension
> ---
>
> Key: KYLIN-3546
> URL: https://issues.apache.org/jira/browse/KYLIN-3546
> Project: Kylin
>  Issue Type: Bug
>  Components: Streaming
>Affects Versions: v2.4.0
>Reporter: wlxie
>Assignee: XiaoXiang Yu
>Priority: Major
> Fix For: v2.4.2, v2.5.1
>
> Attachments: base_2018_09_18_09_23_53.zip, kylin_kafka.txt
>
>
> 各位老师好,
>    在使用kafka的streaming 
> table作为事实表创建cube时候,如果维度和指标都不选事实表中的关联键的话,在跑cube作业的时候,创建保存kafka数据的临时表会没有这个关联键,导致后面创建关联表的临时表会报错,具体报错信息请查看附件,谢谢。



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


[jira] [Commented] (KYLIN-3546) Kylin doesn't persist FK to intermediate table if FK is not a dimension

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3546:


Commit 98833e041e05667948038538d6a2551094d419fb in kylin's branch 
refs/heads/master from hit-lacus
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=98833e0 ]

KYLIN-3546 Add column which belongs to root fact table in join relation but lost


> Kylin doesn't persist FK to intermediate table if FK is not a dimension
> ---
>
> Key: KYLIN-3546
> URL: https://issues.apache.org/jira/browse/KYLIN-3546
> Project: Kylin
>  Issue Type: Bug
>  Components: Streaming
>Affects Versions: v2.4.0
>Reporter: wlxie
>Assignee: XiaoXiang Yu
>Priority: Major
> Fix For: v2.4.2, v2.5.1
>
> Attachments: base_2018_09_18_09_23_53.zip, kylin_kafka.txt
>
>
> 各位老师好,
>    在使用kafka的streaming 
> table作为事实表创建cube时候,如果维度和指标都不选事实表中的关联键的话,在跑cube作业的时候,创建保存kafka数据的临时表会没有这个关联键,导致后面创建关联表的临时表会报错,具体报错信息请查看附件,谢谢。



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


[jira] [Assigned] (KYLIN-3560) Should not depend on personal repository

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI reassigned KYLIN-3560:
---

Assignee: Chao Long

> Should not depend on personal repository
> 
>
> Key: KYLIN-3560
> URL: https://issues.apache.org/jira/browse/KYLIN-3560
> Project: Kylin
>  Issue Type: Task
>Reporter: Ted Yu
>Assignee: Chao Long
>Priority: Major
> Fix For: v2.6.0
>
>
> In core-common/pom.xml:
> {code}
> com.github.joshelser
> {code}
> We shouldn't depend on personal repository.



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


[jira] [Assigned] (KYLIN-3571) Not build Spark in Kylin's binary package

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI reassigned KYLIN-3571:
---

Assignee: Chao Long

> Not build Spark in Kylin's binary package
> -
>
> Key: KYLIN-3571
> URL: https://issues.apache.org/jira/browse/KYLIN-3571
> Project: Kylin
>  Issue Type: Improvement
>  Components: Environment 
>Reporter: Shaofeng SHI
>Assignee: Chao Long
>Priority: Major
> Fix For: v2.6.0
>
>




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


[jira] [Commented] (KYLIN-3579) entrySet iterator should be used in BPUSCalculator

2018-09-24 Thread Chao Long (JIRA)


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

Chao Long commented on KYLIN-3579:
--

I would like to fix this issue.

> entrySet iterator should be used in BPUSCalculator 
> ---
>
> Key: KYLIN-3579
> URL: https://issues.apache.org/jira/browse/KYLIN-3579
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> BPUSCalculator.calculateBenefitTotal and BPUSCalculator.initCuboidAggCostMap 
> use keySet iterator where entrySet iterator should be used.
> {code}
> for (Long cuboid : cuboidAggCostMapCopy.keySet()) {
> if (cuboidAggCostMapCopy.get(cuboid) < 
> processCuboidAggCostMap.get(cuboid)) {
> {code}
> CubeCodeSystem.newMetricsAggregators has similar issue.



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


[jira] [Commented] (KYLIN-3585) Ineffective declaration of volatile field in SparkFactDistinct

2018-09-24 Thread Chao Long (JIRA)


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

Chao Long commented on KYLIN-3585:
--

I would like to fix this issue.

> Ineffective declaration of volatile field in SparkFactDistinct
> --
>
> Key: KYLIN-3585
> URL: https://issues.apache.org/jira/browse/KYLIN-3585
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> In CuboidStatCalculator :
> {code}
> private volatile HLLCounter[] cuboidsHLL;
> {code}
> Though the array is declared volatile, the array elements are not.



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


[jira] [Commented] (KYLIN-3584) Incorrect lazy initialization of DefaultScheduler.INSTANCE

2018-09-24 Thread Chao Long (JIRA)


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

Chao Long commented on KYLIN-3584:
--

I would like to fix this issue.

> Incorrect lazy initialization of DefaultScheduler.INSTANCE
> --
>
> Key: KYLIN-3584
> URL: https://issues.apache.org/jira/browse/KYLIN-3584
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> public static DefaultScheduler getInstance() {
> if (INSTANCE == null) {
> INSTANCE = createInstance();
> {code}
> The check against may not be effective.



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


[jira] [Commented] (KYLIN-3583) Integer multiplication is performed where Long result is expected

2018-09-24 Thread Chao Long (JIRA)


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

Chao Long commented on KYLIN-3583:
--

I would like to fix this issue.

> Integer multiplication is performed where Long result is expected
> -
>
> Key: KYLIN-3583
> URL: https://issues.apache.org/jira/browse/KYLIN-3583
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> In RecordEventTimeDetail :
> {code}
> long timeStampForWeekBegin = timeStamp;
> timeStampForWeekBegin -= 360 * 24 * 
> (calendar.get(Calendar.DAY_OF_WEEK) - 1);
> {code}
> Casting to long should be done first before multiplication.



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


[jira] [Commented] (KYLIN-3571) Not build Spark in Kylin's binary package

2018-09-24 Thread Chao Long (JIRA)


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

Chao Long commented on KYLIN-3571:
--

I would like to fix this issue.

> Not build Spark in Kylin's binary package
> -
>
> Key: KYLIN-3571
> URL: https://issues.apache.org/jira/browse/KYLIN-3571
> Project: Kylin
>  Issue Type: Improvement
>  Components: Environment 
>Reporter: Shaofeng SHI
>Priority: Major
> Fix For: v2.6.0
>
>




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


[jira] [Commented] (KYLIN-3560) Should not depend on personal repository

2018-09-24 Thread Chao Long (JIRA)


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

Chao Long commented on KYLIN-3560:
--

I would like to fix this issue.

> Should not depend on personal repository
> 
>
> Key: KYLIN-3560
> URL: https://issues.apache.org/jira/browse/KYLIN-3560
> Project: Kylin
>  Issue Type: Task
>Reporter: Ted Yu
>Priority: Major
> Fix For: v2.6.0
>
>
> In core-common/pom.xml:
> {code}
> com.github.joshelser
> {code}
> We shouldn't depend on personal repository.



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


[jira] [Commented] (KYLIN-3445) Upgrade checkstyle version to 8.6

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3445:


Commit e093fac0aa98712560cb4438956730c849098953 in kylin's branch 
refs/heads/update_travis_maven from GinaZhai
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=e093fac ]

KYLIN-3445 Upgrade checkstyle version to 8.6


> Upgrade checkstyle version to 8.6
> -
>
> Key: KYLIN-3445
> URL: https://issues.apache.org/jira/browse/KYLIN-3445
> Project: Kylin
>  Issue Type: Improvement
>  Components: Tools, Build and Test
>Reporter: Ted Yu
>Priority: Minor
> Fix For: v2.6.0
>
>
> We should upgrade checkstyle version to 8.6+ so that we can use the "match 
> violation message to this regex" feature for suppression. 



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


[jira] [Commented] (KYLIN-3515) Cubing jobs may interfere with each other if use same hive view

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3515:


Commit cf171da0ef30fec80b21cd1cb2247d0c0bd91716 in kylin's branch 
refs/heads/update_travis_maven from [~nichunen]
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=cf171da ]

KYLIN-3515 Add uuid for materialized table of hive view


> Cubing jobs may interfere with each other if use same hive view
> 
>
> Key: KYLIN-3515
> URL: https://issues.apache.org/jira/browse/KYLIN-3515
> Project: Kylin
>  Issue Type: Bug
>  Components: Job Engine
>Affects Versions: v2.4.0
>Reporter: nichunen
>Assignee: nichunen
>Priority: Major
> Fix For: v2.6.0
>
> Attachments: Getting started
>
>
> The root cause is for hive view, during cubing, kylin will materialize the 
> view by creating an intermediate table(drop intermediate table first). The 
> intermediate tables' name is like kylin_intermediate_\{view_name}, that means 
> jobs will create tables with the same name if the same view is referenced. So 
> one job's intermediate table may be dropped by another job, in such cases, 
> error like "table not found" will happen



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


[jira] [Commented] (KYLIN-3565) User login error message is inaccurate

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3565:


Commit aee4b57ece21ad1bd5f33efd23feb79542235d91 in kylin's branch 
refs/heads/update_travis_maven from Emiya0306
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=aee4b57 ]

KYLIN-3565 User login error message is inaccurate


> User login error message is inaccurate
> --
>
> Key: KYLIN-3565
> URL: https://issues.apache.org/jira/browse/KYLIN-3565
> Project: Kylin
>  Issue Type: Bug
>  Components: REST Service, Web 
>Affects Versions: v2.4.1
> Environment: CentOS 6.7, HBase 1.2.0+cdh5.14.2+456
>Reporter: Marc Wu
>Assignee: Roger
>Priority: Minor
>  Labels: usability
> Fix For: v2.5.1
>
> Attachments: 2018-09-17_16-56-12.png, 2018-09-17_16-56-38.png, 
> 2018-09-17_16-59-31.png, image-2018-09-17-20-22-20-294.png, 
> image-2018-09-17-20-25-54-896.png
>
>
> Hi Kylin team,
>  
> We found one issue when log in Kylin. The error message will misunderstood 
> user.
>  
> I couldn't log in Kylin even I input correct username & password (enable 
> LDAP).
> So I checked the log on server, it showed me that there exist HBase 
> connection issues.
> Root cause is that the HBase server which Kylin used as metadata server is 
> down, but the login message showed me that I should check my username or 
> password. It's really confusing.
> Then I read some source codes about login module, and found out Kylin shares 
> the same error message for different cases.
>  
> We suggested two options:
>  # redirect to global error page when HBase connection fail after login, 
> shows error message(e.g. System Error, please contact system administrator).
>  # enhance the error code for login logic, make the error message more 
> specific.
>  
> There are login error message and the log. And I log in successfully after 
> recover HBase servers.
> !image-2018-09-17-20-25-54-896.png!!image-2018-09-17-20-22-20-294.png!



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


[jira] [Commented] (KYLIN-3439) configuration "kylin.web.timezone" is Inconsistent between kylin-defaults.properties and KylinConfigBase.java

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3439:


Commit dd9909ca02bf0375b588849a5fd87aad3a201fcb in kylin's branch 
refs/heads/update_travis_maven from tttMelody
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=dd9909c ]

KYLIN-3439, make default kylin.web.timezone in KylinConfigBase the same with 
kylin-defaults.properties


> configuration "kylin.web.timezone"  is Inconsistent between 
> kylin-defaults.properties and KylinConfigBase.java
> --
>
> Key: KYLIN-3439
> URL: https://issues.apache.org/jira/browse/KYLIN-3439
> Project: Kylin
>  Issue Type: Bug
>Reporter: jiatao.tao
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.6.0, v2.5.1
>
>




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


[jira] [Commented] (KYLIN-3543) Unclosed Job instance in CreateHTableJob#exportHBaseConfiguration

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3543:


Commit 6dcd79566e3a8a65650dfde3a3962bf51d52c4b6 in kylin's branch 
refs/heads/update_travis_maven from [~yichen.zhou]
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=6dcd795 ]

KYLIN-3543 Export HBase configuration only for Spark engine


> Unclosed Job instance in CreateHTableJob#exportHBaseConfiguration
> -
>
> Key: KYLIN-3543
> URL: https://issues.apache.org/jira/browse/KYLIN-3543
> Project: Kylin
>  Issue Type: Bug
>Affects Versions: v2.5.0
>Reporter: Ted Yu
>Assignee: Yichen Zhou
>Priority: Minor
> Fix For: v2.5.1
>
>
> {code}
> out = fs.create(new Path(hbaseConfPath));
> job.getConfiguration().writeXml(out);
> {code}
> The job instance should be closed upon return from the method.



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


[jira] [Commented] (KYLIN-3497) Make JDBC Module more testable

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3497:


Commit 715f819f7f8013578cbe392c7f3e2ace1bf97b38 in kylin's branch 
refs/heads/update_travis_maven from hujixu
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=715f819 ]

KYLIN-3497 Make JDBC Module more testable

De-coupling IRemoteClient with KylinConnection.
Add dependencies mocking to improve test coverage.


> Make JDBC Module more testable
> --
>
> Key: KYLIN-3497
> URL: https://issues.apache.org/jira/browse/KYLIN-3497
> Project: Kylin
>  Issue Type: Improvement
>  Components: Driver - JDBC
>Reporter: Ian Hu
>Assignee: Ian Hu
>Priority: Minor
> Fix For: v2.6.0
>
>
> While I am trying my work about KYLIN-3496, I found it is difficult to test. 
> I would offer a work to make it more testable.



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


[jira] [Commented] (KYLIN-3567) Change scala dependency to provided

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3567:


Commit 82e1c01af3dee09c0c6a417210ff5dfa47571575 in kylin's branch 
refs/heads/update_travis_maven from chao long
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=82e1c01 ]

KYLIN-3567 Change scala dependency scope to provided


> Change scala dependency to provided
> ---
>
> Key: KYLIN-3567
> URL: https://issues.apache.org/jira/browse/KYLIN-3567
> Project: Kylin
>  Issue Type: Bug
>Reporter: Chao Long
>Assignee: Chao Long
>Priority: Minor
> Fix For: v2.5.1
>
>
> The scope of scala dependency in "engine-spark" module should be "provided".
> 
>  org.scala-lang
>  scala-library
> 
> 
>  org.scala-lang
>  scala-compiler
> 
> 
>  org.scala-lang
>  scala-reflect
> 



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


[jira] [Commented] (KYLIN-3575) Unclosed Connection in DriverTest

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3575:


Commit f37be33cedba7fa4f6970d2c3082578e70a6b1a0 in kylin's branch 
refs/heads/update_travis_maven from tttMelody
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=f37be33 ]

KYLIN-3575, fix unclosed JDBC connection in DriverTest.


> Unclosed Connection in DriverTest
> -
>
> Key: KYLIN-3575
> URL: https://issues.apache.org/jira/browse/KYLIN-3575
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.6.0
>
>
> In testCalciteProps :
> {code}
> KylinConnection conn = (KylinConnection) 
> driver.connect("jdbc:kylin:test_url/test_db", props);
> {code}
> The connection should be closed upon return.



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


[jira] [Commented] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu commented on KYLIN-3581:
-

I think I can fix it.

> compareTo method should be paired with equals method
> 
>
> Key: KYLIN-3581
> URL: https://issues.apache.org/jira/browse/KYLIN-3581
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> DoggedCubeBuilder$MergeSlot and InMemCubeBuilder$CuboidTask define compareTo 
> method.
> They should define equals method as well.



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


[jira] [Commented] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu commented on KYLIN-3582:
-

I think I can fix it.

> String comparison should not use == in RecordEvent
> --
>
> Key: KYLIN-3582
> URL: https://issues.apache.org/jira/browse/KYLIN-3582
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Minor
>
> Here is related code:
> {code}
> for (RecordReserveKeyEnum reserveKey : 
> RecordReserveKeyEnum.values()) {
> if (reserveKey.reserveKey == key) {
> {code}
> equals() should be used to compare Strings.



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


[jira] [Assigned] (KYLIN-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-09-24 Thread Lijun Cao (JIRA)


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

Lijun Cao reassigned KYLIN-3586:


Assignee: Lijun Cao

> Boxing/unboxing to parse a primitive is suboptimal
> --
>
> Key: KYLIN-3586
> URL: https://issues.apache.org/jira/browse/KYLIN-3586
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Lijun Cao
>Priority: Major
>
> An example is from HBaseLookupRowEncoder:
> {code}
> int valIdx = Integer.valueOf(Bytes.toString(qualifier));
> {code}
> valueOf returns an Integer object which would be unboxed and assigned to 
> valIdx.
> Integer.parseInt() should be used instead.



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


[jira] [Assigned] (KYLIN-3580) CuboidStatsUtil#complementRowCountForMandatoryCuboids uses entrySet to add elements

2018-09-24 Thread Lijun Cao (JIRA)


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

Lijun Cao reassigned KYLIN-3580:


Assignee: Lijun Cao

> CuboidStatsUtil#complementRowCountForMandatoryCuboids uses entrySet to add 
> elements
> ---
>
> Key: KYLIN-3580
> URL: https://issues.apache.org/jira/browse/KYLIN-3580
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Lijun Cao
>Priority: Major
>
> Here is related code:
> {code}
> sortedStatsSet.addAll(statistics.entrySet());
> {code}
> The entrySet() method is allowed to return a view of the underlying Map in 
> which a single Entry object is reused and returned during the iteration.
> When iterating through such a Map, the Entry value is only valid until you 
> advance to the next iteration.



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


[jira] [Commented] (KYLIN-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-09-24 Thread Lijun Cao (JIRA)


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

Lijun Cao commented on KYLIN-3586:
--

I'll take this.

> Boxing/unboxing to parse a primitive is suboptimal
> --
>
> Key: KYLIN-3586
> URL: https://issues.apache.org/jira/browse/KYLIN-3586
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Major
>
> An example is from HBaseLookupRowEncoder:
> {code}
> int valIdx = Integer.valueOf(Bytes.toString(qualifier));
> {code}
> valueOf returns an Integer object which would be unboxed and assigned to 
> valIdx.
> Integer.parseInt() should be used instead.



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


[jira] [Commented] (KYLIN-3578) Do not synchronize on the intrinsic locks of high-level concurrency objects

2018-09-24 Thread XiaoXiang Yu (JIRA)


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

XiaoXiang Yu commented on KYLIN-3578:
-

I think I can fix it.

> Do not synchronize on the intrinsic locks of high-level concurrency objects
> ---
>
> Key: KYLIN-3578
> URL: https://issues.apache.org/jira/browse/KYLIN-3578
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Major
>
> From 
> core-common/src/main/java/org/apache/kylin/common/util/MemoryBudgetController.java
>  :
> {code}
> private final ReentrantLock lock = new ReentrantLock();
> ...
> synchronized (lock) {
> {code}
> See the following for why such practice is to be avoided:
> https://wiki.sei.cmu.edu/confluence/display/java/LCK03-J.+Do+not+synchronize+on+the+intrinsic+locks+of+high-level+concurrency+objects



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


[jira] [Commented] (KYLIN-3580) CuboidStatsUtil#complementRowCountForMandatoryCuboids uses entrySet to add elements

2018-09-24 Thread Lijun Cao (JIRA)


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

Lijun Cao commented on KYLIN-3580:
--

i'll take this.

> CuboidStatsUtil#complementRowCountForMandatoryCuboids uses entrySet to add 
> elements
> ---
>
> Key: KYLIN-3580
> URL: https://issues.apache.org/jira/browse/KYLIN-3580
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Major
>
> Here is related code:
> {code}
> sortedStatsSet.addAll(statistics.entrySet());
> {code}
> The entrySet() method is allowed to return a view of the underlying Map in 
> which a single Entry object is reused and returned during the iteration.
> When iterating through such a Map, the Entry value is only valid until you 
> advance to the next iteration.



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


[jira] [Comment Edited] (KYLIN-3580) CuboidStatsUtil#complementRowCountForMandatoryCuboids uses entrySet to add elements

2018-09-24 Thread Lijun Cao (JIRA)


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

Lijun Cao edited comment on KYLIN-3580 at 9/24/18 7:21 AM:
---

I'll take this.


was (Author: caolijun1166):
i'll take this.

> CuboidStatsUtil#complementRowCountForMandatoryCuboids uses entrySet to add 
> elements
> ---
>
> Key: KYLIN-3580
> URL: https://issues.apache.org/jira/browse/KYLIN-3580
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Priority: Major
>
> Here is related code:
> {code}
> sortedStatsSet.addAll(statistics.entrySet());
> {code}
> The entrySet() method is allowed to return a view of the underlying Map in 
> which a single Entry object is reused and returned during the iteration.
> When iterating through such a Map, the Entry value is only valid until you 
> advance to the next iteration.



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


[jira] [Updated] (KYLIN-3575) Unclosed Connection in DriverTest

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI updated KYLIN-3575:

Fix Version/s: v2.6.0

> Unclosed Connection in DriverTest
> -
>
> Key: KYLIN-3575
> URL: https://issues.apache.org/jira/browse/KYLIN-3575
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.6.0
>
>
> In testCalciteProps :
> {code}
> KylinConnection conn = (KylinConnection) 
> driver.connect("jdbc:kylin:test_url/test_db", props);
> {code}
> The connection should be closed upon return.



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


[jira] [Resolved] (KYLIN-3575) Unclosed Connection in DriverTest

2018-09-24 Thread Shaofeng SHI (JIRA)


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

Shaofeng SHI resolved KYLIN-3575.
-
Resolution: Fixed

> Unclosed Connection in DriverTest
> -
>
> Key: KYLIN-3575
> URL: https://issues.apache.org/jira/browse/KYLIN-3575
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.6.0
>
>
> In testCalciteProps :
> {code}
> KylinConnection conn = (KylinConnection) 
> driver.connect("jdbc:kylin:test_url/test_db", props);
> {code}
> The connection should be closed upon return.



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


[jira] [Commented] (KYLIN-3575) Unclosed Connection in DriverTest

2018-09-24 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3575:


Commit f37be33cedba7fa4f6970d2c3082578e70a6b1a0 in kylin's branch 
refs/heads/master from tttMelody
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=f37be33 ]

KYLIN-3575, fix unclosed JDBC connection in DriverTest.


> Unclosed Connection in DriverTest
> -
>
> Key: KYLIN-3575
> URL: https://issues.apache.org/jira/browse/KYLIN-3575
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.6.0
>
>
> In testCalciteProps :
> {code}
> KylinConnection conn = (KylinConnection) 
> driver.connect("jdbc:kylin:test_url/test_db", props);
> {code}
> The connection should be closed upon return.



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


[jira] [Commented] (KYLIN-3575) Unclosed Connection in DriverTest

2018-09-24 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KYLIN-3575:
---

shaofengshi closed pull request #242: KYLIN-3575, fix unclosed JDBC connection 
in DriverTest.
URL: https://github.com/apache/kylin/pull/242
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java 
b/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
index 11dbcde45d..1ffec6d132 100644
--- a/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
+++ b/jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
@@ -221,6 +221,7 @@ public void testSSLFromURL() throws SQLException {
 assertEquals("test_url", ((KylinConnection) conn).getBaseUrl());
 assertEquals("test_db", ((KylinConnection) conn).getProject());
 assertTrue(Boolean.parseBoolean((String) ((KylinConnection) 
conn).getConnectionProperties().get("ssl")));
+conn.close();
 }
 
 @Test
@@ -245,6 +246,8 @@ public void testCalciteProps() throws SQLException {
 assertEquals("false", 
connProps2.getProperty("kylin.query.calcite.extras-props.caseSensitive"));
 assertEquals("UNCHANGED", 
connProps2.getProperty("kylin.query.calcite.extras-props.unquotedCasing"));
 assertEquals("BACK_TICK", 
connProps2.getProperty("kylin.query.calcite.extras-props.quoting"));
+conn.close();
+conn2.close();
 }
 
 private void printResultSet(ResultSet rs) throws SQLException {


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Unclosed Connection in DriverTest
> -
>
> Key: KYLIN-3575
> URL: https://issues.apache.org/jira/browse/KYLIN-3575
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.6.0
>
>
> In testCalciteProps :
> {code}
> KylinConnection conn = (KylinConnection) 
> driver.connect("jdbc:kylin:test_url/test_db", props);
> {code}
> The connection should be closed upon return.



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