water.Job.start()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(273)

本文整理了Java中water.Job.start()方法的一些代码示例,展示了Job.start()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.start()方法的具体详情如下:
包路径:water.Job
类名称:Job
方法名:start

Job.start介绍

[英]Start this task based on given top-level fork-join task representing job computation.
[中]基于表示作业计算的给定顶级fork-join任务启动此任务。

代码示例

代码示例来源:origin: h2oai/h2o-3

public Job start(int work) {
 return _job.start(new H2O.H2OCountedCompleter() {
  @Override public void compute2() {
   _target.run();
   tryComplete();
  }
 }, work);
}

代码示例来源:origin: h2oai/h2o-2

/**
 * Forks computation of this job.
 *
 * <p>The call does not block.</p>
 * @return always returns this job.
 */
public Job fork() {
 init();
 H2OCountedCompleter task = new H2OCountedCompleter() {
  @Override public void compute2() {
   try {
    try {
     // Exec always waits till the end of computation
     Job.this.exec();
     Job.this.remove();
    } catch (Throwable t) {
     if(!(t instanceof ExpectedExceptionForDebug))
      Log.err(t);
     Job.this.cancel(t);
    }
   } finally {
     tryComplete();
   }
  }
 };
 start(task);
 H2O.submitTask(task);
 return this;
}

代码示例来源:origin: h2oai/h2o-2

@Override public void invoke() {
 init();
 start(new H2OEmptyCompleter());  // mark job started
 exec(); // execute the implementation
 remove();     // remove the job
}

代码示例来源:origin: h2oai/h2o-3

j.start(new H2O.H2OCountedCompleter() {
  @Override
  public void compute2() {

代码示例来源:origin: ai.h2o/h2o-automl

public Job start(int work) {
 return _job.start(new H2O.H2OCountedCompleter() {
  @Override public void compute2() {
   _target.run();
   tryComplete();
  }
 }, work);
}

代码示例来源:origin: stackoverflow.com

public class Process implements Runnable{

List<Job> jobLists;

public Process(List<Job> lists) {
  this.jobLists = lists;
}

@Override
public void run() {
  System.out.println(Thread.currentThread().getName());
  while(!jobLists.isEmpty()){
    Job job = jobLists.get(0);
    job.start();
    if (job.isCompleted()){
      jobLists.remove(0);
    }else{
      System.out.println("Interrup issuesed");
      return;
    }

  }
}

代码示例来源:origin: stackoverflow.com

public class ExecuteJob {
 public static void main(String[] args) throws Exception {
String filename = args[0];
KettleEnvironment.init();
JobMeta jobMeta = new JobMeta(filename, null);
Job job = new Job(null, jobMeta);
job.start();
job.waitUntilFinished();
if (job.getErrors()!=0) {
 System.out.println(“Error encountered!”);
} }
}

代码示例来源:origin: stackoverflow.com

Job job = loadJobFromDB();
runJob(job);

public void runJob(Job Job){
  if(job.getPreviousJob() != null){
    runJob(job.getPreviousJob());
  }

  job.start();
}

代码示例来源:origin: stackoverflow.com

KettleEnvironment.init();
 JobMeta jobMeta = new JobMeta("job path",null);
 jobMeta.setParameterValue("param name",value);
 Job job = new Job(null,jobMeta);
 job.setLogLevel(LogLevel.BASIC);
 job.start();
 job.waitUntilFinished();
 Result result = job.getResult();
 if (!result.getResult()){
    //manage the error case
 }

相关文章