You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2025/11/07 15:52:33 UTC

Re: [PR] HDDS-13509. Have single constructor in ContainerReplicaPendingOps and ContainerReplicaOp [ozone]

adoroszlai commented on code in PR #9118:
URL: https://github.com/apache/ozone/pull/9118#discussion_r2504266764


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ContainerReplicaOp.java:
##########
@@ -32,18 +34,16 @@ public class ContainerReplicaOp {
   private final long deadlineEpochMillis;
   private final long containerSize;
 
-  public static ContainerReplicaOp create(PendingOpType opType,
-      DatanodeDetails target, int replicaIndex) {
-    return new ContainerReplicaOp(opType, target, replicaIndex, null,
-        System.currentTimeMillis(), 0);
-  }
-
-  public ContainerReplicaOp(PendingOpType opType,
-      DatanodeDetails target, int replicaIndex, SCMCommand<?> command,
-      long deadlineEpochMillis) {
-    this(opType, target, replicaIndex, command, deadlineEpochMillis, 0);
-  }
-
+  /**
+   * Create a ContainerReplicaOp with all parameters.
+   *
+   * @param opType type of operation
+   * @param target target datanode
+   * @param replicaIndex replica index (0 for Ratis; > 0 for EC)

Review Comment:
   This is not valid javadoc, [compiler warning](https://github.com/apache/ozone/actions/runs/18612429201/job/54762813810?pr=9118#step:13:7194):
   
   ```
   ContainerReplicaOp.java:42: warning - invalid usage of tag >
   ```
   
   ```suggestion
      * @param replicaIndex replica index (zero for Ratis, &gt; 0 for EC)
   ```
   
   Suggestion taken from javadocs on `replicaIndex` from other file:
   https://github.com/apache/ozone/blob/0e142d7ef836080040611f4f690e488f73ce7112/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ContainerReplicaPendingOps.java#L161



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org