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

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

public class FetchTask
extends Task<FetchWork>
implements Serializable

FetchTask implementation.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Task
Task.FeedType
 
Field Summary
 
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
FetchTask()
           
 
Method Summary
 void clearFetch()
          Clear the Fetch Operator.
 int execute(DriverContext driverContext)
          This method is overridden in each Task.
 boolean fetch(List res)
           
 int getMaxRows()
          Return the maximum number of rows returned by fetch.
 String getName()
          Gets the name of the node.
 TableDesc getTblDesc()
          Return the tableDesc of the fetchWork.
 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.
 void initialize(HiveConf conf, QueryPlan queryPlan, DriverContext ctx)
           
 void setMaxRows(int maxRows)
          Set the maximum number of rows returned by fetch.
 
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, getResultSchema, getTaskHandle, getTaskTag, getTopOperators, getWork, hashCode, hasReduce, ifRetryCmdWhenFail, 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
 

Constructor Detail

FetchTask

public FetchTask()
Method Detail

initialize

public void initialize(HiveConf conf,
                       QueryPlan queryPlan,
                       DriverContext ctx)
Overrides:
initialize in class Task<FetchWork>

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

getTblDesc

public TableDesc getTblDesc()
Return the tableDesc of the fetchWork.


getMaxRows

public int getMaxRows()
Return the maximum number of rows returned by fetch.


setMaxRows

public void setMaxRows(int maxRows)
Set the maximum number of rows returned by fetch.


fetch

public boolean fetch(List res)
              throws IOException,
                     CommandNeedRetryException
Throws:
IOException
CommandNeedRetryException

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<FetchWork>
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

clearFetch

public void clearFetch()
                throws HiveException
Clear the Fetch Operator.

Throws:
HiveException


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