[ 
https://issues.apache.org/jira/browse/KYLIN-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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:
[email protected]


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

Reply via email to