sarvekshayr commented on code in PR #9161:
URL: https://github.com/apache/ozone/pull/9161#discussion_r2435520290


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotMoveDeletedKeysResponse.java:
##########
@@ -225,5 +218,63 @@ public static RepeatedOmKeyInfo createRepeatedOmKeyInfo(
 
     return result;
   }
+
+  /**
+   * Builder for OMSnapshotMoveDeletedKeysResponse.
+   */
+  public static class Builder {
+    private OMResponse omResponse;
+    private SnapshotInfo fromSnapshot;
+    private SnapshotInfo nextSnapshot;
+    private List<SnapshotMoveKeyInfos> nextDBKeysList;
+    private List<SnapshotMoveKeyInfos> reclaimKeysList;
+    private List<HddsProtos.KeyValue> renamedKeysList;
+    private List<String> movedDirs;
+    private long bucketId;
+
+    public Builder setOmResponse(OMResponse omResponse) {
+      this.omResponse = omResponse;
+      return this;
+    }
+
+    public Builder setFromSnapshot(@Nonnull SnapshotInfo fromSnapshot) {
+      this.fromSnapshot = Objects.requireNonNull(fromSnapshot, "fromSnapshot 
cannot be null");

Review Comment:
   IMO, the null check is better placed in the `build()` method instead of the 
setter.



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