From eeb1d432a8c5e822d1737bab79448d06092a736d Mon Sep 17 00:00:00 2001 From: Nandakumar Date: Thu, 18 Oct 2018 18:03:33 +0530 Subject: [PATCH] HDDS-687. Exception while loading containers during SCM startup. Contributed by Lokesh Jain. --- .../hadoop/hdds/scm/container/SCMContainerManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 9d6cadbc7f4..ec2a8d0a634 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 @@ -170,8 +170,10 @@ public class SCMContainerManager implements ContainerManager { try { for (ContainerInfo container : containerList) { containerStateManager.addExistingContainer(container); - pipelineSelector.addContainerToPipeline( - container.getPipelineID(), container.getContainerID()); + if (container.isContainerOpen()) { + pipelineSelector.addContainerToPipeline(container.getPipelineID(), + container.getContainerID()); + } } } catch (SCMException ex) { LOG.error("Unable to create a container information. ", ex);