[ 
https://issues.apache.org/jira/browse/HDDS-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578797#comment-16578797
 ] 

Ajay Kumar commented on HDDS-268:
---------------------------------

[~xyao],  CommandStatusReportHandler already publishes 
{{SCMEvents.CLOSE_CONTAINER_STATUS}}. New watcher will be listening to this. In 
case of Failure it will send a event to CloseContainerCommandHandler which may 
resend the command to datanodes. For all other cases watcher will remove it 
from its internal queue and consider the event as completed. I think we need to 
handle PENDING status separately as well.

{code}@Override   protected synchronized void 
handleCompletion(CloseContainerStatus status,
              EventPublisher publisher) throws LeaseNotFoundException {
            CloseContainerRetryableReq closeCont = 
getTrackedEventbyId(status.getId());
            super.handleCompletion(status, publisher);      if 
(status.getCmdStatus().getStatus().equals(Status.FAILED) && closeCont           
 != null) {            this.resendEventToHandler(closeCont.getId(), publisher);
    }     }{code}

Had a discussion regarding this with [~nandakumar131]. If we don't consider 
Container to be closed until we receive ack from all related DN's than we need 
to add DN id to CloseContainerRetryableReq to track command to every datanode. 
If you agree i will submit a new patch with both the changes.

> Add SCM close container watcher
> -------------------------------
>
>                 Key: HDDS-268
>                 URL: https://issues.apache.org/jira/browse/HDDS-268
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Xiaoyu Yao
>            Assignee: Ajay Kumar
>            Priority: Blocker
>             Fix For: 0.2.1
>
>         Attachments: HDDS-268.00.patch, HDDS-268.01.patch, HDDS-268.02.patch, 
> HDDS-268.03.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to