From e07662cb04e994fd665e21ceeefdcdc68375ef00 Mon Sep 17 00:00:00 2001 From: Weiwei Yang Date: Mon, 3 Jul 2017 22:11:04 +0800 Subject: [PATCH] HDFS-12048. Ozone:TestOzoneContainerRatis & TestRatisManager are failing consistently. Contributed by Mukul Kumar Singh. --- .../test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java index db9b52212d..9e3c1e4d4e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java @@ -113,9 +113,12 @@ protected void setupDatanodeAddress( getInstanceStorageDir(i, -1).getCanonicalPath()); String containerMetaDirs = dnConf.get( OzoneConfigKeys.OZONE_CONTAINER_METADATA_DIRS) + "-dn-" + i; - Files.createDirectories(Paths.get(containerMetaDirs)); + Path containerMetaDirPath = Paths.get(containerMetaDirs); setConf(i, dnConf, OzoneConfigKeys.OZONE_CONTAINER_METADATA_DIRS, containerMetaDirs); + Path containerRootPath = + containerMetaDirPath.resolve(OzoneConsts.CONTAINER_ROOT_PREFIX); + Files.createDirectories(containerRootPath); } static void setConf(int i, Configuration conf, String key, String value) {