javeme commented on code in PR #290:
URL:
https://github.com/apache/incubator-hugegraph-computer/pull/290#discussion_r1405843153
##########
computer-k8s/src/main/java/org/apache/hugegraph/computer/k8s/driver/KubernetesDriver.java:
##########
@@ -282,7 +283,9 @@ private void checkComputerConf(Map<String, String>
computerConf,
@Override
public boolean cancelJob(String jobId, Map<String, String> params) {
- return this.operation.withName(KubeUtil.crName(jobId)).delete();
+ return this.operation.withName(KubeUtil.crName(jobId))
+ .withPropagationPolicy(DeletionPropagation.FOREGROUND)
Review Comment:
prefer to align with `.withName`
##########
computer-driver/src/main/java/org/apache/hugegraph/computer/driver/DefaultJobState.java:
##########
@@ -87,4 +88,14 @@ public int hashCode() {
return Objects.hash(this.superstep, this.maxSuperstep,
this.lastSuperstepStat, this.jobStatus);
}
+
+ @Override
+ public String toString() {
+ return new StringJoiner(", ", DefaultJobState.class.getSimpleName() +
"[", "]")
+ .add("superstep=" + superstep)
+ .add("maxSuperstep=" + maxSuperstep)
+ .add("lastSuperstepStat=" + lastSuperstepStat)
+ .add("jobStatus=" + jobStatus)
+ .toString();
Review Comment:
yes prefer String.format since it does not affect performance. Thanks~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]