public class JDBCDriver extends AbstractLensDriver
| Modifier and Type | Class and Description |
|---|---|
static class |
JDBCDriver.DummyQueryRewriter
The Class DummyQueryRewriter.
|
| Modifier and Type | Field and Description |
|---|---|
static AtomicInteger |
THID
The Constant THID.
|
| Constructor and Description |
|---|
JDBCDriver() |
| Modifier and Type | Method and Description |
|---|---|
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,
String driverType,
String driverName)
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.
|
ConcurrentHashMap<QueryHandle,org.apache.lens.driver.jdbc.JDBCDriver.JdbcQueryContext> |
getQueryContextMap()
The query context map.
|
StatusUpdateMethod |
getStatusUpdateMethod() |
void |
init()
Inits the.
|
void |
prepare(PreparedQueryContext pContext)
Prepare the given query.
|
void |
readExternal(ObjectInput arg0) |
void |
registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
Add a listener for driver events.
|
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) |
decidePriority, fetchResultSet, getConf, getFullyQualifiedName, getQueryConstraints, getQueryHook, getRetryPolicyDecider, getWaitingQuerySelectionPolicies, registerForCompletionNotification, toStringpublic static final AtomicInteger THID
public void configure(org.apache.hadoop.conf.Configuration conf,
String driverType,
String driverName)
throws LensException
LensDriverConfiguration passed.configure in interface LensDriverconfigure in class AbstractLensDriverconf - The configuration objectdriverType - Type of the driver (Example: hive, jdbc, el)driverName - Name of this driverLensException - the lens exceptionpublic void init()
throws LensException
LensException - the lens exceptionpublic QueryCost estimate(AbstractQueryContext qctx) throws LensException
LensDriverqctx - The query contextLensException - the lens exception if driver cannot estimatepublic DriverQueryPlan explain(AbstractQueryContext explainCtx) throws LensException
explainCtx - The explain contextLensException - the lens exceptionpublic void validate(AbstractQueryContext pContext) throws LensException
pContext - context to validateLensExceptionpublic void prepare(PreparedQueryContext pContext) throws LensException
pContext - the contextLensException - the lens exceptionpublic DriverQueryPlan explainAndPrepare(PreparedQueryContext pContext) throws LensException
pContext - the contextLensException - the lens exceptionpublic void closePreparedQuery(QueryPrepareHandle handle) throws LensException
handle - The query handleLensException - the lens exceptionpublic LensResultSet execute(QueryContext context) throws LensException
context - the contextLensException - the lens exceptionpublic void executeAsync(QueryContext context) throws LensException
context - The query contextLensException - the lens exceptionpublic void updateStatus(QueryContext context) throws LensException
context - The query handleLensException - the lens exceptionpublic void closeResultSet(QueryHandle handle) throws LensException
handle - The query handleLensException - the lens exceptionpublic boolean cancelQuery(QueryHandle handle) throws LensException
handle - The query handle.LensException - the lens exceptionpublic void closeQuery(QueryHandle handle) throws LensException
handle - The query handleLensException - the lens exceptionpublic void close()
throws LensException
LensException - the lens exceptionpublic void registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
driverEventListener - the driver event listenerpublic void readExternal(ObjectInput arg0) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput arg0) throws IOException
IOExceptionpublic StatusUpdateMethod getStatusUpdateMethod()
getStatusUpdateMethod in interface LensDrivergetStatusUpdateMethod in class AbstractLensDriver@Generated(value="lombok") public ConcurrentHashMap<QueryHandle,org.apache.lens.driver.jdbc.JDBCDriver.JdbcQueryContext> getQueryContextMap()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.