|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lens.driver.jdbc.JDBCDriver
public class JDBCDriver
This driver is responsible for running queries against databases which can be queried using the JDBC API.
Nested Class Summary | |
---|---|
static class |
JDBCDriver.DummyQueryRewriter
The Class DummyQueryRewriter. |
Field Summary | |
---|---|
static org.apache.log4j.Logger |
LOG
The Constant LOG. |
static AtomicInteger |
THID
The Constant THID. |
Constructor Summary | |
---|---|
JDBCDriver()
|
Method Summary | |
---|---|
boolean |
cancelQuery(QueryHandle handle)
Cancel the execution of the query, specified by the handle. |
void |
close()
Close the driver, releasing all resouces used up by the driver. |
void |
closePreparedQuery(QueryPrepareHandle handle)
Close the prepare query specified by the prepared handle, releases all the resources held by the prepared query. |
void |
closeQuery(QueryHandle handle)
Close the query specified by the handle, releases all the resources held by the query. |
void |
closeResultSet(QueryHandle handle)
Close the resultset for the query. |
void |
configure(org.apache.hadoop.conf.Configuration conf)
Configure driver with Configuration passed |
QueryCost |
estimate(AbstractQueryContext qctx)
Estimate the cost of execution for given query. |
LensResultSet |
execute(QueryContext context)
Blocking execute of the query. |
void |
executeAsync(QueryContext context)
Asynchronously execute the query. |
DriverQueryPlan |
explain(AbstractQueryContext explainCtx)
Explain the given query. |
DriverQueryPlan |
explainAndPrepare(PreparedQueryContext pContext)
Explain and prepare the given query. |
LensResultSet |
fetchResultSet(QueryContext context)
Fetch the results of the query, specified by the handle. |
org.apache.hadoop.conf.Configuration |
getConf()
Get driver configuration |
void |
prepare(PreparedQueryContext pContext)
Prepare the given query. |
void |
readExternal(ObjectInput arg0)
|
void |
registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
Add a listener for driver events. |
void |
registerForCompletionNotification(QueryHandle handle,
long timeoutMillis,
QueryCompletionListener listener)
Register for query completion notification. |
void |
updateStatus(QueryContext context)
Get status of the query, specified by the handle. |
void |
validate(AbstractQueryContext pContext)
Validate query using prepare |
void |
writeExternal(ObjectOutput arg0)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger LOG
public static final AtomicInteger THID
Constructor Detail |
---|
public JDBCDriver()
Method Detail |
---|
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface LensDriver
public void configure(org.apache.hadoop.conf.Configuration conf) throws LensException
Configuration
passed
configure
in interface LensDriver
conf
- The configuration object
LensException
- the lens exceptionpublic QueryCost estimate(AbstractQueryContext qctx) throws LensException
LensDriver
estimate
in interface LensDriver
qctx
- The query context
LensException
- the lens exception if driver cannot estimatepublic DriverQueryPlan explain(AbstractQueryContext explainCtx) throws LensException
explain
in interface LensDriver
explainCtx
- The explain context
LensException
- the lens exceptionpublic void validate(AbstractQueryContext pContext) throws LensException
pContext
-
LensException
public void prepare(PreparedQueryContext pContext) throws LensException
prepare
in interface LensDriver
pContext
- the context
LensException
- the lens exceptionpublic DriverQueryPlan explainAndPrepare(PreparedQueryContext pContext) throws LensException
explainAndPrepare
in interface LensDriver
pContext
- the context
LensException
- the lens exceptionpublic void closePreparedQuery(QueryPrepareHandle handle) throws LensException
closePreparedQuery
in interface LensDriver
handle
- The query handle
LensException
- the lens exceptionpublic LensResultSet execute(QueryContext context) throws LensException
execute
in interface LensDriver
context
- the context
LensException
- the lens exceptionpublic void executeAsync(QueryContext context) throws LensException
executeAsync
in interface LensDriver
context
- The query context
LensException
- the lens exceptionpublic void registerForCompletionNotification(QueryHandle handle, long timeoutMillis, QueryCompletionListener listener) throws LensException
registerForCompletionNotification
in interface LensDriver
handle
- the handletimeoutMillis
- the timeout millislistener
- the listener
LensException
- the lens exceptionpublic void updateStatus(QueryContext context) throws LensException
updateStatus
in interface LensDriver
context
- The query handle
LensException
- the lens exceptionpublic LensResultSet fetchResultSet(QueryContext context) throws LensException
fetchResultSet
in interface LensDriver
context
- the context
LensResultSet
.
LensException
- the lens exceptionpublic void closeResultSet(QueryHandle handle) throws LensException
closeResultSet
in interface LensDriver
handle
- The query handle
LensException
- the lens exceptionpublic boolean cancelQuery(QueryHandle handle) throws LensException
cancelQuery
in interface LensDriver
handle
- The query handle.
LensException
- the lens exceptionpublic void closeQuery(QueryHandle handle) throws LensException
closeQuery
in interface LensDriver
handle
- The query handle
LensException
- the lens exceptionpublic void close() throws LensException
close
in interface LensDriver
LensException
- the lens exceptionpublic void registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
registerDriverEventListener
in interface LensDriver
driverEventListener
- the driver event listenerpublic void readExternal(ObjectInput arg0) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput arg0) throws IOException
writeExternal
in interface Externalizable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |