Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7240 Scaling HDFS
  3. HDFS-11568

Ozone: Create metadata path automatically after null checking

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • HDFS-7240
    • 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

        1. HDFS-11568-HDFS-7240.001.patch
          5 kB
          Mukul Kumar Singh

        Issue Links

          Activity

            People

              msingh Mukul Kumar Singh
              yuanbo Yuanbo Liu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: