devmadhuu commented on code in PR #5159:
URL: https://github.com/apache/ozone/pull/5159#discussion_r1295340370


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -88,15 +91,22 @@ public class OMDBInsightEndpoint {
   private static final Logger LOG =
       LoggerFactory.getLogger(OMDBInsightEndpoint.class);
   private final GlobalStatsDao globalStatsDao;
+  private ReconNamespaceSummaryManagerImpl reconNamespaceSummaryManager;
+  private Table<Long, NSSummary> nsSummaryTable;

Review Comment:
   @ArafatKhan2198  Thanks for working on this patch, Pls do not expose the 
NSSummary table directly in endpoint class. Since you are already taking 
reference of namespaceSummaryManager and it already has ref of NSSummary table 
directly, use that and expose method for your operations.



##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOmDBInsightEndPoint.java:
##########
@@ -693,4 +694,59 @@ public void testGetDeletedDirInfo() throws Exception {
     Assertions.assertEquals("/sampleVol/bucketOne/dir_two",
         keyInsightInfoResp.getLastKey());
   }
+
+  @Test
+  public void testGetDirectorySizeInfo() throws Exception {

Review Comment:
   This test is based on assumption that NSSummary gets updated when a 
directory gets deleted and its the sum of size of all files inside a given 
directory. Can you add an integration test along with Mini cluster  in 
"TestReconWithOzoneManagerFSO" because test is missing in this integration test 
for validating the same. Integration Test should include deleting a directory 
with some set of files and after deletion, existing namespace summary should 
still provide the size of deleted directory as equivalent of size of all files 
inside that respective dorectory.



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