Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-7325

getDefaultBlockSize reports incorrect size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.1.0
    • None
    • None

    Description

      Calling some operations on the Hadoop FileSystem interface backed by an Ozone FileSystem do not return the expected results when based on ozone-site.xml configuration options.

      If I do something like

      Configuration conf = new Configuration();
      FileSystem fs = (new Path(uri)).getFileSystem(CONF);
      fs.getDefaultSize()
      

      it always returns the default value when I set ozone.scm.block.size in ozone-site.xml (also tried core-site.xml).

      The only way to get the correct value is to
      1. Pass an OzoneConfiguration object.
      2. Disable fs cache with fs.ofs.impl.disable.cache: true in core-site.xml (so we don't have to pass OzoneConfiguration every place we fetch the FileSystem).

      Having to explicitly pass an OzoneConfiguration object seems contrary to the principles of the Hadoop FileSystem abstraction.

      Attachments

        Issue Links

          Activity

            People

              weichiu Wei-Chiu Chuang
              MikaelSmith Michael Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: