From 058129bca7484e7f6caf271d8cb433eb9bd138b4 Mon Sep 17 00:00:00 2001 From: Xiaoyu Yao Date: Thu, 8 Jun 2017 10:07:16 -0700 Subject: [PATCH] HDFS-11952. Ozone: Fix TestContainerSQLCli#testConvertContainerDB. Contributed by Weiwei Yang. --- .../apache/hadoop/ozone/scm/container/ContainerMapping.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java index 2b572494cac..164b0c27359 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java @@ -81,12 +81,11 @@ public class ContainerMapping implements Mapping { this.cacheSize = cacheSizeMB; File metaDir = OzoneUtils.getScmMetadirPath(conf); - String scmMetaDataDir = metaDir.getParent(); Options options = new Options(); options.cacheSize(this.cacheSize * OzoneConsts.MB); // Write the container name to pipeline mapping. - File containerDBPath = new File(scmMetaDataDir, CONTAINER_DB); + File containerDBPath = new File(metaDir, CONTAINER_DB); containerStore = new LevelDBStore(containerDBPath, options); this.lock = new ReentrantLock();