org.apache.lens.server.api.query
Class AbstractQueryContext

java.lang.Object
  extended by org.apache.lens.server.api.query.AbstractQueryContext
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExplainQueryContext, PreparedQueryContext, QueryContext

public abstract class AbstractQueryContext
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static org.apache.commons.logging.Log LOG
          The Constant LOG
 
Method Summary
 void estimateCostForDrivers()
          Estimate cost for each driver and set in context
 org.apache.hadoop.conf.Configuration getDriverConf(LensDriver driver)
          Get driver conf
 String getDriverQuery(LensDriver driver)
          Get driver query
 QueryCost getDriverQueryCost(LensDriver driver)
          Get query cost for the driver
 Exception getDriverRewriteError(LensDriver driver)
          Get exception during rewrite.
 LensDriver getSelectedDriver()
          Wrapper method for convenience on driver context
 org.apache.hadoop.conf.Configuration getSelectedDriverConf()
          Wrapper method for convenience on driver context
 String getSelectedDriverQuery()
          Wrapper method for convenience on driver context
 QueryCost getSelectedDriverQueryCost()
          Get selected driver's cost
 DriverQueryPlan getSelectedDriverQueryPlan()
          Wrapper method for convenience on driver context
 void setDriverQueries(Map<LensDriver,String> driverQueries)
          Set driver queries
 void setDriverRewriteError(LensDriver driver, Exception exp)
          Set exception during rewrite.
 void setSelectedDriver(LensDriver driver)
          Wrapper method for convenience on driver context
 void setSelectedDriverQuery(String driverQuery)
          Sets the selected driver query for persistence and also in the driver context
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
The Constant LOG

Method Detail

setDriverQueries

public void setDriverQueries(Map<LensDriver,String> driverQueries)
                      throws LensException
Set driver queries

Parameters:
driverQueries - Map of LensDriver to driver's query
Throws:
LensException

estimateCostForDrivers

public void estimateCostForDrivers()
                            throws LensException
Estimate cost for each driver and set in context

Throws:
LensException

getSelectedDriverQuery

public String getSelectedDriverQuery()
Wrapper method for convenience on driver context

Returns:
the selected driver's query

getDriverQuery

public String getDriverQuery(LensDriver driver)
Get driver query

Parameters:
driver -
Returns:
query

getDriverConf

public org.apache.hadoop.conf.Configuration getDriverConf(LensDriver driver)
Get driver conf

Parameters:
driver -
Returns:
Configuration

getDriverQueryCost

public QueryCost getDriverQueryCost(LensDriver driver)
Get query cost for the driver

Parameters:
driver -
Returns:
QueryCost

getSelectedDriverConf

public org.apache.hadoop.conf.Configuration getSelectedDriverConf()
Wrapper method for convenience on driver context

Returns:
the selected driver's conf

setSelectedDriverQuery

public void setSelectedDriverQuery(String driverQuery)
Sets the selected driver query for persistence and also in the driver context

Parameters:
driverQuery -

setSelectedDriver

public void setSelectedDriver(LensDriver driver)
Wrapper method for convenience on driver context

Parameters:
driver - Lens driver

getSelectedDriver

public LensDriver getSelectedDriver()
Wrapper method for convenience on driver context

Returns:
the selected driver

getSelectedDriverQueryPlan

public DriverQueryPlan getSelectedDriverQueryPlan()
                                           throws LensException
Wrapper method for convenience on driver context

Returns:
the selected driver
Throws:
LensException

getSelectedDriverQueryCost

public QueryCost getSelectedDriverQueryCost()
                                     throws LensException
Get selected driver's cost

Returns:
QueryCost
Throws:
LensException

setDriverRewriteError

public void setDriverRewriteError(LensDriver driver,
                                  Exception exp)
Set exception during rewrite.

Parameters:
driver -
exp -

getDriverRewriteError

public Exception getDriverRewriteError(LensDriver driver)
Get exception during rewrite.

Parameters:
driver -
Returns:
exp


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.