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

2018-10-07 Thread ASF GitHub Bot (JIRA)


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

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

shaofengshi closed pull request #280: KYLIN-3586 Fix remaining boxing/unboxing 
problem
URL: https://github.com/apache/kylin/pull/280
 
 
   

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-common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java 
b/core-common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java
index efc5030fa9..405d36143e 100644
--- 
a/core-common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java
+++ 
b/core-common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java
@@ -114,7 +114,7 @@ public static int getQueryTimeout() {
 if (v == null)
 return -1;
 else
-return Integer.valueOf(v);
+return Integer.parseInt(v);
 }
 
 public static Pair getShardAssignment() {
diff --git 
a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java 
b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java
index cd2cfe316c..86db79b0f2 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java
@@ -176,7 +176,7 @@ public String toString() {
 public static long getTs(ITuple row, TblColRef partitionCol) {
 //ts column type differentiate
 if (partitionCol.getDatatype().equals("date")) {
-return 
epicDaysToMillis(Integer.valueOf(row.getValue(partitionCol).toString()));
+return 
epicDaysToMillis(Integer.parseInt(row.getValue(partitionCol).toString()));
 } else {
 return Long.parseLong(row.getValue(partitionCol).toString());
 }
diff --git a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java 
b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
index 6814f2d8bc..9826de5827 100644
--- a/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
+++ b/jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java
@@ -176,20 +176,20 @@ public static Object wrapObject(String value, int 
sqlType) {
 return new BigDecimal(value);
 case Types.BIT:
 case Types.BOOLEAN:
-return Boolean.parseBoolean(value);
+return Boolean.valueOf(value);
 case Types.TINYINT:
 return Byte.valueOf(value);
 case Types.SMALLINT:
 return Short.valueOf(value);
 case Types.INTEGER:
-return Integer.parseInt(value);
+return Integer.valueOf(value);
 case Types.BIGINT:
-return Long.parseLong(value);
+return Long.valueOf(value);
 case Types.FLOAT:
-return Float.parseFloat(value);
+return Float.valueOf(value);
 case Types.REAL:
 case Types.DOUBLE:
-return Double.parseDouble(value);
+return Double.valueOf(value);
 case Types.BINARY:
 case Types.VARBINARY:
 case Types.LONGVARBINARY:


 


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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-10-07 Thread ASF GitHub Bot (JIRA)


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

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

coveralls commented on issue #280: KYLIN-3586 Fix remaining boxing/unboxing 
problem
URL: https://github.com/apache/kylin/pull/280#issuecomment-427655794
 
 
   ## Pull Request Test Coverage Report for [Build 
3734](https://coveralls.io/builds/19392189)
   
   * **1** of **7**   **(14.29%)**  changed or added relevant lines in **3** 
files are covered.
   * **3** unchanged lines in **2** files lost coverage.
   * Overall coverage increased (+**0.01%**) to **23.293%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-|--||---: |
   | 
[core-common/src/main/java/org/apache/kylin/common/debug/BackdoorToggles.java](https://coveralls.io/builds/19392189/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2Fdebug%2FBackdoorToggles.java#L117)
 | 0 | 1 | 0.0%
   | 
[core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java](https://coveralls.io/builds/19392189/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmetadata%2Ftuple%2FTuple.java#L179)
 | 0 | 1 | 0.0%
   | 
[jdbc/src/main/java/org/apache/kylin/jdbc/KylinClient.java](https://coveralls.io/builds/19392189/source?filename=jdbc%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fjdbc%2FKylinClient.java#L179)
 | 1 | 5 | 20.0%
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-|--|--: |
   | 
[core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://coveralls.io/builds/19392189/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Finmemcubing%2FMemDiskStore.java#L553)
 | 1 | 78.12% |
   | 
[core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java](https://coveralls.io/builds/19392189/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Fcuboid%2FTreeCuboidScheduler.java#L124)
 | 2 | 68.46% |
   
   
   |  Totals | [![Coverage 
Status](https://coveralls.io/builds/19392189/badge)](https://coveralls.io/builds/19392189)
 |
   | :-- | --: |
   | Change from base [Build 3732](https://coveralls.io/builds/19385953): |  
0.01% |
   | Covered Lines: | 16301 |
   | Relevant Lines: | 69983 |
   
   ---
   #   - [Coveralls](https://coveralls.io)
   


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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-10-07 Thread ASF GitHub Bot (JIRA)


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

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

codecov-io commented on issue #280: KYLIN-3586 Fix remaining boxing/unboxing 
problem
URL: https://github.com/apache/kylin/pull/280#issuecomment-427655739
 
 
   # [Codecov](https://codecov.io/gh/apache/kylin/pull/280?src=pr=h1) Report
   > :exclamation: No coverage uploaded for pull request base 
(`master@eb01b69`). [Click here to learn what that 
means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `14.28%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/kylin/pull/280/graphs/tree.svg?width=650=JawVgbgsVo=150=pr)](https://codecov.io/gh/apache/kylin/pull/280?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ## master #280   +/-   ##
   =
 Coverage  ?   21.28%   
 Complexity? 4437   
   =
 Files ? 1087   
 Lines ?69983   
 Branches  ?10126   
   =
 Hits  ?14896   
 Misses?53684   
 Partials  ? 1403
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/kylin/pull/280?src=pr=tree) | Coverage Δ 
| Complexity Δ | |
   |---|---|---|---|
   | 
[...in/java/org/apache/kylin/metadata/tuple/Tuple.java](https://codecov.io/gh/apache/kylin/pull/280/diff?src=pr=tree#diff-Y29yZS1tZXRhZGF0YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vbWV0YWRhdGEvdHVwbGUvVHVwbGUuamF2YQ==)
 | `0% <0%> (ø)` | `0 <0> (?)` | |
   | 
[...org/apache/kylin/common/debug/BackdoorToggles.java](https://codecov.io/gh/apache/kylin/pull/280/diff?src=pr=tree#diff-Y29yZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2NvbW1vbi9kZWJ1Zy9CYWNrZG9vclRvZ2dsZXMuamF2YQ==)
 | `0% <0%> (ø)` | `0 <0> (?)` | |
   | 
[...c/main/java/org/apache/kylin/jdbc/KylinClient.java](https://codecov.io/gh/apache/kylin/pull/280/diff?src=pr=tree#diff-amRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vamRiYy9LeWxpbkNsaWVudC5qYXZh)
 | `67.83% <20%> (ø)` | `33 <0> (?)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/kylin/pull/280?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/kylin/pull/280?src=pr=footer). Last 
update 
[eb01b69...4bc2939](https://codecov.io/gh/apache/kylin/pull/280?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-10-07 Thread Lijun Cao (JIRA)


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

Lijun Cao commented on KYLIN-3586:
--

Thanks, Ted Yu. I also modify parseInt to valueOf in KylinClient#wrapObject 
beacause its return type is Object.

> 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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-10-07 Thread ASF GitHub Bot (JIRA)


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

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

asfgit commented on issue #280: KYLIN-3586 Fix remaining boxing/unboxing problem
URL: https://github.com/apache/kylin/pull/280#issuecomment-427654284
 
 
   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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-10-07 Thread ASF GitHub Bot (JIRA)


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

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

caolijun1166 opened a new pull request #280: KYLIN-3586 Fix remaining 
boxing/unboxing problem
URL: https://github.com/apache/kylin/pull/280
 
 
   


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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-10-07 Thread ASF GitHub Bot (JIRA)


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

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

asfgit commented on issue #280: KYLIN-3586 Fix remaining boxing/unboxing problem
URL: https://github.com/apache/kylin/pull/280#issuecomment-427654285
 
 
   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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-10-02 Thread Ted Yu (JIRA)


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

Ted Yu commented on KYLIN-3586:
---

There are still a few instances of valueOf calls.
e.g. in Tuple.java :
{code}
return 
epicDaysToMillis(Integer.valueOf(row.getValue(partitionCol).toString()));
{code}

> 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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

ASF subversion and git services commented on KYLIN-3586:


Commit 8e7d2a90fa8488e6720130c511d139296939b32d in kylin's branch 
refs/heads/master from [~caolijun1166]
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=8e7d2a9 ]

KYLIN-3586 Fix eight primitive boxing/unboxing problem.


> 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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

shaofengshi closed pull request #269: KYLIN-3586 Fix eight primitive 
boxing/unboxing problem.
URL: https://github.com/apache/kylin/pull/269
 
 
   

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-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java 
b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
index 073662b920..6f1dfd9144 100644
--- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
+++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java
@@ -1046,7 +1046,7 @@ public int getQueryScanFuzzyKeySplitMax() {
 }
 
 public int getQueryStorageVisitScanRangeMax() {
-return 
Integer.valueOf(this.getOptional("kylin.storage.hbase.max-visit-scanrange", 
"100"));
+return 
Integer.parseInt(this.getOptional("kylin.storage.hbase.max-visit-scanrange", 
"100"));
 }
 
 public String getDefaultIGTStorage() {
@@ -1059,7 +1059,7 @@ public int getHBaseScanCacheRows() {
 }
 
 public float getKylinHBaseRegionCut() {
-return Float.valueOf(getOptional("kylin.storage.hbase.region-cut-gb", 
"5.0"));
+return 
Float.parseFloat(getOptional("kylin.storage.hbase.region-cut-gb", "5.0"));
 }
 
 public int getHBaseScanMaxResultSize() {
@@ -1075,11 +1075,11 @@ public String getHbaseDefaultEncoding() {
 }
 
 public int getHbaseDefaultBlockSize() {
-return 
Integer.valueOf(getOptional("kylin.storage.hbase.block-size-bytes", "1048576"));
+return 
Integer.parseInt(getOptional("kylin.storage.hbase.block-size-bytes", 
"1048576"));
 }
 
 public int getHbaseSmallFamilyBlockSize() {
-return 
Integer.valueOf(getOptional("kylin.storage.hbase.small-family-block-size-bytes",
 "65536"));
+return 
Integer.parseInt(getOptional("kylin.storage.hbase.small-family-block-size-bytes",
 "65536"));
 }
 
 public String getKylinOwner() {
@@ -1242,15 +1242,15 @@ public String getSparkAdditionalJars() {
 }
 
 public float getSparkRDDPartitionCutMB() {
-return 
Float.valueOf(getOptional("kylin.engine.spark.rdd-partition-cut-mb", "10.0"));
+return 
Float.parseFloat(getOptional("kylin.engine.spark.rdd-partition-cut-mb", 
"10.0"));
 }
 
 public int getSparkMinPartition() {
-return Integer.valueOf(getOptional("kylin.engine.spark.min-partition", 
"1"));
+return 
Integer.parseInt(getOptional("kylin.engine.spark.min-partition", "1"));
 }
 
 public int getSparkMaxPartition() {
-return Integer.valueOf(getOptional("kylin.engine.spark.max-partition", 
"5000"));
+return 
Integer.parseInt(getOptional("kylin.engine.spark.max-partition", "5000"));
 }
 
 public String getSparkStorageLevel() {
@@ -1266,10 +1266,10 @@ public boolean isSparkSanityCheckEnabled() {
 // 

 
 public boolean isDictionaryEnumeratorEnabled() {
-return 
Boolean.valueOf(getOptional("kylin.query.enable-dict-enumerator", "false"));
+return 
Boolean.parseBoolean(getOptional("kylin.query.enable-dict-enumerator", 
"false"));
 }
 
-public Boolean isEnumerableRulesEnabled() {
+public boolean isEnumerableRulesEnabled() {
 return 
Boolean.parseBoolean(getOptional("kylin.query.calcite.enumerable-rules-enabled",
 "false"));
 }
 
@@ -1278,7 +1278,7 @@ public boolean isReduceExpressionsRulesEnabled() {
 }
 
 public boolean isConvertCreateTableToWith() {
-return 
Boolean.valueOf(getOptional("kylin.query.convert-create-table-to-with", 
"false"));
+return 
Boolean.parseBoolean(getOptional("kylin.query.convert-create-table-to-with", 
"false"));
 }
 
 /**
@@ -1318,16 +1318,16 @@ public Properties getCalciteExtrasProperties() {
 // check KYLIN-3358, need deploy coprocessor if enabled
 // finally should be deprecated
 public boolean isDynamicColumnEnabled() {
-return 
Boolean.valueOf(getOptional("kylin.query.enable-dynamic-column", "false"));
+return 
Boolean.parseBoolean(getOptional("kylin.query.enable-dynamic-column", "false"));
 }
 
 //check KYLIN-1684, in most cases keep the default value
 public boolean isSkippingEmptySegments() {
-return Boolean.valueOf(getOptional("kylin.query.skip-empty-segments", 
"true"));
+return 
Boolean.parseBoolean(getOptional("kylin.query.skip-empty-segments", "true"));
 }
 
 public boolean isDisableCubeNoAggSQL() {
-return 

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

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


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

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

coveralls commented on issue #269: KYLIN-3586 Fix eight primitive 
boxing/unboxing problem.
URL: https://github.com/apache/kylin/pull/269#issuecomment-425297344
 
 
   ## Pull Request Test Coverage Report for [Build 
3694](https://coveralls.io/builds/19239184)
   
   * **10** of **58**   **(17.24%)**  changed or added relevant lines in **19** 
files are covered.
   * **2** unchanged lines in **2** files lost coverage.
   * Overall coverage decreased (**-0.001%**) to **23.166%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-|--||---: |
   | 
[tool/src/main/java/org/apache/kylin/tool/MrJobInfoExtractor.java](https://coveralls.io/builds/19239184/source?filename=tool%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Ftool%2FMrJobInfoExtractor.java#L154)
 | 0 | 1 | 0.0%
   | 
[core-common/src/main/java/org/apache/kylin/common/util/MailService.java](https://coveralls.io/builds/19239184/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2Futil%2FMailService.java#L96)
 | 0 | 1 | 0.0%
   | 
[core-metadata/src/main/java/org/apache/kylin/metadata/filter/ExtractTupleFilter.java](https://coveralls.io/builds/19239184/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmetadata%2Ffilter%2FExtractTupleFilter.java#L71)
 | 0 | 1 | 0.0%
   | 
[core-metadata/src/main/java/org/apache/kylin/metadata/filter/TimeConditionLiteralsReplacer.java](https://coveralls.io/builds/19239184/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmetadata%2Ffilter%2FTimeConditionLiteralsReplacer.java#L85)
 | 0 | 1 | 0.0%
   | 
[core-metadata/src/main/java/org/apache/kylin/metadata/filter/UDF/MassInTupleFilter.java](https://coveralls.io/builds/19239184/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmetadata%2Ffilter%2FUDF%2FMassInTupleFilter.java#L153)
 | 0 | 1 | 0.0%
   | 
[core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java](https://coveralls.io/builds/19239184/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmetadata%2Ftuple%2FTuple.java#L181)
 | 0 | 1 | 0.0%
   | 
[storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/LookupTableHFilesBulkLoadJob.java](https://coveralls.io/builds/19239184/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Flookup%2FLookupTableHFilesBulkLoadJob.java#L64)
 | 0 | 1 | 0.0%
   | 
[tool/src/main/java/org/apache/kylin/tool/MetadataCleanupJob.java](https://coveralls.io/builds/19239184/source?filename=tool%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Ftool%2FMetadataCleanupJob.java#L60)
 | 0 | 1 | 0.0%
   | 
[source-kafka/src/main/java/org/apache/kylin/source/kafka/DefaultTimeParser.java](https://coveralls.io/builds/19239184/source?filename=source-kafka%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fsource%2Fkafka%2FDefaultTimeParser.java#L44)
 | 0 | 1 | 0.0%
   | 
[server-base/src/main/java/org/apache/kylin/rest/job/HybridCubeCLI.java](https://coveralls.io/builds/19239184/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fjob%2FHybridCubeCLI.java#L119)
 | 0 | 1 | 0.0%
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-|--|--: |
   | 
[core-metadata/src/main/java/org/apache/kylin/metadata/cachesync/Broadcaster.java](https://coveralls.io/builds/19239184/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmetadata%2Fcachesync%2FBroadcaster.java#L149)
 | 1 | 57.71% |
   | 
[core-dictionary/src/main/java/org/apache/kylin/dict/lookup/cache/RocksDBLookupTable.java](https://coveralls.io/builds/19239184/source?filename=core-dictionary%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fdict%2Flookup%2Fcache%2FRocksDBLookupTable.java#L64)
 | 1 | 81.08% |
   
   
   |  Totals | [![Coverage 
Status](https://coveralls.io/builds/19239184/badge)](https://coveralls.io/builds/19239184)
 |
   | :-- | --: |
   | Change from base [Build 3689](https://coveralls.io/builds/19227187): |  
-0.001% |
   | Covered Lines: | 16157 |
   | Relevant Lines: | 69743 |
   
   ---
   #   - [Coveralls](https://coveralls.io)
   


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
> 

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

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


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

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

codecov-io commented on issue #269: KYLIN-3586 Fix eight primitive 
boxing/unboxing problem.
URL: https://github.com/apache/kylin/pull/269#issuecomment-425296989
 
 
   # [Codecov](https://codecov.io/gh/apache/kylin/pull/269?src=pr=h1) Report
   > Merging [#269](https://codecov.io/gh/apache/kylin/pull/269?src=pr=desc) 
into 
[master](https://codecov.io/gh/apache/kylin/commit/9ae03f6d79d3f7b36f3600208d07d1d5c6856320?src=pr=desc)
 will **decrease** coverage by `<.01%`.
   > The diff coverage is `15.51%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/kylin/pull/269/graphs/tree.svg?width=650=JawVgbgsVo=150=pr)](https://codecov.io/gh/apache/kylin/pull/269?src=pr=tree)
   
   ```diff
   @@ Coverage Diff  @@
   ## master #269  +/-   ##
   
   - Coverage 21.15%   21.15%   -0.01% 
   + Complexity 4406 4405   -1 
   
 Files  1086 1086  
 Lines 6974369743  
 Branches  1008810088  
   
   - Hits  1475514754   -1 
   - Misses5358753588   +1 
 Partials   1401 1401
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/kylin/pull/269?src=pr=tree) | Coverage Δ 
| Complexity Δ | |
   |---|---|---|---|
   | 
[.../java/org/apache/kylin/rest/job/HybridCubeCLI.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-c2VydmVyLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3Jlc3Qvam9iL0h5YnJpZEN1YmVDTEkuamF2YQ==)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...va/org/apache/kylin/rest/service/QueryService.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-c2VydmVyLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3Jlc3Qvc2VydmljZS9RdWVyeVNlcnZpY2UuamF2YQ==)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...in/java/org/apache/kylin/metadata/tuple/Tuple.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-Y29yZS1tZXRhZGF0YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vbWV0YWRhdGEvdHVwbGUvVHVwbGUuamF2YQ==)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...age/hbase/lookup/LookupTableHFilesBulkLoadJob.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9sb29rdXAvTG9va3VwVGFibGVIRmlsZXNCdWxrTG9hZEpvYi5qYXZh)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...e/kylin/metadata/filter/UDF/MassInTupleFilter.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-Y29yZS1tZXRhZGF0YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vbWV0YWRhdGEvZmlsdGVyL1VERi9NYXNzSW5UdXBsZUZpbHRlci5qYXZh)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...java/org/apache/kylin/common/util/MailService.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-Y29yZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2NvbW1vbi91dGlsL01haWxTZXJ2aWNlLmphdmE=)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...java/org/apache/kylin/tool/MetadataCleanupJob.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-dG9vbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vdG9vbC9NZXRhZGF0YUNsZWFudXBKb2IuamF2YQ==)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...n/java/org/apache/kylin/tool/CubeMetaIngester.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-dG9vbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vdG9vbC9DdWJlTWV0YUluZ2VzdGVyLmphdmE=)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...ache/kylin/metadata/filter/ExtractTupleFilter.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-Y29yZS1tZXRhZGF0YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vbWV0YWRhdGEvZmlsdGVyL0V4dHJhY3RUdXBsZUZpbHRlci5qYXZh)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | 
[...n/java/org/apache/kylin/tool/DiagnosisInfoCLI.java](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree#diff-dG9vbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vdG9vbC9EaWFnbm9zaXNJbmZvQ0xJLmphdmE=)
 | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
   | ... and [13 
more](https://codecov.io/gh/apache/kylin/pull/269/diff?src=pr=tree-more) | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/kylin/pull/269?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/kylin/pull/269?src=pr=footer). Last 
update 

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

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


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

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

asfgit commented on issue #269: KYLIN-3586 Fix eight primitive boxing/unboxing 
problem.
URL: https://github.com/apache/kylin/pull/269#issuecomment-425292691
 
 
   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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

asfgit commented on issue #269: KYLIN-3586 Fix eight primitive boxing/unboxing 
problem.
URL: https://github.com/apache/kylin/pull/269#issuecomment-425292692
 
 
   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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

caolijun1166 opened a new pull request #269: KYLIN-3586 Fix eight primitive 
boxing/unboxing problem.
URL: https://github.com/apache/kylin/pull/269
 
 
   KYLIN-3586 Fix eight primitive boxing/unboxing problem.


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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

2018-09-27 Thread Ted Yu (JIRA)


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

Ted Yu commented on KYLIN-3586:
---

There are still several {{Integer.valueOf}} calls in the code base.

Can you address them as well ?

Also, the commit log didn't contain JIRA number.

> 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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

yiming187 closed pull request #264: KYLIN-3586
URL: https://github.com/apache/kylin/pull/264
 
 
   

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/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
index 9ceabd2721..7269465992 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
@@ -109,7 +109,7 @@ private void fillValues(Map 
qualifierValMap, String[] result) {
 for (Entry qualifierValEntry : 
qualifierValMap.entrySet()) {
 byte[] qualifier = qualifierValEntry.getKey();
 byte[] value = qualifierValEntry.getValue();
-int valIdx = Integer.valueOf(Bytes.toString(qualifier));
+int valIdx = Integer.parseInt(Bytes.toString(qualifier));
 result[valIdx] = fromBytes(value);
 }
 }
diff --git a/tool/src/main/java/org/apache/kylin/tool/JobInstanceExtractor.java 
b/tool/src/main/java/org/apache/kylin/tool/JobInstanceExtractor.java
index bc61f9475b..18ace6fae1 100644
--- a/tool/src/main/java/org/apache/kylin/tool/JobInstanceExtractor.java
+++ b/tool/src/main/java/org/apache/kylin/tool/JobInstanceExtractor.java
@@ -83,7 +83,7 @@ public JobInstanceExtractor() {
 protected void executeExtract(OptionsHelper optionsHelper, File exportDir) 
throws Exception {
 String cube = optionsHelper.hasOption(OPTION_CUBE) ? 
optionsHelper.getOptionValue(OPTION_CUBE) : null;
 String project = optionsHelper.hasOption(OPTION_PROJECT) ? 
optionsHelper.getOptionValue(OPTION_PROJECT) : null;
-int period = optionsHelper.hasOption(OPTION_PERIOD) ? 
Integer.valueOf(optionsHelper.getOptionValue(OPTION_PERIOD)) : DEFAULT_PERIOD;
+int period = optionsHelper.hasOption(OPTION_PERIOD) ? 
Integer.parseInt(optionsHelper.getOptionValue(OPTION_PERIOD)) : DEFAULT_PERIOD;
 
 long endTime = System.currentTimeMillis();
 long startTime = endTime - period * 24 * 3600 * 1000; // time in Millis
diff --git a/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java 
b/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java
index 80af352d95..a84345b67d 100644
--- a/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java
+++ b/tool/src/main/java/org/apache/kylin/tool/KylinLogExtractor.java
@@ -73,7 +73,7 @@ private void beforeExtract() {
 protected void executeExtract(OptionsHelper optionsHelper, File exportDir) 
throws Exception {
 beforeExtract();
 
-int logPeriod = optionsHelper.hasOption(OPTION_LOG_PERIOD) ? 
Integer.valueOf(optionsHelper.getOptionValue(OPTION_LOG_PERIOD)) : 
DEFAULT_LOG_PERIOD;
+int logPeriod = optionsHelper.hasOption(OPTION_LOG_PERIOD) ? 
Integer.parseInt(optionsHelper.getOptionValue(OPTION_LOG_PERIOD)) : 
DEFAULT_LOG_PERIOD;
 
 if (logPeriod < 1) {
 logger.warn("No logs to extract.");


 


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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

yiming187 commented on issue #264: KYLIN-3586
URL: https://github.com/apache/kylin/pull/264#issuecomment-425087667
 
 
   LGTM. Merged.


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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

asfgit commented on issue #264: KYLIN-3586
URL: https://github.com/apache/kylin/pull/264#issuecomment-425020849
 
 
   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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

asfgit commented on issue #264: KYLIN-3586
URL: https://github.com/apache/kylin/pull/264#issuecomment-425020848
 
 
   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
> Fix For: v2.6.0
>
>
> 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-3586) Boxing/unboxing to parse a primitive is suboptimal

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


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

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

caolijun1166 closed pull request #245: KYLIN-3586
URL: https://github.com/apache/kylin/pull/245
 
 
   

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/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
index 9ceabd2721..7269465992 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/lookup/HBaseLookupRowEncoder.java
@@ -109,7 +109,7 @@ private void fillValues(Map 
qualifierValMap, String[] result) {
 for (Entry qualifierValEntry : 
qualifierValMap.entrySet()) {
 byte[] qualifier = qualifierValEntry.getKey();
 byte[] value = qualifierValEntry.getValue();
-int valIdx = Integer.valueOf(Bytes.toString(qualifier));
+int valIdx = Integer.parseInt(Bytes.toString(qualifier));
 result[valIdx] = fromBytes(value);
 }
 }
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
deleted file mode 100644
index ca8da25572..00
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
-package org.apache.kylin.storage.hbase.steps;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.cli.Options;
-import org.apache.commons.io.IOUtils;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FSDataOutputStream;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.KeyValueUtil;
-import org.apache.hadoop.hbase.client.HTable;
-import org.apache.hadoop.hbase.mapreduce.HFileOutputFormat2;
-import org.apache.hadoop.io.NullWritable;
-import org.apache.hadoop.io.SequenceFile;
-import org.apache.hadoop.mapreduce.Job;
-import org.apache.hadoop.util.ToolRunner;
-import org.apache.kylin.common.KylinConfig;
-import org.apache.kylin.common.util.Bytes;
-import org.apache.kylin.common.util.BytesUtil;
-import org.apache.kylin.common.util.HadoopUtil;
-import org.apache.kylin.common.util.ShardingHash;
-import org.apache.kylin.cube.CubeInstance;
-import org.apache.kylin.cube.CubeManager;
-import org.apache.kylin.cube.CubeSegment;
-import org.apache.kylin.cube.kv.RowConstants;
-import org.apache.kylin.cube.model.CubeDesc;
-import org.apache.kylin.engine.mr.common.AbstractHadoopJob;
-import org.apache.kylin.engine.mr.common.CubeStatsReader;
-import org.apache.kylin.engine.mr.common.CuboidShardUtil;
-import org.apache.kylin.metadata.model.IEngineAware;
-import org.apache.kylin.storage.hbase.HBaseConnection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-/**
- */
-public class CreateHTableJob extends AbstractHadoopJob {
-
-protected static final Logger logger = 
LoggerFactory.getLogger(CreateHTableJob.class);
-
-CubeInstance cube = null;
-CubeDesc cubeDesc = null;
-String segmentID = null;
-String cuboidModeName = null;
-String hbaseConfPath = null;
-KylinConfig kylinConfig;
-Path partitionFilePath;
-
-@Override
-public int run(String[] args) throws Exception {
-Options options = new Options();
-
-options.addOption(OPTION_CUBE_NAME);
-

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