public class Job extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEPENDENT_FAILED |
static int |
FAILED |
static int |
READY |
static int |
RUNNING |
static int |
SUCCESS |
static int |
WAITING |
| 构造器和说明 |
|---|
Job(JobConf jobConf)
Construct a job.
|
Job(JobConf jobConf,
ArrayList<Job> dependingJobs)
Construct a job.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addDependingJob(Job dependingJob)
Add a job to this jobs' dependency list.
|
JobID |
getAssignedJobID() |
ArrayList<Job> |
getDependingJobs() |
JobClient |
getJobClient() |
JobConf |
getJobConf() |
String |
getJobID() |
String |
getJobName() |
String |
getMapredJobID()
已过时。
use
getAssignedJobID() instead |
String |
getMessage() |
int |
getState() |
boolean |
isCompleted() |
boolean |
isReady() |
void |
setAssignedJobID(JobID mapredJobID)
Set the mapred ID for this job as assigned by the
mapred framework.
|
void |
setJobConf(JobConf jobConf)
Set the mapred job conf for this job.
|
void |
setJobID(String id)
Set the job ID for this job.
|
void |
setJobName(String jobName)
Set the job name for this job.
|
void |
setMapredJobID(String mapredJobID)
已过时。
use
setAssignedJobID(JobID) instead |
void |
setMessage(String message)
Set the message for this job.
|
protected void |
setState(int state)
Set the state for this job.
|
protected void |
submit()
Submit this job to mapred.
|
String |
toString() |
public static final int SUCCESS
public static final int WAITING
public static final int RUNNING
public static final int READY
public static final int FAILED
public static final int DEPENDENT_FAILED
public Job(JobConf jobConf, ArrayList<Job> dependingJobs) throws IOException
jobConf - a mapred job configuration representing a job to be executed.dependingJobs - an array of jobs the current job depends onIOExceptionpublic Job(JobConf jobConf) throws IOException
jobConf - mapred job configuration representing a job to be executed.IOExceptionpublic String getJobName()
public void setJobName(String jobName)
jobName - the job namepublic String getJobID()
public void setJobID(String id)
id - the job ID@Deprecated public String getMapredJobID()
getAssignedJobID() instead@Deprecated public void setMapredJobID(String mapredJobID)
setAssignedJobID(JobID) insteadmapredJobID - the mapred job ID for this job.public JobID getAssignedJobID()
public void setAssignedJobID(JobID mapredJobID)
mapredJobID - the mapred job ID for this job.public JobConf getJobConf()
public void setJobConf(JobConf jobConf)
jobConf - the mapred job conf for this job.public int getState()
protected void setState(int state)
state - the new state for this job.public String getMessage()
public void setMessage(String message)
message - the message for this job.public JobClient getJobClient()
public boolean addDependingJob(Job dependingJob)
dependingJob - Job that this Job depends on.public boolean isCompleted()
public boolean isReady()
protected void submit()
Copyright © 2009 The Apache Software Foundation