sodonnel commented on code in PR #5929:
URL: https://github.com/apache/ozone/pull/5929#discussion_r1461799375
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DatanodeAdminMonitorImpl.java:
##########
@@ -122,6 +123,15 @@ public DatanodeDetails getDatanodeDetails() {
public long getStartTime() {
return startTime;
}
+
+ public Map<String, List<ContainerID>> getContainersReplicatedOnNode() {
+ return containersReplicatedOnNode;
+ }
+
+ public void setContainersReplicatedOnNode(List<ContainerID>
underReplicated, List<ContainerID> unClosed) {
+ this.containersReplicatedOnNode.put("UnderReplicated",
ImmutableList.copyOf(underReplicated));
Review Comment:
I don't think we need to make a copy of the lists here. The list are local
variable so nothing can change them after we exit the method, so making a copy
just adds expense. It would be find to wrap them in an Immutable list however.
--
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]