Hi Tung,
Pls Ignore previous mail.
Phoenix threads are not released immediately based on some conditions. You
might have observed that your program exits after 1 min.
Default value of "phoenix.query.keepAliveMs" is 1 min, you can
customize this.
Regards,
Pankaj
From: Tung Nguyen [mailto:[email protected]]
Sent: 05 March 2014 23:31
To: [email protected]
Subject: Java code does not return right after executing query
Hi,
I am new to Phoenix. I tried your code to connect with HBase and issue a query
as follow:
PreparedStatement statement = con.prepareStatement("select *
from test");
rset = statement.executeQuery();
while (rset.next()) {
System.out.println(rset.getString("mycolumn"));
}
System.out.println("Before close statement");
statement.close();
System.out.println("Before close connection");
con.close();
System.out.println("END REACHED");
return;
The console prints out
"Hello
World!
Before close statement
Before close connection
END REACHED"
and hang there for a while before exiting. What's happening?
Thanks
Tung Nguyen