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, wait
cancelQuery, close, closePreparedQuery, closeQuery, closeResultSet, estimate, execute, executeAsync, explain, explainAndPrepare, prepare, registerDriverEventListener, updateStatus
readExternal, writeExternal
public void configure(org.apache.hadoop.conf.Configuration conf, String driverType, String driverName) throws LensException
LensDriver
Configuration
passed.configure
in interface LensDriver
conf
- 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 LensDriver
ctx
- The query contextLensException
- the lens exceptionpublic Priority decidePriority(AbstractQueryContext queryContext)
LensDriver
decidePriority
in interface LensDriver
queryContext
- Query context whose priority is to be decidedpublic StatusUpdateMethod getStatusUpdateMethod()
getStatusUpdateMethod
in interface LensDriver
public void registerForCompletionNotification(QueryContext context, long timeoutMillis, QueryCompletionListener listener)
LensDriver
registerForCompletionNotification
in interface LensDriver
context
- 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()
LensDriver
getConf
in interface LensDriver
@Generated(value="lombok") public com.google.common.collect.ImmutableSet<QueryLaunchingConstraint> getQueryConstraints()
getQueryConstraints
in interface LensDriver
QueryLaunchingConstraint
s 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 LensDriver
WaitingQueriesSelectionPolicy
s 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 LensDriver
for more details.
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.