sarvekshayr commented on code in PR #8100:
URL: https://github.com/apache/ozone/pull/8100#discussion_r2000358376
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStateManager.java:
##########
@@ -374,11 +374,10 @@ public int getPipelinesCount(DatanodeDetails
datanodeDetails) {
*/
public DatanodeInfo getNode(DatanodeDetails datanodeDetails)
throws NodeNotFoundException {
- return getNode(datanodeDetails.getUuid());
+ return getNode(datanodeDetails.getID());
}
- public DatanodeInfo getNode(UUID uuid)
- throws NodeNotFoundException {
+ public DatanodeInfo getNode(DatanodeID uuid) throws NodeNotFoundException {
Review Comment:
Can we change the variable name from `uuid` to `datanodeID` to make it clear?
Needs to be changed in 3 places.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStateManager.java:
##########
@@ -680,56 +678,47 @@ public void removePipeline(Pipeline pipeline) {
/**
* Adds the given container to the specified datanode.
- *
- * @param uuid - datanode uuid
- * @param containerId - containerID
* @throws NodeNotFoundException - if datanode is not known. For new datanode
* use addDatanodeInContainerMap call.
*/
- public void addContainer(final UUID uuid,
+ public void addContainer(final DatanodeID datanodeID,
final ContainerID containerId)
throws NodeNotFoundException {
- nodeStateMap.addContainer(uuid, containerId);
+ nodeStateMap.addContainer(datanodeID, containerId);
}
/**
* Removes the given container from the specified datanode.
- *
- * @param uuid - datanode uuid
- * @param containerId - containerID
* @throws NodeNotFoundException - if datanode is not known. For new datanode
* use addDatanodeInContainerMap call.
*/
- public void removeContainer(final UUID uuid,
+ public void removeContainer(final DatanodeID datanodeID,
final ContainerID containerId)
throws NodeNotFoundException {
- nodeStateMap.removeContainer(uuid, containerId);
+ nodeStateMap.removeContainer(datanodeID, containerId);
}
/**
* Update set of containers available on a datanode.
- * @param uuid - DatanodeID
- * @param containerIds - Set of containerIDs
* @throws NodeNotFoundException - if datanode is not known.
*/
- public void setContainers(UUID uuid, Set<ContainerID> containerIds)
+ public void setContainers(DatanodeID datanodeID, Set<ContainerID>
containerIds)
throws NodeNotFoundException {
- nodeStateMap.setContainers(uuid, containerIds);
+ nodeStateMap.setContainers(datanodeID, containerIds);
}
/**
* Return set of containerIDs available on a datanode. This is a copy of the
* set which resides inside NodeStateMap and hence can be modified without
* synchronization or side effects.
- * @param uuid - DatanodeID
* @return - set of containerIDs
*/
- public Set<ContainerID> getContainers(UUID uuid)
+ public Set<ContainerID> getContainers(DatanodeID uuid)
Review Comment:
Here.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStateManager.java:
##########
@@ -680,56 +678,47 @@ public void removePipeline(Pipeline pipeline) {
/**
* Adds the given container to the specified datanode.
- *
- * @param uuid - datanode uuid
- * @param containerId - containerID
* @throws NodeNotFoundException - if datanode is not known. For new datanode
* use addDatanodeInContainerMap call.
*/
- public void addContainer(final UUID uuid,
+ public void addContainer(final DatanodeID datanodeID,
final ContainerID containerId)
throws NodeNotFoundException {
- nodeStateMap.addContainer(uuid, containerId);
+ nodeStateMap.addContainer(datanodeID, containerId);
}
/**
* Removes the given container from the specified datanode.
- *
- * @param uuid - datanode uuid
- * @param containerId - containerID
* @throws NodeNotFoundException - if datanode is not known. For new datanode
* use addDatanodeInContainerMap call.
*/
- public void removeContainer(final UUID uuid,
+ public void removeContainer(final DatanodeID datanodeID,
final ContainerID containerId)
throws NodeNotFoundException {
- nodeStateMap.removeContainer(uuid, containerId);
+ nodeStateMap.removeContainer(datanodeID, containerId);
}
/**
* Update set of containers available on a datanode.
- * @param uuid - DatanodeID
- * @param containerIds - Set of containerIDs
* @throws NodeNotFoundException - if datanode is not known.
*/
- public void setContainers(UUID uuid, Set<ContainerID> containerIds)
+ public void setContainers(DatanodeID datanodeID, Set<ContainerID>
containerIds)
throws NodeNotFoundException {
- nodeStateMap.setContainers(uuid, containerIds);
+ nodeStateMap.setContainers(datanodeID, containerIds);
}
/**
* Return set of containerIDs available on a datanode. This is a copy of the
* set which resides inside NodeStateMap and hence can be modified without
* synchronization or side effects.
- * @param uuid - DatanodeID
* @return - set of containerIDs
*/
- public Set<ContainerID> getContainers(UUID uuid)
+ public Set<ContainerID> getContainers(DatanodeID uuid)
throws NodeNotFoundException {
return nodeStateMap.getContainers(uuid);
}
- public int getContainerCount(UUID uuid)
+ public int getContainerCount(DatanodeID uuid)
Review Comment:
Here as well.
--
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]