Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
The metadata path of ozone container should be checked properly and created accordingly while it's initiated. Some code snips that we need to change are here:
ContainerMapping.java
// TODO: Fix this checking. String scmMetaDataDir = conf.get(OzoneConfigKeys .OZONE_CONTAINER_METADATA_DIRS); if ((scmMetaDataDir == null) || (scmMetaDataDir.isEmpty())) { throw new IllegalArgumentException("SCM metadata directory is not valid."); }
OzoneContainer.java
List<StorageLocation> locations = new LinkedList<>(); String[] paths = ozoneConfig.getStrings( OzoneConfigKeys.OZONE_CONTAINER_METADATA_DIRS); if (paths != null && paths.length > 0) { for (String p : paths) { locations.add(StorageLocation.parse(p)); } } else { getDataDir(locations); }
Attachments
Attachments
Issue Links
- breaks
-
HDFS-11952 Ozone: Fix TestContainerSQLCli#testConvertContainerDB
- Resolved