Browse Source

HDFS-11952. Ozone: Fix TestContainerSQLCli#testConvertContainerDB. Contributed by Weiwei Yang.

Xiaoyu Yao 8 năm trước cách đây
mục cha
commit
ddc88eaf88

+ 1 - 2
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();