public interface DriverQueryHook
LensDriver.getQueryHook()
. Lens Server will invoke the driver hook at relevant points during
query execution. By default each driver exposes a NoOpDriverQueryHook
which does nothing when invoked.
The only use case I see right now is to provide a hook just after driver has been selected for a query and
before query is launched on the driver. One example usage for hive driver would be to add dynamic configuration or
stall execution of a query by looking at the final translated query itself (based on table involved, filters
involved, etc in the query).
This interface is expected to evolve for some time as more needs for hook are discoveredModifier and Type | Method and Description |
---|---|
void |
postDriverSelection(AbstractQueryContext ctx)
Called just after driver has been selected to execute a query.
|
void |
preLaunch(QueryContext ctx)
Called just before launching the query on the selected driver.
|
void preLaunch(QueryContext ctx) throws LensException
ctx
- LensException
void postDriverSelection(AbstractQueryContext ctx) throws LensException
AbstractQueryContext.updateConf(Map)
to ensure the modified configration is persisted and is available
on server restarts and other bookkeeping needs.ctx
- LensException
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.