[jira] [Updated] (KYLIN-3561) Upgrade to JUnit 5

2018-09-23 Thread Ted Yu (JIRA)


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

Ted Yu updated KYLIN-3561:
--
Description: 
JUnit 5 brings multiple useful features so tests are easier to read and write.

We can bump up the dependency version and create new tests with JUnit 5 
features.


Relevant features of JUnit 5: dynamic test, nested tests, parameterized tests
https://twitter.com/nipafx/status/1027095088059559936

  was:
JUnit 5 brings multiple useful features so tests are easier to read and write.

We can bump up the dependency version and create new tests with JUnit 5 
features.

Relevant features of JUnit 5: dynamic test, nested tests, parameterized tests
https://twitter.com/nipafx/status/1027095088059559936


> Upgrade to JUnit 5
> --
>
> Key: KYLIN-3561
> URL: https://issues.apache.org/jira/browse/KYLIN-3561
> Project: Kylin
>  Issue Type: Task
>Reporter: Ted Yu
>Priority: Major
>
> JUnit 5 brings multiple useful features so tests are easier to read and write.
> We can bump up the dependency version and create new tests with JUnit 5 
> features.
> Relevant features of JUnit 5: dynamic test, nested tests, parameterized tests
> https://twitter.com/nipafx/status/1027095088059559936



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


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

2018-09-23 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3586:
-

 Summary: 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


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] [Created] (KYLIN-3585) Ineffective declaration of volatile field in SparkFactDistinct

2018-09-23 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3585:
-

 Summary: 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


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] [Created] (KYLIN-3584) Incorrect lazy initialization of DefaultScheduler.INSTANCE

2018-09-23 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3584:
-

 Summary: 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


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] [Created] (KYLIN-3583) Integer multiplication is performed where Long result is expected

2018-09-23 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3583:
-

 Summary: 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


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] [Created] (KYLIN-3582) String comparison should not use == in RecordEvent

2018-09-23 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3582:
-

 Summary: 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


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] [Created] (KYLIN-3581) compareTo method should be paired with equals method

2018-09-23 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3581:
-

 Summary: 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


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] [Created] (KYLIN-3578) Do not synchronize on the intrinsic locks of high-level concurrency objects

2018-09-23 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-3578:
-

 Summary: 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


>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-3575) Unclosed Connection in DriverTest

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


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

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

asfgit commented on issue #242: KYLIN-3575, fix unclosed JDBC connection in 
DriverTest.
URL: https://github.com/apache/kylin/pull/242#issuecomment-423801611
 
 
   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 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
>
> 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-23 Thread ASF GitHub Bot (JIRA)


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

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

asfgit commented on issue #242: KYLIN-3575, fix unclosed JDBC connection in 
DriverTest.
URL: https://github.com/apache/kylin/pull/242#issuecomment-423801612
 
 
   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 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
>
> 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-23 Thread ASF GitHub Bot (JIRA)


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

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

tttMelody opened a new pull request #242: KYLIN-3575, fix unclosed JDBC 
connection in DriverTest.
URL: https://github.com/apache/kylin/pull/242
 
 
   


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
>
> 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-23 Thread jiatao.tao (JIRA)


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

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

Thanks!

> 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
>
> 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] [Assigned] (KYLIN-3575) Unclosed Connection in DriverTest

2018-09-23 Thread jiatao.tao (JIRA)


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

jiatao.tao reassigned KYLIN-3575:
-

Assignee: jiatao.tao

> 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
>
> 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)