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

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


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

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

shaofengshi closed pull request #246: KYLIN-3574 Close underlying resource of 
lookup table
URL: https://github.com/apache/kylin/pull/246
 
 
   

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-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java 
b/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java
index 6de42ac3bd..1b5cf635d8 100644
--- 
a/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java
+++ 
b/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java
@@ -21,6 +21,7 @@
 import java.io.IOException;
 import java.util.Set;
 
+import org.apache.hadoop.io.IOUtils;
 import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.common.util.Dictionary;
 import org.apache.kylin.cube.CubeInstance;
@@ -29,6 +30,7 @@
 import org.apache.kylin.cube.model.DimensionDesc;
 import org.apache.kylin.dict.DictionaryProvider;
 import org.apache.kylin.dict.DistinctColumnValuesProvider;
+import org.apache.kylin.dict.lookup.ILookupTable;
 import org.apache.kylin.metadata.model.JoinDesc;
 import org.apache.kylin.metadata.model.TableRef;
 import org.apache.kylin.metadata.model.TblColRef;
@@ -98,7 +100,10 @@ private static void processSegment(KylinConfig config, 
CubeSegment cubeSeg, Stri
 logger.info("Checking snapshot of " + lookup);
 try {
 JoinDesc join = 
cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
-cubeMgr.getLookupTable(cubeSeg, join);
+ILookupTable table = cubeMgr.getLookupTable(cubeSeg, join);
+if (table != null) {
+IOUtils.closeStream(table);
+}
 } catch (Throwable th) {
 throw new RuntimeException("Checking snapshot of " + lookup + 
" failed.", th);
 }


 


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
>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] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

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


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

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

codecov-io commented on issue #246: KYLIN-3574 Close underlying resource of 
lookup table
URL: https://github.com/apache/kylin/pull/246#issuecomment-424971704
 
 
   # [Codecov](https://codecov.io/gh/apache/kylin/pull/246?src=pr=h1) Report
   > :exclamation: No coverage uploaded for pull request base 
(`master@dcd2a63`). [Click here to learn what that 
means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `0%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/kylin/pull/246/graphs/tree.svg?width=650=JawVgbgsVo=150=pr)](https://codecov.io/gh/apache/kylin/pull/246?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ## master #246   +/-   ##
   =
 Coverage  ?   21.16%   
 Complexity? 4405   
   =
 Files ? 1086   
 Lines ?69724   
 Branches  ?10090   
   =
 Hits  ?14755   
 Misses?53568   
 Partials  ? 1401
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/kylin/pull/246?src=pr=tree) | Coverage Δ 
| Complexity Δ | |
   |---|---|---|---|
   | 
[.../apache/kylin/cube/cli/DictionaryGeneratorCLI.java](https://codecov.io/gh/apache/kylin/pull/246/diff?src=pr=tree#diff-Y29yZS1jdWJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reWxpbi9jdWJlL2NsaS9EaWN0aW9uYXJ5R2VuZXJhdG9yQ0xJLmphdmE=)
 | `0% <0%> (ø)` | `0 <0> (?)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/kylin/pull/246?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/246?src=pr=footer). Last 
update 
[dcd2a63...ab4b07e](https://codecov.io/gh/apache/kylin/pull/246?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


> 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] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

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


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

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

hit-lacus commented on a change in pull request #246: KYLIN-3574 Close 
underlying resource of lookup table
URL: https://github.com/apache/kylin/pull/246#discussion_r220773778
 
 

 ##
 File path: 
core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java
 ##
 @@ -98,7 +100,10 @@ private static void processSegment(KylinConfig config, 
CubeSegment cubeSeg, Stri
 logger.info("Checking snapshot of " + lookup);
 try {
 JoinDesc join = 
cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
-cubeMgr.getLookupTable(cubeSeg, join);
+ILookupTable table = cubeMgr.getLookupTable(cubeSeg, join);
+if(table != null){
 
 Review comment:
   Sorry, I will fix it.


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
>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] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

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


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

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

shaofengshi commented on a change in pull request #246: KYLIN-3574 Close 
underlying resource of lookup table
URL: https://github.com/apache/kylin/pull/246#discussion_r220773205
 
 

 ##
 File path: 
core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java
 ##
 @@ -98,7 +100,10 @@ private static void processSegment(KylinConfig config, 
CubeSegment cubeSeg, Stri
 logger.info("Checking snapshot of " + lookup);
 try {
 JoinDesc join = 
cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
-cubeMgr.getLookupTable(cubeSeg, join);
+ILookupTable table = cubeMgr.getLookupTable(cubeSeg, join);
+if(table != null){
 
 Review comment:
   Seems its code format is invalid; Please check 
https://kylin.apache.org/development/dev_env.html to enable code formatter.


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
>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] [Commented] (KYLIN-3574) Unclosed lookup table in DictionaryGeneratorCLI#processSegment

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


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

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

shaofengshi commented on a change in pull request #246: KYLIN-3574 Close 
underlying resource of lookup table
URL: https://github.com/apache/kylin/pull/246#discussion_r220036791
 
 

 ##
 File path: 
core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java
 ##
 @@ -98,7 +100,10 @@ private static void processSegment(KylinConfig config, 
CubeSegment cubeSeg, Stri
 logger.info("Checking snapshot of " + lookup);
 try {
 JoinDesc join = 
cubeSeg.getModel().getJoinsTree().getJoinByPKSide(lookup);
-cubeMgr.getLookupTable(cubeSeg, join);
+ILookupTable table = cubeMgr.getLookupTable(cubeSeg, join);
+if(table != null){
 
 Review comment:
   Seems its code format is invalid; Please check 
https://kylin.apache.org/development/dev_env.html to enable code formatter.


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