来源:?https://github.com/onefoursix/Cloudera-Impala-JDBC-Example 需要依赖的lib见这篇文章。 http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/Installing-and-Using-Impala/ciiu_impala_jdbc.html import java.sql.Conn
来源:?https://github.com/onefoursix/Cloudera-Impala-JDBC-Example
需要依赖的lib见这篇文章。
http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/Installing-and-Using-Impala/ciiu_impala_jdbc.html
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
?
public class ClouderaImpalaJdbcExample {
?
// here is an example query based on one of the Hue Beeswax sample tables
private static final String SQL_STATEMENT = "SELECT a FROM test limit 10";
?
// set the impalad host