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

James Taylor commented on PHOENIX-89:
-------------------------------------

[~maryannxue] - I think it's better to close each Statement as soon as you can, 
otherwise the memory won't be freed up until the Connection is closed.

> Statements are not closed using PhoenixConnection.executeStatements()
> ---------------------------------------------------------------------
>
>                 Key: PHOENIX-89
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-89
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 2.2.3, 3.0.0
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> This method is mainly used by "PhoenixRuntime#main()", which is a Phoenix 
> java utility class for executing SQL scripts.
> We can either close the statements locally inside the method, or add the 
> statements into the statement list of the enclosing PhoenixConnection. I 
> prefer the latter.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to