org.apache.lens.driver.jdbc
Class DataSourceConnectionProvider

java.lang.Object
  extended by org.apache.lens.driver.jdbc.DataSourceConnectionProvider
All Implemented Interfaces:
Closeable, ConnectionProvider

public class DataSourceConnectionProvider
extends Object
implements ConnectionProvider

The Class DataSourceConnectionProvider.


Field Summary
static org.apache.log4j.Logger LOG
          The Constant LOG.
 
Constructor Summary
DataSourceConnectionProvider()
          Instantiates a new data source connection provider.
 
Method Summary
 void close()
           
 Connection getConnection(org.apache.hadoop.conf.Configuration conf)
          Gets the connection.
 org.apache.lens.driver.jdbc.DataSourceConnectionProvider.DriverConfig getDriverConfigfromConf(org.apache.hadoop.conf.Configuration conf)
          Gets the driver configfrom conf.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.log4j.Logger LOG
The Constant LOG.

Constructor Detail

DataSourceConnectionProvider

public DataSourceConnectionProvider()
Instantiates a new data source connection provider.

Method Detail

getDriverConfigfromConf

public org.apache.lens.driver.jdbc.DataSourceConnectionProvider.DriverConfig getDriverConfigfromConf(org.apache.hadoop.conf.Configuration conf)
Gets the driver configfrom conf.

Parameters:
conf - the conf
Returns:
the driver configfrom conf

getConnection

public Connection getConnection(org.apache.hadoop.conf.Configuration conf)
                         throws SQLException
Description copied from interface: ConnectionProvider
Gets the connection.

Specified by:
getConnection in interface ConnectionProvider
Parameters:
conf - the conf
Returns:
the connection
Throws:
SQLException - the SQL exception

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.