public class ESDriver extends AbstractLensDriver
Constructor and Description |
---|
ESDriver() |
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)
removing the result set as soon as the fetch is done
|
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)
Elastic search does not have a concept of prepared query.
|
void |
executeAsync(QueryContext context)
Asynchronously execute the query.
|
DriverQueryPlan |
explain(AbstractQueryContext context)
Explain the given query.
|
DriverQueryPlan |
explainAndPrepare(PreparedQueryContext pContext)
Explain and prepare the given query.
|
LensResultSet |
fetchResultSet(QueryContext context)
Default implementation for fetchResultSet for all drivers.
|
void |
prepare(PreparedQueryContext pContext)
Prepare the given query.
|
void |
readExternal(ObjectInput in)
This flow could be abstracted out at the driver level
|
void |
registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
Add a listener for driver events.
|
void |
updateStatus(QueryContext context)
Update driver query status in the context object.
|
void |
writeExternal(ObjectOutput out) |
decidePriority, getConf, getFullyQualifiedName, getQueryConstraints, getQueryHook, getRetryPolicyDecider, getStatusUpdateMethod, getWaitingQuerySelectionPolicies, registerForCompletionNotification, toString
public QueryCost estimate(AbstractQueryContext qctx)
LensDriver
qctx
- The query contextpublic DriverQueryPlan explain(AbstractQueryContext context) throws LensException
LensDriver
context
- The explain contextLensException
- the lens exceptionpublic void prepare(PreparedQueryContext pContext) throws LensException
LensDriver
pContext
- the contextLensException
- the lens exceptionpublic DriverQueryPlan explainAndPrepare(PreparedQueryContext pContext) throws LensException
LensDriver
pContext
- the contextLensException
- the lens exceptionpublic void closePreparedQuery(QueryPrepareHandle handle)
LensDriver
handle
- The query handlepublic LensResultSet execute(QueryContext context) throws LensException
context
- the contextLensException
- the lens exceptionpublic void executeAsync(QueryContext context)
LensDriver
context
- The query contextpublic void updateStatus(QueryContext context)
LensDriver
context
- The query contextpublic LensResultSet fetchResultSet(QueryContext context) throws LensException
AbstractLensDriver
AbstractLensDriver.createResultSet(QueryContext)
fetchResultSet
in interface LensDriver
fetchResultSet
in class AbstractLensDriver
context
- The query contextLensException
- the lens exceptionpublic void closeResultSet(QueryHandle handle) throws LensException
handle
- The query handleLensException
- the lens exceptionpublic boolean cancelQuery(QueryHandle handle) throws LensException
LensDriver
handle
- The query handle.LensException
- the lens exceptionpublic void closeQuery(QueryHandle handle) throws LensException
LensDriver
handle
- The query handleLensException
- the lens exceptionpublic void close() throws LensException
LensDriver
LensException
- the lens exceptionpublic void registerDriverEventListener(LensEventListener<DriverEvent> driverEventListener)
LensDriver
driverEventListener
- the driver event listenerpublic void configure(org.apache.hadoop.conf.Configuration conf, String driverType, String driverName) throws LensException
LensDriver
Configuration
passed.configure
in interface LensDriver
configure
in class AbstractLensDriver
conf
- The configuration objectdriverType
- Type of the driver (Example: hive, jdbc, el)driverName
- Name of this driverLensException
- the lens exceptionpublic void writeExternal(ObjectOutput out) throws IOException
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.