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

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

public class MapredLocalTask
extends Task<MapredLocalWork>
implements Serializable

MapredLocalTask represents any local work (i.e.: client side work) that hive needs to execute. E.g.: This is used for generating Hashtables for Mapjoins on the client before the Join is executed on the cluster. MapRedLocalTask does not actually execute the work in process, but rather generates a command using ExecDriver. ExecDriver is what will finally drive processing the records.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Task
Task.FeedType
 
Field Summary
static org.apache.commons.logging.Log l4j
           
static MemoryMXBean memoryMXBean
           
 
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
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()
           
 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 driverContext)
           
 boolean isMapRedLocalTask()
           
static String now()
           
 boolean requireLock()
           
 void setExecContext(ExecMapperContext execContext)
           
 void shutdown()
           
 void startForward(String bigTableBucket)
           
 
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, getWork, hashCode, hasReduce, ifRetryCmdWhenFail, isLocalMode, isMapRedTask, isRootTask, isRunnable, removeDependentTask, removeFromChildrenTasks, setBackupChildrenTasks, setBackupTask, setChildTasks, setConsole, setDone, setFeedSubscribers, setId, setInitialized, setLocalMode, setParentTasks, setQueryPlan, setQueued, setRetryCmdWhenFail, setRootTask, setStarted, setTaskTag, setWork, started, subscribeFeed, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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

setExecContext

public void setExecContext(ExecMapperContext execContext)

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.

Returns:
status of executing the task

executeFromChildJVM

public int executeFromChildJVM(DriverContext driverContext)

startForward

public void startForward(String bigTableBucket)
                  throws Exception
Throws:
Exception

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

shutdown

public void shutdown()
Overrides:
shutdown in class Task<MapredLocalWork>


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