sodonnel commented on code in PR #3545:
URL: https://github.com/apache/ozone/pull/3545#discussion_r907283654
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ContainerReplicaOp.java:
##########
@@ -36,6 +36,12 @@ public enum PendingOpType {
private int replicaIndex;
private long scheduledEpochMillis;
+ public static ContainerReplicaOp create(PendingOpType opType,
+ DatanodeDetails target, int replicaIndex) {
+ return new ContainerReplicaOp(opType, target, replicaIndex,
+ System.currentTimeMillis());
+ }
Review Comment:
So far, we don't create any ContainerRepliaOps except in tests, but the main
code will soon need to create them, and this static method should make it a
little bit nicer to create them in the main code flow when we do. What do you
think?
--
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]