javeme commented on code in PR #290:
URL:
https://github.com/apache/incubator-hugegraph-computer/pull/290#discussion_r1404583901
##########
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:
maybe using String.format() is more clear?
##########
computer-driver/src/main/java/org/apache/hugegraph/computer/driver/JobStatus.java:
##########
@@ -36,4 +36,5 @@ public static boolean finished(String status) {
Objects.equals(status, FAILED.name()) ||
Objects.equals(status, SUCCEEDED.name());
}
+
Review Comment:
revert it?
##########
computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java:
##########
@@ -243,7 +243,7 @@ public void testJobCancelled() {
jobObserver);
DefaultJobState jobState = new DefaultJobState();
- jobState.jobStatus(JobStatus.INITIALIZING);
+ jobState.jobStatus(JobStatus.RUNNING);
Review Comment:
also sleep UnitTestBase.sleep(1000L) to ensure RUNNING status is stable?
can we push this code to a separated PR or append to this PR
https://github.com/apache/incubator-hugegraph-computer/pull/287 ?
--
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]