HDDS-1081. CLOSING state containers should not be added to pipeline on SCM start.
authorNanda kumar <nanda@apache.org>
Tue, 12 Feb 2019 09:09:08 +0000 (14:39 +0530)
committerNanda kumar <nanda@apache.org>
Tue, 12 Feb 2019 09:09:08 +0000 (14:39 +0530)
Contributed by Lokesh Jain.

hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java

index b7848bd..93abdcc 100644 (file)
@@ -112,7 +112,7 @@ public class SCMContainerManager implements ContainerManager {
           ContainerInfoProto.PARSER.parseFrom(entry.getValue()));
       Preconditions.checkNotNull(container);
       containerStateManager.loadContainer(container);
-      if (container.isOpen()) {
+      if (container.getState() == LifeCycleState.OPEN) {
         pipelineManager.addContainerToPipeline(container.getPipelineID(),
             ContainerID.valueof(container.getContainerID()));
       }