phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tung Nguyen <tungnguyen.h...@gmail.com>
Subject Java code does not return right after executing query
Date Wed, 05 Mar 2014 18:00:52 GMT
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

Mime
View raw message