andresbeckruiz commented on code in PR #359:
URL: https://github.com/apache/cassandra-sidecar/pull/359#discussion_r3508689634
##########
server/src/main/java/org/apache/cassandra/sidecar/job/storage/OperationalJobRecord.java:
##########
@@ -173,6 +179,70 @@ public Map<String, String> operationMetadata()
return operationMetadata;
}
+ @Override
+ @Nullable
+ public UUID nodeId()
+ {
+ return null;
+ }
+
+ @Override
+ public String name()
+ {
+ return operationType.name();
+ }
+
+ @Override
+ public long creationTime()
+ {
+ return creationTimeMillis;
+ }
+
+ @Override
+ @NotNull
+ public List<UUID> nodesPending()
+ {
+ return Collections.emptyList();
+ }
+
+ @Override
+ @NotNull
+ public List<UUID> nodesExecuting()
+ {
+ return Collections.emptyList();
+ }
+
+ @Override
+ @NotNull
+ public List<UUID> nodesSucceeded()
+ {
+ return Collections.emptyList();
+ }
+
+ @Override
+ @NotNull
+ public List<UUID> nodesFailed()
+ {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public boolean isExecuting()
+ {
+ return status == OperationalJobStatus.RUNNING;
+ }
+
+ /**
+ * Creates an {@link OperationalJobRecord} from a live {@link
OperationalJob}.
+ *
+ * @param job the operational job to convert
+ * @return a new record capturing the job's current state
+ */
+ public static OperationalJobRecord fromOperationalJob(OperationalJob job)
Review Comment:
The record in Cassandra is intended to start with this information. The
nodes list information concern is addressed in
[d8d047e](https://github.com/apache/cassandra-sidecar/pull/359/commits/d8d047e49479acdd16748a5a7f3a3ca322c7e9af).
For start time, the `OperationalJobCoordinator` introduced in
CASSSIDECAR-377 will be responsible for setting this when calling
`updateJobStatus` to set the status to RUNNING. See:
https://github.com/apache/cassandra-sidecar/blob/c5782978480d259add3c8968d5bb0518a3dd3e50/server/src/main/java/org/apache/cassandra/sidecar/db/ClusterOpsDatabaseAccessor.java#L117-L122
--
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]