This project has retired. For details please refer to its Attic page.
DriverQueryPlan (Lens 2.1.0-beta-incubating API)

org.apache.lens.server.api.driver
Class DriverQueryPlan

java.lang.Object
  extended by org.apache.lens.server.api.driver.DriverQueryPlan
Direct Known Subclasses:
HiveQueryPlan, RewriterPlan

public abstract class DriverQueryPlan
extends Object

The Class DriverQueryPlan.


Nested Class Summary
static class DriverQueryPlan.ExecMode
          The Enum ExecMode.
static class DriverQueryPlan.ScanMode
          The Enum ScanMode.
 
Constructor Summary
DriverQueryPlan()
           
 
Method Summary
abstract  QueryCost getCost()
          Get the cost associated with the plan
 DriverQueryPlan.ExecMode getExecMode()
          Get the exec mode
 QueryHandle getHandle()
          Deprecated.  
 Map<String,Set<?>> getPartitions()
          Get list of partitions queried for each table
abstract  String getPlan()
          Get the query plan
 QueryPrepareHandle getPrepareHandle()
           
 String getResultDestination()
          Get the result destination
 DriverQueryPlan.ScanMode getScanMode()
          Get the scan mode.
 Set<String> getTablesQueried()
          Get the list of tables to be queried
 Double getTableWeight(String tableName)
          Get the weight of the table.
 Map<String,Double> getTableWeights()
          Get the table weights
 boolean hasSubQuery()
          Get if the query has a subquery or not.
 void setPrepareHandle(QueryPrepareHandle handle)
           
 QueryPlan toQueryPlan()
          To query plan.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverQueryPlan

public DriverQueryPlan()
Method Detail

getPlan

public abstract String getPlan()
Get the query plan

Returns:
The string representation of the plan

getCost

public abstract QueryCost getCost()
Get the cost associated with the plan

Returns:
QueryCost object

getTablesQueried

public Set<String> getTablesQueried()
Get the list of tables to be queried

Returns:
the tablesQueried

hasSubQuery

public boolean hasSubQuery()
Get if the query has a subquery or not.

Returns:
the hasSubQuery true if query has subquery, false otherwise

getResultDestination

public String getResultDestination()
Get the result destination

Returns:
the resultDestination The destination can be another table or filesystem path or inmemory result

getTableWeights

public Map<String,Double> getTableWeights()
Get the table weights

Returns:
the tableWeights

getTableWeight

public Double getTableWeight(String tableName)
Get the weight of the table.

Parameters:
tableName - the table name
Returns:
the weight

getExecMode

public DriverQueryPlan.ExecMode getExecMode()
Get the exec mode

Returns:
the DriverQueryPlan.ExecMode

getScanMode

public DriverQueryPlan.ScanMode getScanMode()
Get the scan mode.

Returns:
the DriverQueryPlan.ScanMode

getHandle

public QueryHandle getHandle()
Deprecated. 

Returns:
the handle

getPrepareHandle

public QueryPrepareHandle getPrepareHandle()
Returns:
the prepare handle

setPrepareHandle

public void setPrepareHandle(QueryPrepareHandle handle)
Parameters:
handle - the handle to set

getPartitions

public Map<String,Set<?>> getPartitions()
Get list of partitions queried for each table

Returns:

toQueryPlan

public QueryPlan toQueryPlan()
                      throws UnsupportedEncodingException
To query plan.

Returns:
the query plan
Throws:
UnsupportedEncodingException - the unsupported encoding exception


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