Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13315

FileContext#umask is not initialized properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.6.0
    • 2.8.0, 3.0.0-alpha1
    • None
    • None

    Description

      Notice field umask is not set to parameter theUmask and theUmask is unused.

      FileContext.java
        private FileContext(final AbstractFileSystem defFs,
          final FsPermission theUmask, final Configuration aConf) {
          defaultFS = defFs;
          umask = FsPermission.getUMask(aConf);
          conf = aConf;
      ...
        public static FileContext getFileContext(final AbstractFileSystem defFS,
                          final Configuration aConf) {
          return new FileContext(defFS, FsPermission.getUMask(aConf), aConf);
        }
      

      Proposal:

      • Set umask to theUmask. Since the only caller getFileContext already passes the same value in theUmask, there is no change in behavior.

      Attachments

        1. HADOOP-13315.001.patch
          1 kB
          John Zhuge

        Activity

          People

            jzhuge John Zhuge
            jzhuge John Zhuge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: