-
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
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.