From 4f7d32edf8c0e9d81809b9b881f421bb7428406a Mon Sep 17 00:00:00 2001 From: Nanda kumar Date: Tue, 12 Feb 2019 14:39:08 +0530 Subject: [PATCH] HDDS-1081. CLOSING state containers should not be added to pipeline on SCM start. Contributed by Lokesh Jain. --- .../apache/hadoop/hdds/scm/container/SCMContainerManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java index b7848bd9aa..93abdcc828 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/SCMContainerManager.java @@ -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())); }