You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/07 13:47:00 UTC

[GitHub] [hadoop] mukul1987 commented on a change in pull request #1211: HDDS-1888. Add containers to node2container map in SCM as soon as a container is created.

mukul1987 commented on a change in pull request #1211: HDDS-1888. Add containers to node2container map in SCM as soon as a container is created.
URL: https://github.com/apache/hadoop/pull/1211#discussion_r311556945
 
 

 ##########
 File path: hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/MockNodeManager.java
 ##########
 @@ -267,6 +267,19 @@ public void removePipeline(Pipeline pipeline) {
     node2PipelineMap.removePipeline(pipeline);
   }
 
+  @Override
+  public void addContainer(DatanodeDetails dd,
+                           ContainerID containerId)
+      throws NodeNotFoundException {
+    try {
+      Set<ContainerID> set = node2ContainerMap.getContainers(dd.getUuid());
+      set.add(containerId);
+      node2ContainerMap.setContainersForDatanode(dd.getUuid(), set);
+    } catch (SCMException e) {
+      e.printStackTrace();
 
 Review comment:
   Is this needed ? can we just throw the exception or log the error.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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