sumitagrawl commented on code in PR #6542:
URL: https://github.com/apache/ozone/pull/6542#discussion_r1601587175
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java:
##########
@@ -1354,7 +1354,18 @@ public ListSnapshotResponse listSnapshot(
.map(snapshotInfo -> SnapshotInfo.getFromProtobuf(snapshotInfo))
.collect(Collectors.toList());
- return new ListSnapshotResponse(snapshotInfos, response.hasLastSnapshot()
? response.getLastSnapshot() : null);
+ String lastSnapshot = null;
+
+ if (response.hasLastSnapshot()) {
+ lastSnapshot = response.getLastSnapshot();
+ } else if (snapshotInfos.size() == maxListResult) {
Review Comment:
We need ensure for any api, always return pojo object. If there is a list,
encapsulate in another class having list only. This provides backward
compatibility for any addition of params for api level in api design.
--
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]