You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "hyoungjunkim (JIRA)" <ji...@apache.org> on 2014/03/03 14:21:21 UTC

[jira] [Created] (TAJO-646) TajoClient is blocked while main thread finished.

hyoungjunkim created TAJO-646:
---------------------------------

             Summary: TajoClient is blocked while main thread finished.
                 Key: TAJO-646
                 URL: https://issues.apache.org/jira/browse/TAJO-646
             Project: Tajo
          Issue Type: Bug
            Reporter: hyoungjunkim


I tested Tajo JDBC Driver like bellow. After closing connection the TestCase still running. 
{code}
public static void main(String[] args) throws Exception {
	Class.forName("org.apache.tajo.jdbc.TajoDriver").newInstance();
	Connection conn = DriverManager
			.getConnection("jdbc:tajo://127.0.0.1:26002");

	Statement stmt = null;
	ResultSet rs = null;
	try {
		stmt = conn.createStatement();
		rs = stmt.executeQuery("select * from table1");
		while (rs.next()) {
			System.out.println(rs.getString(1) + "," + rs.getString(3));
		}
	} finally {
		if (rs != null) rs.close();
		if (stmt != null) stmt.close();
		if (conn != null) conn.close();
	}
}
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)