kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chao Long (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KYLIN-3111) Close of Admin instance should be placed in finally block
Date Sun, 17 Dec 2017 09:19:00 GMT

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

Chao Long commented on KYLIN-3111:
----------------------------------

Thanks [~lidong_sjtu] for your suggestions!
I have updated the commit infomation and attached a new patch!

> Close of Admin instance should be placed in finally block
> ---------------------------------------------------------
>
>                 Key: KYLIN-3111
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3111
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Chao Long
>         Attachments: KYLIN-3111-Place-close-of-admin-instance-into-finally-block.patch
>
>
> Looking at the code in DeployCoprocessorCLI.java and HtableAlterMetadataCLI.java , I
see that close of Admin instance is without finally block:
> {code}
>         hbaseAdmin.disableTable(table.getTableName());
>         table.setValue(metadataKey, metadataValue);
>         hbaseAdmin.modifyTable(table.getTableName(), table);
>         hbaseAdmin.enableTable(table.getTableName());
>         hbaseAdmin.close();
> {code}
> If any exception is thrown in the operations prior to the close(), the close() would
be skipped, leading to resource leak.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message