public class ExecDriver extends Task<MapredWork> implements Serializable, HadoopJobExecHook
Task.FeedType, Task.TaskState| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.mapred.JobConf |
job |
protected HadoopJobExecHelper |
jobExecHelper |
protected static org.slf4j.Logger |
LOG |
static MemoryMXBean |
memoryMXBean |
BACKUP_COMMON_JOIN, backupChildrenTasks, backupTask, childTasks, clonedConf, COMMON_JOIN, conf, console, CONVERTED_MAPJOIN, CONVERTED_MAPJOIN_LOCAL, CONVERTED_SORTMERGEJOIN, driverContext, feedSubscribers, HINTED_MAPJOIN, HINTED_MAPJOIN_LOCAL, id, jobID, MAPJOIN_ONLY_NOBACKUP, NO_TAG, parentTasks, queryDisplay, queryPlan, queryState, rootTask, taskCounters, taskHandle, taskTag, work| Constructor and Description |
|---|
ExecDriver()
Constructor when invoked from QL.
|
ExecDriver(MapredWork plan,
org.apache.hadoop.mapred.JobConf job,
boolean isSilent)
Constructor/Initialization for invocation as independent utility.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkFatalErrors(org.apache.hadoop.mapred.Counters ctrs,
StringBuilder errMsg)
Fatal errors are those errors that cannot be recovered by retries.
|
int |
execute(DriverContext driverContext)
Execute a query plan using Hadoop.
|
static String |
generateCmdLine(HiveConf hconf,
Context ctx)
Given a Hive Configuration object - generate a command line fragment for passing such
configuration information to ExecDriver.
|
static String |
getCurrentDB() |
String |
getExternalHandle() |
Collection<MapWork> |
getMapWork() |
String |
getName()
Gets the name of the node.
|
protected static String |
getResource(HiveConf conf,
SessionState.ResourceType resType)
Retrieve the resources from the current session and configuration for the given type.
|
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.
|
boolean |
hasReduce() |
void |
initialize(QueryState queryState,
QueryPlan queryPlan,
DriverContext driverContext,
CompilationOpContext opContext)
Initialization when invoked from QL.
|
boolean |
isMapRedTask() |
boolean |
isTaskShutdown() |
void |
logPlanProgress(SessionState ss) |
static void |
main(String[] args) |
boolean |
mapDone() |
boolean |
mapStarted() |
static void |
propagateSplitSettings(org.apache.hadoop.mapred.JobConf job,
MapWork work) |
boolean |
reduceDone() |
boolean |
reduceStarted() |
boolean |
requireLock() |
protected void |
setInputAttributes(org.apache.hadoop.conf.Configuration conf)
Set hive input format, and input format file if necessary.
|
void |
shutdown() |
addDependentTask, canExecuteInParallel, cloneConf, done, equals, executeTask, findLeafs, getAndInitBackupTask, getBackupChildrenTasks, getBackupTask, getChildren, getChildTasks, getCounters, getDependentTasks, getDiagnosticsMessage, getDriverContext, getFeedSubscribers, getHive, getId, getInitialized, getJobID, getNumChild, getNumParent, getParentTasks, getQueryPlan, getQueryState, getQueued, getReducer, getStatusMessage, getTaskHandle, getTaskState, getTaskTag, getTxnMgr, getWork, hashCode, isFetchSource, isLocalMode, isMapRedLocalTask, isNotInitialized, isRootTask, isRunnable, pushFeed, receiveFeed, removeDependentTask, removeFromChildrenTasks, setBackupChildrenTasks, setBackupTask, setChildTasks, setConf, setConsole, setDiagnosticMessage, setDone, setDriverContext, setException, setFeedSubscribers, setFetchSource, setId, setInitialized, setLocalMode, setParentTasks, setQueryDisplay, setQueryPlan, setQueued, setRootTask, setStarted, setState, setStatusMessage, setTaskTag, setWork, started, subscribeFeed, toString, updateStatusInQueryDisplay, updateTaskMetricsprotected transient org.apache.hadoop.mapred.JobConf job
public static MemoryMXBean memoryMXBean
protected HadoopJobExecHelper jobExecHelper
protected static final transient org.slf4j.Logger LOG
public ExecDriver()
public ExecDriver(MapredWork plan, org.apache.hadoop.mapred.JobConf job, boolean isSilent) throws HiveException
HiveExceptionpublic boolean requireLock()
requireLock in class Task<MapredWork>protected static String getResource(HiveConf conf, SessionState.ResourceType resType)
public void initialize(QueryState queryState, QueryPlan queryPlan, DriverContext driverContext, CompilationOpContext opContext)
initialize in class Task<MapredWork>public boolean checkFatalErrors(org.apache.hadoop.mapred.Counters ctrs,
StringBuilder errMsg)
checkFatalErrors in interface HadoopJobExecHookpublic int execute(DriverContext driverContext)
execute in class Task<MapredWork>public static void propagateSplitSettings(org.apache.hadoop.mapred.JobConf job,
MapWork work)
protected void setInputAttributes(org.apache.hadoop.conf.Configuration conf)
public static String getCurrentDB()
public boolean mapStarted()
public boolean reduceStarted()
public boolean mapDone()
public boolean reduceDone()
public static void main(String[] args) throws IOException, HiveException
IOExceptionHiveExceptionpublic static String generateCmdLine(HiveConf hconf, Context ctx) throws IOException
IOExceptionpublic Collection<MapWork> getMapWork()
getMapWork in class Task<MapredWork>public boolean isMapRedTask()
isMapRedTask in class Task<MapredWork>public Collection<Operator<? extends OperatorDesc>> getTopOperators()
getTopOperators in class Task<MapredWork>public boolean hasReduce()
hasReduce in class Task<MapredWork>public org.apache.hadoop.hive.ql.plan.api.StageType getType()
TaskgetType in class Task<MapredWork>public String getName()
Nodepublic void logPlanProgress(SessionState ss) throws IOException
logPlanProgress in interface HadoopJobExecHookIOExceptionpublic boolean isTaskShutdown()
public void shutdown()
shutdown in class Task<MapredWork>public String getExternalHandle()
getExternalHandle in class Task<MapredWork>Copyright © 2019 The Apache Software Foundation. All Rights Reserved.