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

public class FetchTask
extends Task<fetchWork>
implements Serializable

FetchTask implementation

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.hadoop.hive.ql.exec.Task
childTasks, conf, console, db, id, initialized, isdone, LOG, parentTasks, queryPlan, queued, started, taskCounters, taskHandle, work
 
Constructor Summary
FetchTask()
           
 
Method Summary
 int execute()
          This method is overridden in each Task.
 boolean fetch(Vector<String> res)
           
 int getMaxRows()
          Return the maximum number of rows returned by fetch
 tableDesc getTblDesc()
          Return the tableDesc of the fetchWork
 int getType()
          Should be overridden to return the type of the specific task among the types in TaskType
 void initialize(HiveConf conf, QueryPlan queryPlan)
           
 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, executeTask, getChildTasks, getCounters, getId, getInitialized, getParentTasks, getQueued, getWork, hasReduce, isMapRedTask, isRunnable, progress, removeDependentTask, setChildTasks, setDone, setId, setInitialized, setParentTasks, setQueued, setStarted, setWork, started, updateCounters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FetchTask

public FetchTask()
Method Detail

initialize

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

execute

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

Specified by:
execute in class Task<fetchWork>
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(Vector<String> res)
              throws IOException
Overrides:
fetch in class Task<fetchWork>
Throws:
IOException

getType

public int getType()
Description copied from class: Task
Should be overridden to return the type of the specific task among the types in TaskType

Overrides:
getType in class Task<fetchWork>
Returns:
TaskTypeType.* or -1 if not overridden


Copyright © 2009 The Apache Software Foundation