Description
When I call the jdbc close method, I found that the phoenix link still exists and is not closed.
The code is as follows:
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(); } } } }
The results of the print are as follows:
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
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]
Attachments
Issue Links
- is duplicated by
-
PHOENIX-3553 Zookeeper connection should be closed immediately after DefaultStatisticsCollector's collecting stats done
- Resolved
-
PHOENIX-3563 Ensure we release ZooKeeper resources allocated by the Tephra client embedded in the Phoenix connection
- Resolved