phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pankaj kr <pankaj...@huawei.com>
Subject RE: Java code does not return right after executing query
Date Fri, 07 Mar 2014 09:47:13 GMT
Hi Tung,

Phoenix threads are not released immediately. You might have observed that your program exits
after 1 min.
               Default value of  "phoenix.query.timeoutMs" is 1 min, you can customize this.

Regards,
Pankaj


From: Tung Nguyen [mailto:tungnguyen.hcmc@gmail.com]
Sent: 05 March 2014 23:31
To: user@phoenix.incubator.apache.org
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

Mime
View raw message