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

Xiaoyu Yao commented on HDDS-277:
---------------------------------

Thanks [~msingh] for the patch. Patch v2 looks good to me overall. Here are a 
few comments:
CloseContainerEventHandler.java
Line 90: NIT: typo "FINIALIZE"


PipelineSelector.java
Line 342: can we move the pipeline.getLifeCycleState()==LifeCycleState.CLOSING 
check before open container check? This way, the container close in most case 
won't trigger the containerstateManager queries.

Line 343: should we call manager.closePipeline(pipeline) after this to clean up 
pipeline from the in-memory pipeline map.
Line 351: unused can be removed.


Node2PipelineMap.java
Line 123: we should use computIfPresent here like below:
{code}dn2PipelineMap.computeIfPresent(dnId,
    (k,v)->{v.remove(pipeline);return v;});
{code}

ContainerStateManager.java
Line 350: should we remove the openPipelineMap here and relies solely on the 
PipelineManager#activePipelines?

RatisManagerImpl.java
Line 119: yes, I think we should destroy the raft ring. Can you file a follow 
up JIRA on that?



> PipelineStateMachine should handle closure of pipelines in SCM
> --------------------------------------------------------------
>
>                 Key: HDDS-277
>                 URL: https://issues.apache.org/jira/browse/HDDS-277
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: SCM
>    Affects Versions: 0.2.1
>            Reporter: Mukul Kumar Singh
>            Assignee: Mukul Kumar Singh
>            Priority: Major
>             Fix For: 0.2.1
>
>         Attachments: HDDS-277.001.patch, HDDS-277.002.patch
>
>
> Currently the only visible state of pipelines in SCM is the open state. This 
> jira adds capability to PipelineStateMachine to close a SCM pipeline and 
> corresponding open containers on the pipeline. Once all the containers on the 
> pipeline have been closed then the nodes of the pipeline will be released 
> back to the free node pool



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