[ 
https://issues.apache.org/jira/browse/HADOOP-16977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17086367#comment-17086367
 ] 

Hongbing Wang commented on HADOOP-16977:
----------------------------------------

Thank [[email protected]] , thank you for your detailed answers and 
suggestions. I think it should be fixed because our internal version uses 
`hadoop.user.name` for  authentication, but it cannot be passed to 
distcp.execute (). We can choose `System.setProperty(k,v)` to solve the 
problem, but system variables will affect Global. Now, I try to modify from the 
business code. Thank you once again!

> 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: security
>    Affects Versions: 2.7.2, 3.2.0
>            Reporter: Hongbing Wang
>            Priority: Major
>         Attachments: HADOOP-16977.001.patch, HADOOP-16977.002.patch
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to