devmadhuu commented on code in PR #4042:
URL: https://github.com/apache/ozone/pull/4042#discussion_r1042087095
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/recon/TestReconWithOzoneManagerFSO.java:
##########
@@ -128,8 +128,8 @@ public void testNamespaceSummaryAPI() throws Exception {
NamespaceSummaryResponse entity =
(NamespaceSummaryResponse) basicInfo.getEntity();
Assert.assertSame(entity.getEntityType(), EntityType.DIRECTORY);
- Assert.assertEquals(1, entity.getNumTotalKey());
- Assert.assertEquals(0, entity.getNumTotalDir());
+ Assert.assertEquals(1, entity.getCountStats().getNumTotalKey());
Review Comment:
Thanks @hemantk-12 for review. Changes done. Pls re-review. This was
existing case, I added those missing as you mentioned.
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/BucketEntityHandler.java:
##########
@@ -49,18 +52,60 @@ public BucketEntityHandler(
@Override
public NamespaceSummaryResponse getSummaryResponse()
throws IOException {
- NamespaceSummaryResponse namespaceSummaryResponse =
- new NamespaceSummaryResponse(EntityType.BUCKET);
+
String[] names = getNames();
assert (names.length == 2);
long bucketObjectId = getBucketHandler().getBucketObjectId(names);
- namespaceSummaryResponse
- .setNumTotalDir(getTotalDirCount(bucketObjectId));
- namespaceSummaryResponse.setNumTotalKey(getTotalKeyCount(bucketObjectId));
+
+ CountStats countStats = new CountStats(
+ -1, -1,
+ getTotalDirCount(bucketObjectId), getTotalKeyCount(bucketObjectId));
+ NamespaceSummaryResponse namespaceSummaryResponse =
Review Comment:
Thanks @hemantk-12 for review. Changes done. Pls re-review.
--
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]