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

in javaApi, UGI params should be overidden through FileSystem conf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.7.2, 3.2.0
    • None
    • security
    • None

    Description

      org.apache.hadoop.security.UserGroupInformation#ensureInitialized,will always get the configure from the configuration files. Like below:

      private static void ensureInitialized() {
        if (conf == null) {
          synchronized(UserGroupInformation.class) {
            if (conf == null) { // someone might have beat us
              initialize(new Configuration(), false);
            }
          }
        }
      }

      So that, if FileSystem is created through FileSystem#get or FileSystem#newInstance with conf, the conf values different from the configuration files will not take effect in UserGroupInformation.  E.g:

      Configuration conf = new Configuration();
      conf.set("k1","v1");
      conf.set("k2","v2");
      FileSystem fs = FileSystem.get(uri, conf);

      "k1" or "k2" will not work in UserGroupInformation.

      Attachments

        1. HADOOP-16977.002.patch
          3 kB
          Hongbing Wang
        2. HADOOP-16977.001.patch
          1 kB
          Hongbing Wang

        Activity

          People

            Unassigned Unassigned
            wanghongbing Hongbing Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: