How to submit jobs to work as other Linux users

the hadoop user is the runnnig jobtracker and tasktracker on the cluster, but what if other Linux users want to submit their jobs?

I followed this documentation, http://hadoop.apache.org/docs/r1.0.4/service_level_auth.html#Hadoop+Services+and+Configuration+Properties add the following to "core-site.xml":

<property> <name>hadoop.security.authorization</name> <value>true</value> </property> 

and for the conf file "hadoop-policy.xml", I add "hadoopGroup" to "security.job.submission.protocol.acl", my account "qingya.shu" belongs to this group. but when I run hadoop as qingya.shu, I encountered an error, for example:

 12/11/09 12:57:29 INFO util.NativeCodeLoader: Loaded the native-hadoop library 12/11/09 12:57:29 INFO input.FileInputFormat: Total input paths to process : 1 12/11/09 12:57:29 WARN snappy.LoadSnappy: Snappy native library not loaded 12/11/09 12:57:29 INFO mapred.JobClient: Cleaning up the staging area file:/lustre/hadoop/user/qingya.shu/.staging/job_201211082024_0008 12/11/09 12:57:29 ERROR security.UserGroupInformation: PriviledgedActionException as:qingya.shu cause:org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.io.FileNotFoundException: File file:/lustre/hadoop/user/qingya.shu/.staging/job_201211082024_0008/job.xml does not exist. at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:3943) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121) at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382) Caused by: java.io.FileNotFoundException: File file:/lustre/hadoop/user/qingya.shu/.staging/job_201211082024_0008/job.xml does not exist. at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:397) at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251) at org.apache.hadoop.mapred.JobInProgress.<init>(JobInProgress.java:406) at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:3941) ... 11 more org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.io.FileNotFoundException: File file:/lustre/hadoop/user/qingya.shu/.staging/job_201211082024_0008/job.xml does not exist. at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:3943) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121) at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382) Caused by: java.io.FileNotFoundException: File file:/lustre/hadoop/user/qingya.shu/.staging/job_201211082024_0008/job.xml does not exist. at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:397) at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251) at org.apache.hadoop.mapred.JobInProgress.<init>(JobInProgress.java:406) at org.apache.hadoop.mapred.JobTracker.submitJob(JobTracker.java:3941) ... 11 more at org.apache.hadoop.ipc.Client.call(Client.java:1070) at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:225) at org.apache.hadoop.mapred.$Proxy1.submitJob(Unknown Source) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:921) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121) at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850) at org.apache.hadoop.mapreduce.Job.submit(Job.java:500) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530) at org.apache.hadoop.examples.WordCount.main(WordCount.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68) at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139) at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.util.RunJar.main(RunJar.java:156) 

note that gloss is used as a distributed file system instead of HDFS.

Can anybody help me?

+7
source share
1 answer

try the following:

  <property> <name>hadoop.security.authorization</name> <value>simple</value> </property> 
0
source

All Articles