org.apache.hadoop.hive.ql.exec
Class MapRedTask
java.lang.Object
org.apache.hadoop.hive.ql.exec.Task<MapredWork>
org.apache.hadoop.hive.ql.exec.ExecDriver
org.apache.hadoop.hive.ql.exec.MapRedTask
- All Implemented Interfaces:
- Serializable, HadoopJobExecHook, Node
public class MapRedTask
- extends ExecDriver
- implements Serializable
Extension of ExecDriver:
- can optionally spawn a map-reduce task from a separate jvm
- will make last minute adjustments to map-reduce job parameters, viz:
* estimating number of reducers
* estimating whether job should run locally
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Task |
Task.FeedType |
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 |
Methods inherited from class org.apache.hadoop.hive.ql.exec.ExecDriver |
addInputPaths, checkFatalErrors, createTmpDirs, generateCmdLine, getName, getTopOperators, getType, hasReduce, initialize, isMapRedTask, localizeMRTmpFilesImpl, logPlanProgress, main, requireLock, setInputAttributes, updateCounters |
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, getResultSchema, getTaskTag, getWork, ifRetryCmdWhenFail, isLocalMode, isMapRedLocalTask, 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 |
MapRedTask
public MapRedTask()
MapRedTask
public MapRedTask(MapredWork plan,
org.apache.hadoop.mapred.JobConf job,
boolean isSilent)
throws HiveException
- Throws:
HiveException
execute
public int execute(DriverContext driverContext)
- Description copied from class:
ExecDriver
- Execute a query plan using Hadoop.
- Overrides:
execute
in class ExecDriver
- Returns:
- status of executing the task
mapStarted
public boolean mapStarted()
- Overrides:
mapStarted
in class ExecDriver
reduceStarted
public boolean reduceStarted()
- Overrides:
reduceStarted
in class ExecDriver
mapDone
public boolean mapDone()
- Overrides:
mapDone
in class ExecDriver
reduceDone
public boolean reduceDone()
- Overrides:
reduceDone
in class ExecDriver
isEligibleForLocalMode
public static String isEligibleForLocalMode(HiveConf conf,
int numReducers,
long inputLength,
long inputFileCount)
- Find out if a job can be run in local mode based on it's characteristics
- Parameters:
conf
- Hive ConfigurationnumReducers
- total number of reducers for this jobinputLength
- the size of the inputinputFileCount
- the number of files of input
- Returns:
- String null if job is eligible for local mode, reason otherwise
getReducer
public Operator<? extends OperatorDesc> getReducer()
- Overrides:
getReducer
in class Task<MapredWork>
Copyright © 2013 The Apache Software Foundation