xiaoyuyao commented on a change in pull request #389: HDDS-2534. scmcli 
container delete not working
URL: https://github.com/apache/hadoop-ozone/pull/389#discussion_r366638690
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerReportHandler.java
 ##########
 @@ -119,21 +127,33 @@ public void onMessage(final ContainerReportFromDatanode 
reportFromDatanode,
    * @param datanodeDetails Datanode from which this report was received
    * @param replicas list of ContainerReplicaProto
    */
-  private void processContainerReplicas(final DatanodeDetails datanodeDetails,
-      final List<ContainerReplicaProto> replicas) {
+  private List<ContainerReplicaProto> processContainerReplicas(
+      final DatanodeDetails datanodeDetails,
+      final List<ContainerReplicaProto> replicas,
+      final EventPublisher publisher) {
+    List<ContainerReplicaProto> containers = new ArrayList<>();  
     for (ContainerReplicaProto replicaProto : replicas) {
       try {
         processContainerReplica(datanodeDetails, replicaProto);
+        containers.add(replicaProto);
       } catch (ContainerNotFoundException e) {
-        LOG.error("Received container report for an unknown container" +
-                " {} from datanode {}.", replicaProto.getContainerID(),
-            datanodeDetails, e);
+        LOG.info("Received container report for an unknown container" +
+                " {} from datanode {},delete it.",
+            replicaProto.getContainerID(),
+            datanodeDetails);
+        publisher.fireEvent(
 
 Review comment:
   Should we fireEvent upon receive the scmcli request? Can we add some high 
level design description wrt the flow of the delete in the PR description? That 
will help the reviewers. 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to