当前位置: 首页>>代码示例>>Java>>正文


Java State类代码示例

本文整理汇总了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;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:JobControl.java

示例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;	
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:JobControl.java

示例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;
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:16,代码来源:JobControl.java

示例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;	
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:12,代码来源:JobControl.java

示例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);
  }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:8,代码来源:PigJobControl.java

示例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);
  }
}
 
开发者ID:sigmoidanalytics,项目名称:spork-streaming,代码行数:8,代码来源:PigJobControl.java

示例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;	
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:12,代码来源:JobControl.java

示例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);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:JobControl.java

示例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);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:JobControl.java

示例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);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:JobControl.java


注:本文中的org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。