ArafatKhan2198 commented on code in PR #4724:
URL: https://github.com/apache/ozone/pull/4724#discussion_r1200897847


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/ContainersResponse.java:
##########
@@ -60,16 +61,24 @@ public static class ContainersResponseData {
     @JsonProperty("totalCount")
     private long totalCount;
 
+    /**
+     * prevKey will be the last key of the previous page.
+     */
+    @JsonProperty("prevKey")
+    private long prevKey;
+

Review Comment:
   Thanks for the comment @dombizita !
   
   There are two reasons I chose to use the name `prevKey` :- 
   
   1. The response object's `prevKey` will be reused by the same API as the 
previous key for retrieving the next set of records, enabling pagination. Since 
the query parameter in the ContainerEndpoint is also named "prevKey," I decided 
to maintain consistency and keep the name as "prevKey."
   
   2. `prevKey` is also used as the name in other APIs of Recon for pagination. 
By maintaining consistent naming conventions across the codebase, we can 
prevent confusion among developers.
   
   Overall, these reasons support my decision to keep the variable named as 
"prevKey." Do you think we should change it to `lastContainerID` ?



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