Search in sources :

Example 11 with DefaultJobState

use of com.baidu.hugegraph.computer.driver.DefaultJobState 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)11 JobObserver (com.baidu.hugegraph.computer.driver.JobObserver)10 HashMap (java.util.HashMap)10 Test (org.junit.Test)10 JobStatus (com.baidu.hugegraph.computer.driver.JobStatus)1 ComputerJobStatus (com.baidu.hugegraph.computer.k8s.crd.model.ComputerJobStatus)1 HugeGraphComputerJob (com.baidu.hugegraph.computer.k8s.crd.model.HugeGraphComputerJob)1 AbstractController (com.baidu.hugegraph.computer.k8s.operator.common.AbstractController)1 ConfigMap (io.fabric8.kubernetes.api.model.ConfigMap)1 ConfigMapBuilder (io.fabric8.kubernetes.api.model.ConfigMapBuilder)1 Pod (io.fabric8.kubernetes.api.model.Pod)1 Secret (io.fabric8.kubernetes.api.model.Secret)1 SecretBuilder (io.fabric8.kubernetes.api.model.SecretBuilder)1