krishnaasawa1 commented on code in PR #4509:
URL: https://github.com/apache/ozone/pull/4509#discussion_r1177641645


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java:
##########
@@ -417,4 +425,78 @@ private List<ContainerBlockMetadata> getBlocks(
   private BucketLayout getBucketLayout() {
     return BucketLayout.DEFAULT;
   }
+
+  @GET
+  @Path("insights/containermismatch")
+  public Response getContainerMisMatchInsights() {
+    List<ContainerDiscrepancyInfo> containerDiscrepancyInfoList =
+        new ArrayList<>();
+    try {
+      Map<Long, ContainerMetadata> omContainers =
+          reconContainerMetadataManager.getContainers(-1, -1);
+      List<Long> scmContainers = containerManager.getContainers().stream()

Review Comment:
   1-In this case all SCM Containers when compared with OM Containers , will 
show all Deleted State containers as discrepancy i.e missing in OM
   2-Also OM will never report any container "available in OM but missing in 
SCM" as deleted container is  still in SCM list.
   We need to have only Non-Deleted State SCM containers.
   @sumitagrawl can you help check



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