hemantk-12 opened a new pull request, #5697: URL: https://github.com/apache/ozone/pull/5697
## What changes were proposed in this pull request? Currently, we print empty line if snapshot diff entry list is empty because continuation token more than the total diff entries. This change is to throw an IOException if continuation token for snapshot diff is more than the total diff entries. Also updated the response printing if DiffEntryList is empty. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-9360 ## How was this patch tested? Updated integ tests and also checked the response on docker. ``` sh-4.2$ ozone sh volume create vol1 sh-4.2$ ozone sh bucket create vol1/bucket1 sh-4.2$ ozone sh key put vol1/bucket1/key1 README.md sh-4.2$ ozone sh snapshot create vol1/bucket1 snap1 sh-4.2$ ozone sh key put vol1/bucket1/key2 README.md sh-4.2$ ozone sh key put vol1/bucket1/key3 README.md sh-4.2$ ozone sh key put vol1/bucket1/key4 README.md sh-4.2$ ozone sh key put vol1/bucket1/key5 README.md sh-4.2$ ozone sh snapshot create vol1/bucket1 snap2 sh-4.2$ ozone sh snapshot snapshotDiff vol1/bucket1 snap1 snap2 Snapshot diff job is IN_PROGRESS. Please retry after 60000 ms. sh-4.2$ ozone sh snapshot snapshotDiff vol1/bucket1 snap1 snap2 Difference between snapshot: snap1 and snapshot: snap2 + ./key2 + ./key3 + ./key4 + ./key5 sh-4.2$ ozone sh snapshot diff -t 150 vol1/bucket1 snap1 snap2 INTERNAL_ERROR Index (given: 150) should be a number >= 0 and < totalDiffEntries: 4. Page size (given: 1000) should be a positive number > 0. sh-4.2$ ozone sh snapshot diff -t 4 vol1/bucket1 snap1 snap2 Difference between snapshot: snap1 and snapshot: snap2 No diff or no more diff for with the request parameters. sh-4.2$ ozone sh snapshot diff -t 2 vol1/bucket1 snap1 snap2 Difference between snapshot: snap1 and snapshot: snap2 + ./key4 + ./key5 ``` -- 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]
