org.apache.hadoop.hive.ql.exec
Class ExplainTask

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.Task<ExplainWork>
      extended by org.apache.hadoop.hive.ql.exec.ExplainTask
All Implemented Interfaces:
Serializable, Node

public class ExplainTask
extends Task<ExplainWork>
implements Serializable

ExplainTask implementation.

See Also:
Serialized Form

Nested Class Summary
 class ExplainTask.MethodComparator
          MethodComparator.
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Task
Task.FeedType
 
Field Summary
static String EXPL_COLUMN_NAME
           
 
Fields inherited from class org.apache.hadoop.hive.ql.exec.Task
BACKUP_COMMON_JOIN, COMMON_JOIN, CONVERTED_MAPJOIN, CONVERTED_MAPJOIN_LOCAL, CONVERTED_SORTMERGEJOIN, HINTED_MAPJOIN, HINTED_MAPJOIN_LOCAL, MAPJOIN_ONLY_NOBACKUP, NO_TAG, taskCounters, taskHandle
 
Constructor Summary
ExplainTask()
           
 
Method Summary
 int execute(DriverContext driverContext)
          This method is overridden in each Task.
 org.json.JSONObject getJSONLogicalPlan(PrintStream out, ExplainWork work)
           
 org.json.JSONObject getJSONPlan(PrintStream out, ExplainWork work)
           
 org.json.JSONObject getJSONPlan(PrintStream out, String ast, List<Task<?>> tasks, Task<?> fetchTask, boolean jsonOutput, boolean isExtended, boolean appendTaskType)
           
 String getName()
          Gets the name of the node.
 List<org.apache.hadoop.hive.metastore.api.FieldSchema> getResultSchema()
           
 org.apache.hadoop.hive.ql.plan.api.StageType getType()
          Should be overridden to return the type of the specific task among the types in StageType.
 String outputAST(String treeString, PrintStream out, boolean jsonOutput, int indent)
           
 org.json.JSONObject outputDependencies(PrintStream out, boolean jsonOutput, boolean appendTaskType, List<Task> tasks)
           
 org.json.JSONObject outputStagePlans(PrintStream out, List<Task> tasks, boolean jsonOutput, boolean isExtended)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.Task
addDependentTask, done, equals, executeTask, getAndInitBackupTask, getBackupChildrenTasks, getBackupTask, getChildren, getChildTasks, getCounters, getDependentTasks, getDriverContext, getFeedSubscribers, getId, getInitialized, getJobID, getParentTasks, getQueryPlan, getQueued, getReducer, getTaskHandle, getTaskTag, getTopOperators, getWork, hashCode, hasReduce, ifRetryCmdWhenFail, initialize, isLocalMode, isMapRedLocalTask, isMapRedTask, isRootTask, isRunnable, removeDependentTask, removeFromChildrenTasks, requireLock, setBackupChildrenTasks, setBackupTask, setChildTasks, setConsole, setDone, setFeedSubscribers, setId, setInitialized, setLocalMode, setParentTasks, setQueryPlan, setQueued, setRetryCmdWhenFail, setRootTask, setStarted, setTaskTag, setWork, shutdown, started, subscribeFeed, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPL_COLUMN_NAME

public static final String EXPL_COLUMN_NAME
See Also:
Constant Field Values
Constructor Detail

ExplainTask

public ExplainTask()
Method Detail

getJSONLogicalPlan

public org.json.JSONObject getJSONLogicalPlan(PrintStream out,
                                              ExplainWork work)
                                       throws Exception
Throws:
Exception

getJSONPlan

public org.json.JSONObject getJSONPlan(PrintStream out,
                                       ExplainWork work)
                                throws Exception
Throws:
Exception

getJSONPlan

public org.json.JSONObject getJSONPlan(PrintStream out,
                                       String ast,
                                       List<Task<?>> tasks,
                                       Task<?> fetchTask,
                                       boolean jsonOutput,
                                       boolean isExtended,
                                       boolean appendTaskType)
                                throws Exception
Throws:
Exception

execute

public int execute(DriverContext driverContext)
Description copied from class: Task
This method is overridden in each Task. TODO execute should return a TaskHandle.

Returns:
status of executing the task

outputAST

public String outputAST(String treeString,
                        PrintStream out,
                        boolean jsonOutput,
                        int indent)
                 throws org.json.JSONException
Throws:
org.json.JSONException

outputDependencies

public org.json.JSONObject outputDependencies(PrintStream out,
                                              boolean jsonOutput,
                                              boolean appendTaskType,
                                              List<Task> tasks)
                                       throws Exception
Throws:
Exception

outputStagePlans

public org.json.JSONObject outputStagePlans(PrintStream out,
                                            List<Task> tasks,
                                            boolean jsonOutput,
                                            boolean isExtended)
                                     throws Exception
Throws:
Exception

getType

public org.apache.hadoop.hive.ql.plan.api.StageType getType()
Description copied from class: Task
Should be overridden to return the type of the specific task among the types in StageType.

Specified by:
getType in class Task<ExplainWork>
Returns:
StageType.* or null if not overridden

getName

public String getName()
Description copied from interface: Node
Gets the name of the node. This is used in the rule dispatchers.

Specified by:
getName in interface Node
Returns:
String

getResultSchema

public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getResultSchema()
Overrides:
getResultSchema in class Task<ExplainWork>


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