dombizita commented on code in PR #6318:
URL: https://github.com/apache/ozone/pull/6318#discussion_r1519635721


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/RootEntityHandler.java:
##########
@@ -137,6 +140,13 @@ public DUResponse getDuResponse(
       duResponse.setSizeWithReplica(totalDataSizeWithReplica);
     }
     duResponse.setSize(totalDataSize);
+
+    if (sortSubPaths) {
+      // Parallel sort volumeDuData in descending order of size

Review Comment:
   Same here



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NSSummaryEndpoint.java:
##########
@@ -101,17 +101,17 @@ public Response getBasicInfo(
    * @param path request path
    * @param listFile show subpath/disk usage for each key
    * @param withReplica count actual DU with replication
+   * @param sort whether to sort the subpaths by their sizes in descending 
order

Review Comment:
   As far as I understand, we either return the the disk usages as it was 
previously or with this flag we return the top N (defaults to 30) based on 
their sizes. Can you add the fact that we are returning only the top N 
elements, not just sorting it?



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/DirectoryEntityHandler.java:
##########
@@ -154,6 +157,13 @@ public DUResponse getDuResponse(
     }
     duResponse.setCount(subdirDUData.size());
     duResponse.setSize(dirDataSize);
+
+    if (sortSubPaths) {
+      // Parallel sort subdirDUData in descending order of size

Review Comment:
   Same here



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/VolumeEntityHandler.java:
##########
@@ -131,6 +135,13 @@ public DUResponse getDuResponse(
       duResponse.setSizeWithReplica(volDataSizeWithReplica);
     }
     duResponse.setSize(volDataSize);
+
+    if (sortSubPaths) {
+      // Parallel sort bucketDuData in descending order of size

Review Comment:
   Same here



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/BucketEntityHandler.java:
##########
@@ -142,7 +145,15 @@ public DUResponse getDuResponse(
     }
     duResponse.setCount(dirDUData.size());
     duResponse.setSize(bucketDataSize);
+
+    if (sortSubpaths) {
+      // Parallel sort directory/files DU data in descending order of size

Review Comment:
   Or something similar
   ```suggestion
         // Parallel sort directory/files DU data in descending order of size 
and returns the top N elements
   ```



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