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

Yiqun Lin commented on HDDS-733:
--------------------------------

[~ljain], thanks for updating the patch!
{quote}In SCMChillModeManager#ContainerChillModeRule we should exclude the 
containers which are in OPEN state from adding to containerMap. Now the 
containers in OPEN state might not be created in datanode.
 ChillModeManager should track pipelines in the cluster for containers in OPEN 
state.
{quote}
I suppose we haven't addressed this comment mentioned from [~nandakumar131]
 In class {{ContainerChillModeRule}}
{code:java}
if(containers != null) {
      containers.forEach(c -> {
        // Containers in ALLOCATED state should not be included while
        // calculating the total number of containers here. They are not
        // reported by DNs and hence should not affect the chill mode exit
        // rule.
        if (c != null && c.getState() != null &&
            !c.getState().equals(HddsProtos.LifeCycleState.ALLOCATED)) {
          containerMap.put(c.getContainerID(), c);
        }
      });
{code}
Here ALLOCATED can be replaced by OPEN state.

> Create container if not exist, as part of chunk write
> -----------------------------------------------------
>
>                 Key: HDDS-733
>                 URL: https://issues.apache.org/jira/browse/HDDS-733
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: Ozone Datanode
>            Reporter: Nanda kumar
>            Assignee: Lokesh Jain
>            Priority: Major
>         Attachments: HDDS-733.001.patch, HDDS-733.002.patch, 
> HDDS-733.003.patch
>
>
> The current implementation requires a container to be created in datanode 
> before starting the chunk write. This can be optimized by creating the 
> container on the first chunk write.
>  During chunk write, if the container is missing, we can go ahead and create 
> the container.
> Along with this change ALLOCATED and CREATING container states can be removed 
> as they were used to track which containers have been successfully created. 
> Also there is a shouldCreateContainer flag which is used by client to know if 
> it needs to create container. This flag can be removed.



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