本文整理了Java中water.Job.start()
方法的一些代码示例,展示了Job.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.start()
方法的具体详情如下:
包路径:water.Job
类名称: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
}
内容来源于网络,如有侵权,请联系作者删除!