devmadhuu commented on code in PR #4042:
URL: https://github.com/apache/ozone/pull/4042#discussion_r1042995940
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/BucketEntityHandler.java:
##########
@@ -49,16 +52,34 @@ 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));
- return namespaceSummaryResponse;
+ CountStats countStats = new CountStats(
+ -1, -1,
+ getTotalDirCount(bucketObjectId), getTotalKeyCount(bucketObjectId));
+ return
+ NamespaceSummaryResponse.newBuilder()
+ .setEntityType(EntityType.BUCKET)
+ .setCountStats(countStats)
+ .setObjectDBInfo(getBucketObjDbInfo(names))
+ .setStatus(ResponseStatus.OK)
+ .build();
Review Comment:
@hemantk-12 - this is fixed. pls re-review.
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NSSummaryEndpoint.java:
##########
@@ -80,7 +80,8 @@ public Response getBasicInfo(
NamespaceSummaryResponse namespaceSummaryResponse;
if (!isInitializationComplete()) {
namespaceSummaryResponse =
- new NamespaceSummaryResponse(EntityType.UNKNOWN);
+ NamespaceSummaryResponse.newBuilder().
Review Comment:
@hemantk-12 - this is fixed. 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]