热度 1|
01 02 03 04 05 06 07 08 09 10 11 12 13 14 | ... //Create ugi for joe. The login user is 'super'. UserGroupInformation ugi = UserGroupInformation.createProxyUser("joe", UserGroupInformation.getLoginUser()); ugi.doAs(new PrivilegedExceptionAction<Void>() { public Void run() throws Exception { //Submit a job JobClient jc = new JobClient(conf); jc.submitJob(conf); //OR access hdfs FileSystem fs = FileSystem.get(conf); fs.mkdir(someFilePath); } } |
1 2 3 4 5 6 7 8 | <property> <name>hadoop.proxyuser.super.hosts</name> <value>host1,host2</value> </property> <property> <name>hadoop.proxyuser.super.groups</name> <value>group1,group2</value> </property> |
1 2 3 4 5 6 7 8 | <property> <name>hadoop.proxyuser.oozie.hosts</name> <value>*</value> </property> <property> <name>hadoop.proxyuser.oozie.groups</name> <value>*</value> </property> |
1 2 3 4 5 6 7 8 | <property> <name>hadoop.proxyuser.super.hosts</name> <value>10.222.0.0/16,10.113.221.221</value> </property> <property> <name>hadoop.proxyuser.super.users</name> <value>user1,user2</value> </property> |