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

FileContext#umask is not initialized properly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: