本文整理汇总了Java中org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State类的典型用法代码示例。如果您正苦于以下问题:Java State类的具体用法?Java State怎么用?Java State使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
State类属于org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob包,在下文中一共展示了State类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getJobsIn
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
synchronized private List<ControlledJob> getJobsIn(State state) {
LinkedList<ControlledJob> l = new LinkedList<ControlledJob>();
for(ControlledJob j: jobsInProgress) {
if(j.getJobState() == state) {
l.add(j);
}
}
return l;
}
示例2: addJob
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
/**
* Add a new controlled job.
* @param aJob the new controlled job
*/
synchronized public String addJob(ControlledJob aJob) {
String id = this.getNextJobID();
aJob.setJobID(id);
aJob.setJobState(State.WAITING);
jobsInProgress.add(aJob);
return id;
}
示例3: getQueue
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
private Map<String, ControlledJob> getQueue(State state) {
Map<String, ControlledJob> retv = null;
if (state == State.WAITING) {
retv = this.waitingJobs;
} else if (state == State.READY) {
retv = this.readyJobs;
} else if (state == State.RUNNING) {
retv = this.runningJobs;
} else if (state == State.SUCCESS) {
retv = this.successfulJobs;
} else if (state == State.FAILED || state == State.DEPENDENT_FAILED) {
retv = this.failedJobs;
}
return retv;
}
示例4: addJob
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
/**
* Add a new job.
* @param aJob the new job
*/
synchronized public String addJob(ControlledJob aJob) {
String id = this.getNextJobID();
aJob.setJobID(id);
aJob.setJobState(State.WAITING);
this.addToQueue(aJob);
return id;
}
示例5: checkState
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
private State checkState(ControlledJob j) {
try {
return (State)checkState.invoke(j);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
示例6: submit
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
private State submit(ControlledJob j) {
try {
return (State)submit.invoke(j);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
示例7: addJob
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
/**
* Add a new job.
* @param aJob the new job
*/
synchronized public String addJob(ControlledJob aJob) {
String id = this.getNextJobID();
aJob.setJobID(id);
aJob.setJobState(State.WAITING);
jobsInProgress.add(aJob);
return id;
}
示例8: getWaitingJobList
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
/**
* @return the jobs in the waiting state
*/
public List<ControlledJob> getWaitingJobList() {
return getJobsIn(State.WAITING);
}
示例9: getRunningJobList
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
/**
* @return the jobs in the running state
*/
public List<ControlledJob> getRunningJobList() {
return getJobsIn(State.RUNNING);
}
示例10: getReadyJobsList
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State; //导入依赖的package包/类
/**
* @return the jobs in the ready state
*/
public List<ControlledJob> getReadyJobsList() {
return getJobsIn(State.READY);
}