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

in javaApi, UGI params should be overidden through FileSystem conf

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.7.2, 3.2.0
    • Fix Version/s: None
    • Component/s: security
    • Labels:
      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.001.patch
          1 kB
          Hongbing Wang
        2. HADOOP-16977.002.patch
          3 kB
          Hongbing Wang

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wanghongbing Hongbing Wang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment