|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.exec.Task<mapredWork>
org.apache.hadoop.hive.ql.exec.ExecDriver
public class ExecDriver
Nested Class Summary | |
---|---|
static class |
ExecDriver.ExecDriverTaskHandle
This class contains the state of the running task Going forward, we will return this handle from execute and Driver can split execute into start, monitorProgess and postProcess |
Field Summary | |
---|---|
protected org.apache.hadoop.mapred.JobConf |
job
|
protected int |
mapProgress
|
static Random |
randGen
|
protected int |
reduceProgress
|
static Map<String,String> |
runningJobKillURIs
A list of the currently running jobs spawned in this Hive instance that is used to kill all running jobs in the event of an unexpected shutdown - i.e., the JVM shuts down while there are still jobs running. |
protected boolean |
success
|
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 | |
---|---|
ExecDriver()
Constructor when invoked from QL |
|
ExecDriver(mapredWork plan,
org.apache.hadoop.mapred.JobConf job,
boolean isSilent)
Constructor/Initialization for invocation as independent utility |
Method Summary | |
---|---|
protected boolean |
checkFatalErrors(TaskHandle t,
StringBuffer errMsg)
Fatal errors are those errors that cannot be recovered by retries. |
int |
estimateNumberOfReducers(HiveConf hive,
org.apache.hadoop.mapred.JobConf job,
mapredWork work)
Estimate the number of reducers needed for this job, based on job input, and configuration parameters. |
int |
execute()
Execute a query plan using Hadoop |
static String |
generateCmdLine(HiveConf hconf)
Given a Hive Configuration object - generate a command line fragment for passing such configuration information to ExecDriver |
static String |
getResourceFiles(org.apache.hadoop.conf.Configuration conf,
SessionState.ResourceType t)
|
long |
getTotalInputFileSize(org.apache.hadoop.mapred.JobConf job,
mapredWork work)
Calculate the total size of input files. |
int |
getType()
Should be overridden to return the type of the specific task among the types in TaskType |
boolean |
hasReduce()
|
void |
initialize(HiveConf conf,
QueryPlan queryPlan)
Initialization when invoked from QL |
boolean |
isMapRedTask()
|
void |
jobInfo(org.apache.hadoop.mapred.RunningJob rj)
from StreamJob.java |
static void |
main(String[] args)
|
boolean |
mapDone()
|
boolean |
mapStarted()
|
void |
progress(TaskHandle taskHandle)
Update the progress of the task within taskHandle and also dump the progress information to the history file |
boolean |
reduceDone()
|
boolean |
reduceStarted()
|
protected void |
setNumberOfReducers()
Set the number of reducers for the mapred work. |
void |
updateCounters(TaskHandle t)
update counters relevant to this task |
Methods inherited from class org.apache.hadoop.hive.ql.exec.Task |
---|
addDependentTask, done, executeTask, fetch, getChildTasks, getCounters, getId, getInitialized, getParentTasks, getQueued, getWork, isRunnable, removeDependentTask, setChildTasks, setDone, setId, setInitialized, setParentTasks, setQueued, setStarted, setWork, started |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient org.apache.hadoop.mapred.JobConf job
protected transient int mapProgress
protected transient int reduceProgress
protected transient boolean success
public static Random randGen
public static Map<String,String> runningJobKillURIs
Constructor Detail |
---|
public ExecDriver()
public ExecDriver(mapredWork plan, org.apache.hadoop.mapred.JobConf job, boolean isSilent) throws HiveException
HiveException
Method Detail |
---|
public static String getResourceFiles(org.apache.hadoop.conf.Configuration conf, SessionState.ResourceType t)
public void initialize(HiveConf conf, QueryPlan queryPlan)
initialize
in class Task<mapredWork>
public void jobInfo(org.apache.hadoop.mapred.RunningJob rj)
protected boolean checkFatalErrors(TaskHandle t, StringBuffer errMsg)
public void progress(TaskHandle taskHandle) throws IOException
Task
progress
in class Task<mapredWork>
taskHandle
- task handle returned by execute
IOException
public int estimateNumberOfReducers(HiveConf hive, org.apache.hadoop.mapred.JobConf job, mapredWork work) throws IOException
IOException
protected void setNumberOfReducers() throws IOException
IOException
public long getTotalInputFileSize(org.apache.hadoop.mapred.JobConf job, mapredWork work) throws IOException
job
- the hadoop job conf.
IOException
public void updateCounters(TaskHandle t) throws IOException
updateCounters
in class Task<mapredWork>
IOException
public boolean mapStarted()
public boolean reduceStarted()
public boolean mapDone()
public boolean reduceDone()
public int execute()
execute
in class Task<mapredWork>
public static void main(String[] args) throws IOException, HiveException
IOException
HiveException
public static String generateCmdLine(HiveConf hconf)
public boolean isMapRedTask()
isMapRedTask
in class Task<mapredWork>
public boolean hasReduce()
hasReduce
in class Task<mapredWork>
public int getType()
Task
getType
in class Task<mapredWork>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |