From 3c8f1c53b2feba92f486bf6f542b36209ce12e3b Mon Sep 17 00:00:00 2001 From: Anu Engineer Date: Thu, 31 Aug 2017 15:49:29 -0700 Subject: [PATCH] HDFS-12382. Ozone: SCM: BlockManager creates a new container for each allocateBlock call. Contributed by Nandakumar. --- .../org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java index d920c429979..d5202464d35 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java @@ -316,7 +316,7 @@ public class BlockManagerImpl implements BlockManager, BlockmanagerMXBean { // should be enough for now. private void refreshContainers() { Map containersByState = - this.containers.get(OzoneProtos.LifeCycleState.ALLOCATED); + this.containers.get(OzoneProtos.LifeCycleState.CREATING); for (String containerName: containersByState.keySet()) { try { ContainerInfo containerInfo = @@ -329,7 +329,7 @@ public class BlockManagerImpl implements BlockManager, BlockmanagerMXBean { continue; } if (containerInfo.getState() == OzoneProtos.LifeCycleState.OPEN) { - updateContainer(OzoneProtos.LifeCycleState.ALLOCATED, containerName, + updateContainer(OzoneProtos.LifeCycleState.CREATING, containerName, containerInfo.getState()); } // TODO: check containers in other state and refresh as needed.