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

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

public class MapredLocalTask
extends Task<MapredLocalWork>
implements Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Task
Task.FeedType
 
Field Summary
protected  HadoopJobExecHelper jobExecHelper
           
static org.apache.commons.logging.Log l4j
           
static MemoryMXBean memoryMXBean
           
 
Fields inherited from class org.apache.hadoop.hive.ql.exec.Task
BACKUP_COMMON_JOIN, backupChildrenTasks, backupTask, childTasks, clonedConf, COMMON_JOIN, conf, console, CONVERTED_LOCAL_MAPJOIN, CONVERTED_MAPJOIN, db, driverContext, feedSubscribers, id, initialized, isdone, jobID, LOCAL_MAPJOIN, NO_TAG, parentTasks, queryPlan, queued, started, taskCounters, taskHandle, taskTag, work
 
Constructor Summary
MapredLocalTask()
           
MapredLocalTask(MapredLocalWork plan, org.apache.hadoop.mapred.JobConf job, boolean isSilent)
           
 
Method Summary
 int execute(DriverContext driverContext)
          This method is overridden in each Task.
 int executeFromChildJVM(DriverContext driverContext)
           
 String getName()
          Gets the name of the node.
 Collection<Operator<? extends OperatorDesc>> getTopOperators()
           
 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 driverContext)
           
 boolean isMapRedLocalTask()
           
 void localizeMRTmpFilesImpl(Context ctx)
          If this task uses any map-reduce intermediate data (either for reading or for writing), localize them (using the supplied Context).
static String now()
           
 boolean requireLock()
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.Task
addDependentTask, cloneConf, done, executeTask, fetch, getAndInitBackupTask, getBackupChildrenTasks, getBackupTask, getChildren, getChildTasks, getCounters, getDependentTasks, getFeedSubscribers, getId, getInitialized, getJobID, getParentTasks, getQueryPlan, getQueued, getReducer, getResultSchema, getTaskTag, getWork, hasReduce, ifRetryCmdWhenFail, isLocalMode, isMapRedTask, isRunnable, localizeMRTmpFiles, pushFeed, receiveFeed, removeDependentTask, removeFromChildrenTasks, setBackupChildrenTasks, setBackupTask, setChildTasks, setDone, setFeedSubscribers, setId, setInitialized, setLocalMode, setParentTasks, setQueryPlan, setQueued, setRetryCmdWhenFail, setStarted, setTaskTag, setWork, started, subscribeFeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jobExecHelper

protected HadoopJobExecHelper jobExecHelper

l4j

public static final transient org.apache.commons.logging.Log l4j

memoryMXBean

public static MemoryMXBean memoryMXBean
Constructor Detail

MapredLocalTask

public MapredLocalTask()

MapredLocalTask

public MapredLocalTask(MapredLocalWork plan,
                       org.apache.hadoop.mapred.JobConf job,
                       boolean isSilent)
                throws HiveException
Throws:
HiveException
Method Detail

initialize

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

now

public static String now()

requireLock

public boolean requireLock()
Overrides:
requireLock in class Task<MapredLocalWork>

execute

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

Specified by:
execute in class Task<MapredLocalWork>
Returns:
status of executing the task

executeFromChildJVM

public int executeFromChildJVM(DriverContext driverContext)

localizeMRTmpFilesImpl

public void localizeMRTmpFilesImpl(Context ctx)
Description copied from class: Task
If this task uses any map-reduce intermediate data (either for reading or for writing), localize them (using the supplied Context). Map-Reduce intermediate directories are allocated using Context.getMRTmpFileURI() and can be localized using localizeMRTmpFileURI(). This method is declared abstract to force any task code to explicitly deal with this aspect of execution.

Specified by:
localizeMRTmpFilesImpl in class Task<MapredLocalWork>
Parameters:
ctx - context object with which to localize

isMapRedLocalTask

public boolean isMapRedLocalTask()
Overrides:
isMapRedLocalTask in class Task<MapredLocalWork>

getTopOperators

public Collection<Operator<? extends OperatorDesc>> getTopOperators()
Overrides:
getTopOperators in class Task<MapredLocalWork>

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

getType

public 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<MapredLocalWork>
Returns:
StageType.* or null if not overridden


Copyright © 2013 The Apache Software Foundation