devabhishekpal commented on code in PR #7517:
URL: https://github.com/apache/ozone/pull/7517#discussion_r1869000940


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/TaskStatusService.java:
##########
@@ -50,4 +69,37 @@ public Response getTaskTimes() {
     List<ReconTaskStatus> resultSet = reconTaskStatusDao.findAll();
     return Response.ok(resultSet).build();
   }
+
+  @GET
+  @Path("metrics")
+  public Response getTaskMetrics() {
+    Map<ReconTaskStatusCounter.ReconTasks, Pair<Integer, Integer>> 
tasksPairMap = taskStatusCounter.getTaskCounts();
+    List<ReconTaskStatusCountResponse> tasks = new ArrayList<>();
+    for (Map.Entry<ReconTaskStatusCounter.ReconTasks, Pair<Integer, Integer>> 
entry: tasksPairMap.entrySet()) {
+      tasks.add(new ReconTaskStatusCountResponse(
+        entry.getKey().name(),
+        entry.getValue().getLeft(),
+        entry.getValue().getRight()
+      ));
+    }
+    return Response.ok(new ReconAllTasksCountResponse(tasks)).build();
+  }
+
+  @GET
+  @Path("metrics/{taskName}")
+  public Response getTaskMetrics(

Review Comment:
   Removed this endpoint in 
[5248373](https://github.com/apache/ozone/pull/7517/commits/5248373fede0a47e1475ef14730e4b443445b55d)
 as it is not being used



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