Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.testutil.ImpalaJdbcClient Class Reference
Collaboration diagram for com.cloudera.impala.testutil.ImpalaJdbcClient:

Classes

class  ClientExecOptions
 

Public Member Functions

void connect () throws ClassNotFoundException, SQLException
 
void close () throws SQLException
 
ResultSet execQuery (String query) throws SQLException
 
void changeDatabase (String db_name) throws SQLException
 
Connection getConnection ()
 
Statement getStatement ()
 

Static Public Member Functions

static ImpalaJdbcClient createClientUsingHiveJdbcDriver ()
 
static ImpalaJdbcClient createClientUsingHiveJdbcDriver (String connString)
 
static void main (String[] args) throws SQLException, ClassNotFoundException, ParseException
 

Private Member Functions

 ImpalaJdbcClient (String driverName, String connString)
 
void validateConnection () throws SQLException
 

Static Private Member Functions

static ClientExecOptions parseOptions (String[] args) throws ParseException
 
static String formatColumnValue (String colVal, String columnType) throws NumberFormatException
 
static void execQuery (ImpalaJdbcClient client, String queryString) throws SQLException, NumberFormatException
 

Private Attributes

final String driverName_
 
final String connString_
 
Connection conn_
 
Statement stmt_
 

Static Private Attributes

static final Logger LOG = Logger.getLogger(ImpalaJdbcClient.class)
 
static final String HIVE_SERVER2_DRIVER_NAME
 
static final String SASL_AUTH_SPEC = ";auth=none"
 
static final String NOSASL_AUTH_SPEC = ";auth=noSasl"
 
static final String DEFAULT_CONNECTION_STRING
 

Detailed Description

Basic tool for executing queries and and displaying results using Impala over JDBC.

Definition at line 42 of file ImpalaJdbcClient.java.

Constructor & Destructor Documentation

com.cloudera.impala.testutil.ImpalaJdbcClient.ImpalaJdbcClient ( String  driverName,
String  connString 
)
inlineprivate

Member Function Documentation

void com.cloudera.impala.testutil.ImpalaJdbcClient.changeDatabase ( String  db_name) throws SQLException
inline
void com.cloudera.impala.testutil.ImpalaJdbcClient.close ( ) throws SQLException
inline
void com.cloudera.impala.testutil.ImpalaJdbcClient.connect ( ) throws ClassNotFoundException, SQLException
inline
static ImpalaJdbcClient com.cloudera.impala.testutil.ImpalaJdbcClient.createClientUsingHiveJdbcDriver ( String  connString)
inlinestatic
ResultSet com.cloudera.impala.testutil.ImpalaJdbcClient.execQuery ( String  query) throws SQLException
inline
static void com.cloudera.impala.testutil.ImpalaJdbcClient.execQuery ( ImpalaJdbcClient  client,
String  queryString 
) throws SQLException, NumberFormatException
inlinestaticprivate

Executes one or more queries using the given ImpalaJdbcClient. Multiple queries should be seperated using semi-colons.

Exceptions
SQLException

Definition at line 245 of file ImpalaJdbcClient.java.

References com.cloudera.impala.testutil.ImpalaJdbcClient.close(), and com.cloudera.impala.testutil.ImpalaJdbcClient.formatColumnValue().

static String com.cloudera.impala.testutil.ImpalaJdbcClient.formatColumnValue ( String  colVal,
String  columnType 
) throws NumberFormatException
inlinestaticprivate
Connection com.cloudera.impala.testutil.ImpalaJdbcClient.getConnection ( )
inline
Statement com.cloudera.impala.testutil.ImpalaJdbcClient.getStatement ( )
inline
static void com.cloudera.impala.testutil.ImpalaJdbcClient.main ( String[]  args) throws SQLException, ClassNotFoundException, ParseException
inlinestatic

Executes a query over JDBC. Multiple queries can be passed in if they are semi-colon separated.

Definition at line 294 of file ImpalaJdbcClient.java.

References com.cloudera.impala.testutil.ImpalaJdbcClient.execQuery(), and com.cloudera.impala.testutil.ImpalaJdbcClient.parseOptions().

static ClientExecOptions com.cloudera.impala.testutil.ImpalaJdbcClient.parseOptions ( String[]  args) throws ParseException
inlinestaticprivate
void com.cloudera.impala.testutil.ImpalaJdbcClient.validateConnection ( ) throws SQLException
inlineprivate

Member Data Documentation

final String com.cloudera.impala.testutil.ImpalaJdbcClient.connString_
private
final String com.cloudera.impala.testutil.ImpalaJdbcClient.DEFAULT_CONNECTION_STRING
staticprivate
Initial value:
=
"jdbc:hive2://localhost:21050/default"

Definition at line 60 of file ImpalaJdbcClient.java.

Referenced by com.cloudera.impala.testutil.ImpalaJdbcClient.createClientUsingHiveJdbcDriver().

final String com.cloudera.impala.testutil.ImpalaJdbcClient.driverName_
private
final String com.cloudera.impala.testutil.ImpalaJdbcClient.HIVE_SERVER2_DRIVER_NAME
staticprivate
Initial value:
=
"org.apache.hive.jdbc.HiveDriver"

Definition at line 48 of file ImpalaJdbcClient.java.

Referenced by com.cloudera.impala.testutil.ImpalaJdbcClient.createClientUsingHiveJdbcDriver().

final Logger com.cloudera.impala.testutil.ImpalaJdbcClient.LOG = Logger.getLogger(ImpalaJdbcClient.class)
staticprivate

Definition at line 43 of file ImpalaJdbcClient.java.

final String com.cloudera.impala.testutil.ImpalaJdbcClient.NOSASL_AUTH_SPEC = ";auth=noSasl"
staticprivate
final String com.cloudera.impala.testutil.ImpalaJdbcClient.SASL_AUTH_SPEC = ";auth=none"
staticprivate

The documentation for this class was generated from the following file: