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

Xiaoyu Yao commented on HDFS-11844:
-----------------------------------

Thanks [~cheersyang] for reporting the issue. ContainerManagerImpl manages 
containers on DN side. It will be reloaded upon DN restart.

SCM maintains its own container DB (see ContainerMapping.java) and will reload 
upon restart as well. However, the get container command works only against a 
closed container. (according to the spec). I think we have an open JIRA for 
implement get container CLI. 
Can you elaborate on 4. "Get existing container state via SCM CLI, this step 
will fail with container doesn't exist error."

> Ozone: Recover SCM state when SCM is restarted
> ----------------------------------------------
>
>                 Key: HDFS-11844
>                 URL: https://issues.apache.org/jira/browse/HDFS-11844
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone, scm
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>
> SCM losses its state once being restarted. This issue can be found by a 
> simple test with following steps
> # Start NN, DN, SCM
> # Create several containers via SCM CLI
> # Restart SCM
> # Get existing container state via SCM CLI, this step will fail with 
> container doesn't exist error.
> {{ContainerManagerImpl}} maintains a cache of container mapping 
> {{containerMap}}, if SCM is restarted, this information is lost. We need a 
> way to restore the state from DB in a background thread.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to