arjunashok commented on code in PR #139:
URL: https://github.com/apache/cassandra-sidecar/pull/139#discussion_r1852988804


##########
client-common/src/main/java/org/apache/cassandra/sidecar/common/response/ListOperationsJobsResponse.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.common.response;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Response structure of the list operations jobs API
+ */
+public class ListOperationsJobsResponse
+{
+    private final List<OperationsJobsResponse> jobs;
+
+    /**
+     * Constructs a {@link ListOperationsJobsResponse} object.
+     */
+    public ListOperationsJobsResponse()
+    {
+        this.jobs = new ArrayList<>();
+    }
+
+    public void addJob(OperationsJobsResponse job)
+    {
+        jobs.add(job);
+    }
+
+    @JsonProperty("jobs")
+    public List<OperationsJobsResponse> jobs()
+    {
+        return jobs;
+    }
+
+    /**
+     * Structure of the operations job instance within the list operations 
jobs API response
+     */
+    public static class OperationsJobsResponse
+    {
+        public final UUID jobId;

Review Comment:
   I see your point, but it does help for it to be guaranteed to be globally 
unique, when we are debugging these jobs across multiple nodes (even though 
they are currently node-local) to avoid confusion.



##########
client-common/src/main/java/org/apache/cassandra/sidecar/common/response/OperationsJobsResponse.java:
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.common.response;
+
+import java.util.UUID;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.cassandra.sidecar.common.utils.OperationsJobResult;
+
+/**
+ * Response structure of the operations jobs API
+ */
+public class OperationsJobsResponse

Review Comment:
   Ack



##########
client-common/src/main/java/org/apache/cassandra/sidecar/common/response/OperationsJobsResponse.java:
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.common.response;
+
+import java.util.UUID;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.cassandra.sidecar.common.utils.OperationsJobResult;
+
+/**
+ * Response structure of the operations jobs API
+ */
+public class OperationsJobsResponse
+{
+    private final UUID jobId;
+    private final OperationsJobResult.OperationsJobStatus status;
+    private final String operation;
+    private final String reason;

Review Comment:
   Not sure I understand. Are you asking why we're not using 
`OperationsJobResult` as a member here?  
   
   If so, I did not see a reason to have the hierarchy since all these are 
attributes of the jobs API response. 



-- 
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]

Reply via email to