kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dong Li (JIRA)" <>
Subject [jira] [Commented] (KYLIN-3111) Close of Admin instance should be placed in finally block
Date Sun, 17 Dec 2017 08:12:00 GMT


Dong Li commented on KYLIN-3111:

Thanks [~Wayne0101] for your contribution!

Two suggestions for this patch:
1. Commit message should follow the same patterns, for example: "KYLIN-3111 XXXXXXXXX". Please
refer to other commits and update your message.
2. Your author information(email, name) is not included in this patch. Please update your
git config so that your contribution can be recognized directly.

> Close of Admin instance should be placed in finally block
> ---------------------------------------------------------
>                 Key: KYLIN-3111
>                 URL:
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Chao Long
>         Attachments: KYLIN-3111.patch
> Looking at the code in and , 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

View raw message