ArafatKhan2198 opened a new pull request, #6318: URL: https://github.com/apache/ozone/pull/6318
## What changes were proposed in this pull request? - We're updating Recon’s disk usage endpoint to sort and show only the **top entities by size**, making it practical for users to identify major space consumers. This change addresses the challenge of visualizing thousands of records, which can't feasibly fit into a single pie chart, by focusing on the most significant ones. - The sorting algorithm employed is `TimSort`, a hybrid sorting algorithm derived from **_Merge-Sort_** and _**Insertion-Sort**_. `TimSort` adapts to the structure of the data, making it exceptionally fast for nearly sorted arrays. TimSort operates with a worst-case time complexity of `O(NlogN)`, matching the efficiency of traditional comparison-based sorting algorithms. - However, its real advantage lies in its best-case performance, which can approach `O(N)` for nearly sorted data. This makes `TimSort` an optimal choice for sorting large datasets like those in Recon Disk Usage, ensuring quick, reliable sorting even with thousands of records. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-10452 ## How was this patch tested? ### Manually Tested Out the API and also using Integration Testing :- ### Results from Manual Testing :- - Created 4 files of `100MB`, `10MB`, `1MB` & `10KB` under `dir-1` ``` { "status": "OK", "path": "/volumetest/buckettest/dir1", "size": 111010000, "sizeWithReplica": -1, "subPathCount": 4, "subPaths": [ { "key": true, "path": "/volumetest/buckettest/dir1/key100MB", "size": 100000000, "sizeWithReplica": -1, "isKey": true }, { "key": true, "path": "/volumetest/buckettest/dir1/key10mb", "size": 10000000, "sizeWithReplica": -1, "isKey": true }, { "key": true, "path": "/volumetest/buckettest/dir1/key1MB", "size": 1000000, "sizeWithReplica": -1, "isKey": true }, { "key": true, "path": "/volumetest/buckettest/dir1/key10kb", "size": 10000, "sizeWithReplica": -1, "isKey": true } ], "sizeDirectKey": 111010000 } ``` -- 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]
