You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "jifei_yang (JIRA)" <ji...@apache.org> on 2018/01/30 01:04:00 UTC

[jira] [Closed] (PHOENIX-4284) Phoenix connection is not closed.

     [ https://issues.apache.org/jira/browse/PHOENIX-4284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jifei_yang closed PHOENIX-4284.
-------------------------------

Already have the same problem!

> Phoenix connection is not closed.
> ---------------------------------
>
>                 Key: PHOENIX-4284
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4284
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.8.0
>            Reporter: jifei_yang
>            Priority: Trivial
>              Labels: features
>             Fix For: 4.8.0
>
>
> When I call the jdbc close method, I found that the phoenix link still exists and is not closed.
> *The code is as follows:*
> {code:java}
> public class TestHbaseClose {
>     public static void main(String[] args) {
>         Connection conn=null;
>         for (int i = 0; i < 5; i++) {
>             try {
>                 conn= PhoenixConnectionTest.getConnPhoenix();
>                 System.out.println("Before is "+conn);
>                 Thread.sleep(8000);
>                 conn.close();
>                 System.out.println("After is "+conn);
>                 System.out.println(conn.isClosed());
>             } catch (Exception e) {
>                 e.printStackTrace();
>             }
>         }
>     }
> }
> {code}
> *The results of the print are as follows:*
> {noformat}
> Before is org.apache.phoenix.jdbc.PhoenixConnection@2fb5fe30
> After is org.apache.phoenix.jdbc.PhoenixConnection@2fb5fe30
> true
> Before is org.apache.phoenix.jdbc.PhoenixConnection@14bae047
> After is org.apache.phoenix.jdbc.PhoenixConnection@14bae047
> true
> Before is org.apache.phoenix.jdbc.PhoenixConnection@466d49f0
> After is org.apache.phoenix.jdbc.PhoenixConnection@466d49f0
> true
> Before is org.apache.phoenix.jdbc.PhoenixConnection@40021799
> After is org.apache.phoenix.jdbc.PhoenixConnection@40021799
> true
> Before is org.apache.phoenix.jdbc.PhoenixConnection@64f555e7
> After is org.apache.phoenix.jdbc.PhoenixConnection@64f555e7
> true
> {noformat}
> Why is this? Is there a bug fixes in version 4.8.0?
> But the following link mentions this question:
> [ https: //issues.apache.org/jira/browse/PHOENIX-2898]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)