Skip to content

Commit

Permalink
* cancelJob function add result return
Browse files Browse the repository at this point in the history
* update computer-k8s & computer-driver version to 0.1.1
  • Loading branch information
coderzc committed Nov 22, 2021
1 parent e6177e6 commit 5578d88
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions computer-driver/pom.xml
Expand Up @@ -8,6 +8,7 @@
<version>0.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<version>0.1.1</version>

<artifactId>computer-driver</artifactId>

Expand Down
Expand Up @@ -48,8 +48,9 @@ public interface ComputerDriver extends Closeable {
* the job.
* @param params reserved for other parameters in addition to jobId used
* to cancel job.
* @return Whether the job was successfully cancelled
*/
void cancelJob(String jobId, Map<String, String> params);
boolean cancelJob(String jobId, Map<String, String> params);

/**
* Wait the job to finish, it will trace the execution of job and notify
Expand Down
2 changes: 1 addition & 1 deletion computer-k8s-operator/pom.xml
Expand Up @@ -15,7 +15,7 @@
<dependency>
<groupId>com.baidu.hugegraph</groupId>
<artifactId>computer-k8s</artifactId>
<version>${project.version}</version>
<version>0.1.1</version>
</dependency>
</dependencies>

Expand Down
3 changes: 2 additions & 1 deletion computer-k8s/pom.xml
Expand Up @@ -8,6 +8,7 @@
<version>0.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<version>0.1.1</version>

<artifactId>computer-k8s</artifactId>

Expand All @@ -26,7 +27,7 @@
<dependency>
<groupId>com.baidu.hugegraph</groupId>
<artifactId>computer-driver</artifactId>
<version>${project.version}</version>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
Expand Down
Expand Up @@ -280,10 +280,8 @@ private void checkComputerConf(Map<String, String> computerConf,
}

@Override
public void cancelJob(String jobId, Map<String, String> params) {
Boolean delete = this.operation.withName(KubeUtil.crName(jobId))
.delete();
E.checkState(delete, "Failed to cancel Job, jobId: ", jobId);
public boolean cancelJob(String jobId, Map<String, String> params) {
return this.operation.withName(KubeUtil.crName(jobId)).delete();
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion computer-test/pom.xml
Expand Up @@ -76,7 +76,7 @@
<dependency>
<groupId>com.baidu.hugegraph</groupId>
<artifactId>computer-k8s</artifactId>
<version>${project.version}</version>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>com.baidu.hugegraph</groupId>
Expand Down

0 comments on commit 5578d88

Please sign in to comment.