public abstract class AbstractLensDriver extends Object implements LensDriver
| Constructor and Description |
|---|
AbstractLensDriver() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.hadoop.conf.Configuration conf,
String driverType,
String driverName)
Configure driver with
Configuration passed. |
Priority |
decidePriority(AbstractQueryContext queryContext)
decide priority based on query's cost.
|
LensResultSet |
fetchResultSet(QueryContext ctx)
Default implementation for fetchResultSet for all drivers.
|
org.apache.hadoop.conf.Configuration |
getConf()
Get driver configuration
|
String |
getFullyQualifiedName()
Driver's fully qualified name ( Example hive/hive1, jdbc/mysql1)
|
com.google.common.collect.ImmutableSet<QueryLaunchingConstraint> |
getQueryConstraints() |
DriverQueryHook |
getQueryHook() |
RetryPolicyDecider<QueryContext> |
getRetryPolicyDecider() |
StatusUpdateMethod |
getStatusUpdateMethod() |
com.google.common.collect.ImmutableSet<WaitingQueriesSelectionPolicy> |
getWaitingQuerySelectionPolicies() |
void |
registerForCompletionNotification(QueryContext context,
long timeoutMillis,
QueryCompletionListener listener)
Register for query completion notification.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitcancelQuery, close, closePreparedQuery, closeQuery, closeResultSet, estimate, execute, executeAsync, explain, explainAndPrepare, prepare, registerDriverEventListener, updateStatusreadExternal, writeExternalpublic void configure(org.apache.hadoop.conf.Configuration conf,
String driverType,
String driverName)
throws LensException
LensDriverConfiguration passed.configure in interface LensDriverconf - The configuration objectdriverType - Type of the driver (Example: hive, jdbc, el)driverName - Name of this driverLensException - the lens exceptionpublic LensResultSet fetchResultSet(QueryContext ctx) throws LensException
createResultSet(QueryContext)fetchResultSet in interface LensDriverctx - The query contextLensException - the lens exceptionpublic Priority decidePriority(AbstractQueryContext queryContext)
LensDriverdecidePriority in interface LensDriverqueryContext - Query context whose priority is to be decidedpublic StatusUpdateMethod getStatusUpdateMethod()
getStatusUpdateMethod in interface LensDriverpublic void registerForCompletionNotification(QueryContext context, long timeoutMillis, QueryCompletionListener listener)
LensDriverregisterForCompletionNotification in interface LensDrivercontext - the contexttimeoutMillis - the timeout millislistener - the listener. Only query completions are guaranteed to be notified.
Notably: SUCCESS and FAILURE@Generated(value="lombok") public String getFullyQualifiedName()
getFullyQualifiedName in interface LensDriver@Generated(value="lombok") public org.apache.hadoop.conf.Configuration getConf()
LensDrivergetConf in interface LensDriver@Generated(value="lombok") public com.google.common.collect.ImmutableSet<QueryLaunchingConstraint> getQueryConstraints()
getQueryConstraints in interface LensDriverQueryLaunchingConstraints to be checked before launching a query on driver. If there are no
driver level constraints, then an empty set is returned. null is never returned.@Generated(value="lombok") public com.google.common.collect.ImmutableSet<WaitingQueriesSelectionPolicy> getWaitingQuerySelectionPolicies()
getWaitingQuerySelectionPolicies in interface LensDriverWaitingQueriesSelectionPolicys to be used to select waiting queries eligible to be moved out
of waiting state. If there are no driver level waiting query selection policies, then an empty set is returned.
null is never returned.@Generated(value="lombok") public RetryPolicyDecider<QueryContext> getRetryPolicyDecider()
getRetryPolicyDecider in interface LensDriver@Generated(value="lombok") public DriverQueryHook getQueryHook()
getQueryHook in interface LensDriverfor more details.Copyright © 2014–2018 Apache Software Foundation. All rights reserved.