org.apache.hadoop.hive.ql
Class QueryPlan

java.lang.Object
  extended by org.apache.hadoop.hive.ql.QueryPlan
All Implemented Interfaces:
Serializable

public class QueryPlan
extends Object
implements Serializable

QueryPlan can be serialized to disk so that we can restart/resume the progress of it in the future, either within or outside of the current jvm.

See Also:
Serialized Form

Constructor Summary
QueryPlan()
           
QueryPlan(String queryString, BaseSemanticAnalyzer sem, Long startTime)
           
QueryPlan(String queryString, BaseSemanticAnalyzer sem, Long startTime, String queryId)
           
 
Method Summary
 ColumnAccessInfo getColumnAccessInfo()
          Gets the column access information.
 Map<String,Map<String,Long>> getCounters()
           
 Set<String> getDone()
           
 FetchTask getFetchTask()
           
 HashMap<String,String> getIdToTableNameMap()
           
 HashSet<ReadEntity> getInputs()
           
 String getJSONKeyValue(Object key, Object value)
           
 String getJSONMap(Map map)
           
 String getJSONQuery(org.apache.hadoop.hive.ql.plan.api.Query query)
           
 String getJSONValue(Object value)
           
 LineageInfo getLineageInfo()
          Gets the lineage information.
 HashSet<WriteEntity> getOutputs()
           
 org.apache.hadoop.hive.ql.plan.api.Query getQuery()
           
 String getQueryId()
           
 org.apache.hadoop.hive.ql.plan.api.Query getQueryPlan()
           
 QueryProperties getQueryProperties()
           
 Long getQueryStartTime()
           
 String getQueryStr()
           
 String getQueryString()
           
 List<ReducerTimeStatsPerJob> getReducerTimeStatsPerJobList()
           
 ArrayList<Task<? extends Serializable>> getRootTasks()
           
 Set<String> getStarted()
           
 TableAccessInfo getTableAccessInfo()
          Gets the table access information.
 boolean isExplain()
           
static String makeQueryId()
           
 void setColumnAccessInfo(ColumnAccessInfo columnAccessInfo)
          Sets the column access information.
 void setDone()
           
 void setFetchTask(FetchTask fetchTask)
           
 void setIdToTableNameMap(HashMap<String,String> idToTableNameMap)
           
 void setInputs(HashSet<ReadEntity> inputs)
           
 void setLineageInfo(LineageInfo linfo)
          Sets the lineage information.
 void setOutputs(HashSet<WriteEntity> outputs)
           
 void setQuery(org.apache.hadoop.hive.ql.plan.api.Query query)
           
 void setQueryId(String queryId)
           
 void setQueryStartTime(Long queryStartTime)
           
 void setQueryString(String queryString)
           
 void setRootTasks(ArrayList<Task<? extends Serializable>> rootTasks)
           
 void setStarted()
           
 void setTableAccessInfo(TableAccessInfo tableAccessInfo)
          Sets the table access information.
 String toBinaryString()
           
 String toString()
           
 String toThriftJSONString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryPlan

public QueryPlan()

QueryPlan

public QueryPlan(String queryString,
                 BaseSemanticAnalyzer sem,
                 Long startTime)

QueryPlan

public QueryPlan(String queryString,
                 BaseSemanticAnalyzer sem,
                 Long startTime,
                 String queryId)
Method Detail

getQueryStr

public String getQueryStr()

getQueryId

public String getQueryId()

makeQueryId

public static String makeQueryId()

getQueryPlan

public org.apache.hadoop.hive.ql.plan.api.Query getQueryPlan()
                                                      throws IOException
Throws:
IOException

getJSONValue

public String getJSONValue(Object value)

getJSONKeyValue

public String getJSONKeyValue(Object key,
                              Object value)

getJSONMap

public String getJSONMap(Map map)

getJSONQuery

public String getJSONQuery(org.apache.hadoop.hive.ql.plan.api.Query query)

isExplain

public boolean isExplain()

toString

public String toString()
Overrides:
toString in class Object

toThriftJSONString

public String toThriftJSONString()
                          throws IOException
Throws:
IOException

toBinaryString

public String toBinaryString()
                      throws IOException
Throws:
IOException

setStarted

public void setStarted()

setDone

public void setDone()

getStarted

public Set<String> getStarted()

getDone

public Set<String> getDone()

getRootTasks

public ArrayList<Task<? extends Serializable>> getRootTasks()

setRootTasks

public void setRootTasks(ArrayList<Task<? extends Serializable>> rootTasks)

getFetchTask

public FetchTask getFetchTask()

setFetchTask

public void setFetchTask(FetchTask fetchTask)

getInputs

public HashSet<ReadEntity> getInputs()

setInputs

public void setInputs(HashSet<ReadEntity> inputs)

getOutputs

public HashSet<WriteEntity> getOutputs()

setOutputs

public void setOutputs(HashSet<WriteEntity> outputs)

getIdToTableNameMap

public HashMap<String,String> getIdToTableNameMap()

setIdToTableNameMap

public void setIdToTableNameMap(HashMap<String,String> idToTableNameMap)

getQueryString

public String getQueryString()

setQueryString

public void setQueryString(String queryString)

getQuery

public org.apache.hadoop.hive.ql.plan.api.Query getQuery()

getReducerTimeStatsPerJobList

public List<ReducerTimeStatsPerJob> getReducerTimeStatsPerJobList()

setQuery

public void setQuery(org.apache.hadoop.hive.ql.plan.api.Query query)

getCounters

public Map<String,Map<String,Long>> getCounters()

setQueryId

public void setQueryId(String queryId)

getLineageInfo

public LineageInfo getLineageInfo()
Gets the lineage information.

Returns:
LineageInfo associated with the query.

setLineageInfo

public void setLineageInfo(LineageInfo linfo)
Sets the lineage information.

Parameters:
linfo - The LineageInfo structure that is set in the optimization phase.

getTableAccessInfo

public TableAccessInfo getTableAccessInfo()
Gets the table access information.

Returns:
TableAccessInfo associated with the query.

setTableAccessInfo

public void setTableAccessInfo(TableAccessInfo tableAccessInfo)
Sets the table access information.

Parameters:
tableAccessInfo - The TableAccessInfo structure that is set right before the optimization phase.

getColumnAccessInfo

public ColumnAccessInfo getColumnAccessInfo()
Gets the column access information.

Returns:
ColumnAccessInfo associated with the query.

setColumnAccessInfo

public void setColumnAccessInfo(ColumnAccessInfo columnAccessInfo)
Sets the column access information.

Parameters:
columnAccessInfo - The ColumnAccessInfo structure that is set immediately after the optimization phase.

getQueryProperties

public QueryProperties getQueryProperties()

getQueryStartTime

public Long getQueryStartTime()

setQueryStartTime

public void setQueryStartTime(Long queryStartTime)


Copyright © 2014 The Apache Software Foundation. All rights reserved.