You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/06/01 14:45:27 UTC

[GitHub] [hadoop-ozone] nandakumar131 opened a new pull request #1000: HDDS-3562. Datanodes should send ICR when a container replica deletion is successful.

nandakumar131 opened a new pull request #1000:
URL: https://github.com/apache/hadoop-ozone/pull/1000


   ## What changes were proposed in this pull request?
   Whenever a datanode executes the delete container command and deletes the container replica, it has to immediately send an ICR to update the container replica state in SCM.
   
   ## What is the link to the Apache JIRA
   HDDS-3562
   
   ## How was this patch tested?
   Related unit tests added


----------------------------------------------------------------
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



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


[GitHub] [hadoop-ozone] elek commented on pull request #1000: HDDS-3562. Datanodes should send ICR when a container replica deletion is successful.

Posted by GitBox <gi...@apache.org>.
elek commented on pull request #1000:
URL: https://github.com/apache/hadoop-ozone/pull/1000#issuecomment-637575647


   Congratulation for the number #1000 ;-)


----------------------------------------------------------------
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



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


[GitHub] [hadoop-ozone] dineshchitlangia merged pull request #1000: HDDS-3562. Datanodes should send ICR when a container replica deletion is successful.

Posted by GitBox <gi...@apache.org>.
dineshchitlangia merged pull request #1000:
URL: https://github.com/apache/hadoop-ozone/pull/1000


   


----------------------------------------------------------------
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



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


[GitHub] [hadoop-ozone] nandakumar131 commented on pull request #1000: HDDS-3562. Datanodes should send ICR when a container replica deletion is successful.

Posted by GitBox <gi...@apache.org>.
nandakumar131 commented on pull request #1000:
URL: https://github.com/apache/hadoop-ozone/pull/1000#issuecomment-638941051


   > Congratulation for the number #1000 ;-)
   
   Thanks @elek  😄 


----------------------------------------------------------------
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



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


[GitHub] [hadoop-ozone] dineshchitlangia commented on a change in pull request #1000: HDDS-3562. Datanodes should send ICR when a container replica deletion is successful.

Posted by GitBox <gi...@apache.org>.
dineshchitlangia commented on a change in pull request #1000:
URL: https://github.com/apache/hadoop-ozone/pull/1000#discussion_r434974495



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/AbstractContainerReportHandler.java
##########
@@ -225,14 +218,35 @@ private void updateContainerState(final DatanodeDetails datanode,
     }
   }
 
+  private void updateContainerReplica(final DatanodeDetails datanodeDetails,
+                                      final ContainerID containerId,
+                                      final ContainerReplicaProto replicaProto)
+      throws ContainerNotFoundException, ContainerReplicaNotFoundException {
+    final ContainerReplica replica = ContainerReplica.newBuilder()
+        .setContainerID(containerId)
+        .setContainerState(replicaProto.getState())
+        .setDatanodeDetails(datanodeDetails)
+        .setOriginNodeId(UUID.fromString(replicaProto.getOriginNodeId()))
+        .setSequenceId(replicaProto.getBlockCommitSequenceId())
+        .build();
+
+    if (replica.getState().equals(State.DELETED)) {
+      containerManager.removeContainerReplica(containerId, replica);
+    } else {
+      containerManager.updateContainerReplica(containerId, replica);
+    }
+  }
+
   /**
    * Returns true if the container replica is not marked as UNHEALTHY.
    *
    * @param replicaState State of the container replica.
    * @return true if unhealthy, false otherwise
    */
   private boolean isUnhealthy(final Supplier<State> replicaState) {

Review comment:
       NIT: Update javadocs




----------------------------------------------------------------
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



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