Search in sources :

Example 1 with JobStatus

use of com.baidu.hugegraph.computer.driver.JobStatus in project hugegraph-computer by hugegraph.

the class KubernetesDriver method buildJobState.

private JobState buildJobState(HugeGraphComputerJob computerJob) {
    E.checkNotNull(computerJob, "computerJob");
    ComputerJobStatus status = computerJob.getStatus();
    if (status == null || status.getJobStatus() == null) {
        return new DefaultJobState().jobStatus(JobStatus.INITIALIZING);
    }
    JobStatus jobStatus = JobStatus.valueOf(status.getJobStatus());
    return new DefaultJobState().jobStatus(jobStatus);
}
Also used : ComputerJobStatus(com.baidu.hugegraph.computer.k8s.crd.model.ComputerJobStatus) JobStatus(com.baidu.hugegraph.computer.driver.JobStatus) DefaultJobState(com.baidu.hugegraph.computer.driver.DefaultJobState) ComputerJobStatus(com.baidu.hugegraph.computer.k8s.crd.model.ComputerJobStatus)

Aggregations

DefaultJobState (com.baidu.hugegraph.computer.driver.DefaultJobState)1 JobStatus (com.baidu.hugegraph.computer.driver.JobStatus)1 ComputerJobStatus (com.baidu.hugegraph.computer.k8s.crd.model.ComputerJobStatus)1