You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hongbing Wang (Jira)" <ji...@apache.org> on 2020/04/13 02:53:00 UTC

[jira] [Updated] (HADOOP-16977) in javaApi, UGI params should be overidden through FileSystem conf

     [ https://issues.apache.org/jira/browse/HADOOP-16977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hongbing Wang updated HADOOP-16977:
-----------------------------------
    Description: 
org.apache.hadoop.security.UserGroupInformation#ensureInitialized,will always get the configure from the configuration files. Like below:
{code:java}
private static void ensureInitialized() {
  if (conf == null) {
    synchronized(UserGroupInformation.class) {
      if (conf == null) { // someone might have beat us
        initialize(new Configuration(), false);
      }
    }
  }
}{code}
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:
{code:java}
Configuration conf = new Configuration();
conf.set("k1","v1");
conf.set("k2","v2");
FileSystem fs = FileSystem.get(uri, conf);{code}
"k1" or "k2" will not work in UserGroupInformation.

> in javaApi, UGI params should be overidden through FileSystem conf
> ------------------------------------------------------------------
>
>                 Key: HADOOP-16977
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16977
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common
>    Affects Versions: 2.7.2, 3.2.0
>            Reporter: Hongbing Wang
>            Priority: Major
>
> org.apache.hadoop.security.UserGroupInformation#ensureInitialized,will always get the configure from the configuration files. Like below:
> {code:java}
> private static void ensureInitialized() {
>   if (conf == null) {
>     synchronized(UserGroupInformation.class) {
>       if (conf == null) { // someone might have beat us
>         initialize(new Configuration(), false);
>       }
>     }
>   }
> }{code}
> 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:
> {code:java}
> Configuration conf = new Configuration();
> conf.set("k1","v1");
> conf.set("k2","v2");
> FileSystem fs = FileSystem.get(uri, conf);{code}
> "k1" or "k2" will not work in UserGroupInformation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org