sodonnel commented on code in PR #4069:
URL: https://github.com/apache/ozone/pull/4069#discussion_r1046145452
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/ReplicateContainerCommandHandler.java:
##########
@@ -66,12 +66,15 @@ public void handle(SCMCommand command, OzoneContainer
container,
final List<DatanodeDetails> sourceDatanodes =
replicateCommand.getSourceDatanodes();
final long containerID = replicateCommand.getContainerID();
+ final long deadline = replicateCommand.getDeadline();
Preconditions.checkArgument(sourceDatanodes.size() > 0,
"Replication command is received for container %s "
+ "without source datanodes.", containerID);
- supervisor.addTask(new ReplicationTask(containerID, sourceDatanodes));
+ ReplicationTask task = new ReplicationTask(containerID, sourceDatanodes);
+ task.setDeadline(deadline);
+ supervisor.addTask(task);
Review Comment:
Yea let me look at this. There is a similar pattern in the ECReconstruction
command, where we basically duplicate the entire command into another object
which really only has getters the same as the command, so we might be able to
make that go away too.
--
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]