HDFS-12048. Ozone:TestOzoneContainerRatis & TestRatisManager are failing consistently. Contributed by Mukul Kumar Singh.

This commit is contained in:
Weiwei Yang 2017-07-03 22:11:04 +08:00 committed by Owen O'Malley
parent d1ac8611c6
commit e07662cb04

View File

@ -113,9 +113,12 @@ protected void setupDatanodeAddress(
getInstanceStorageDir(i, -1).getCanonicalPath()); getInstanceStorageDir(i, -1).getCanonicalPath());
String containerMetaDirs = dnConf.get( String containerMetaDirs = dnConf.get(
OzoneConfigKeys.OZONE_CONTAINER_METADATA_DIRS) + "-dn-" + i; 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, setConf(i, dnConf, OzoneConfigKeys.OZONE_CONTAINER_METADATA_DIRS,
containerMetaDirs); containerMetaDirs);
Path containerRootPath =
containerMetaDirPath.resolve(OzoneConsts.CONTAINER_ROOT_PREFIX);
Files.createDirectories(containerRootPath);
} }
static void setConf(int i, Configuration conf, String key, String value) { static void setConf(int i, Configuration conf, String key, String value) {