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

Qiang Zhang updated RANGER-1932:
--------------------------------
    Description: 
Steps:
1.Create service named yarndev and userName is xiehh
2.The Queue of the default policy for user xiehh is '.*'
3.Using xiehh to execute the command line 'hadoop jar 
/home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
 wordcount -Dmapreduce.job.queuename=default /input /output/mr'
  Exceptions are as follows:
{code}
  [xiehh@zdh41 hadoop-2.7.1]$ hadoop jar 
/home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
 wordcount -Dmapreduce.job.queuename=default /input /output/mr
17/12/15 10:53:27 WARN util.NativeCodeLoader: Unable to load native-hadoop 
library for your platform... using builtin-java classes where applicable
17/12/15 10:53:28 INFO client.RMProxy: Connecting to ResourceManager at 
/0.0.0.0:8032
17/12/15 10:53:28 INFO input.FileInputFormat: Total input paths to process : 1
17/12/15 10:53:28 INFO mapreduce.JobSubmitter: number of splits:1
17/12/15 10:53:29 INFO mapreduce.JobSubmitter: Submitting tokens for job: 
job_1513238905285_0005
17/12/15 10:53:44 INFO mapreduce.JobSubmitter: Cleaning up the staging area 
/tmp/hadoop-yarn/staging/xiehh/.staging/job_1513238905285_0005
java.io.IOException: org.apache.hadoop.yarn.exceptions.YarnException: Failed to 
submit application_1513238905285_0005 to YARN : 
org.apache.hadoop.security.AccessControlException: User xiehh cannot submit 
applications to queue root.default
        at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:306)
        at 
org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)
        at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
        at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
        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:1657)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)
        at org.apache.hadoop.examples.WordCount.main(WordCount.java:87)
        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:606)
        at 
org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:71)
        at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:144)
        at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
        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:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit 
application_1513238905285_0005 to YARN : 
org.apache.hadoop.security.AccessControlException: User xiehh cannot submit 
applications to queue root.default
        at 
org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.submitApplication(YarnClientImpl.java:270)
        at 
org.apache.hadoop.mapred.ResourceMgrDelegate.submitApplication(ResourceMgrDelegate.java:290)
        at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:290)
        ... 22 more
{code}
The user xiehh does't have the permission, and the default policy for 
'all-queue' does't take effect.
4.Through analysis,I find that the Queue ".*"  is wrong,
 and we should change to "*.*".
5.After changed:
{code}
[xiehh@zdh41 hadoop-2.7.1]$ hadoop jar 
/home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
 wordcount -Dmapreduce.job.queuename=default /input /output/mr1
17/12/15 11:38:00 WARN util.NativeCodeLoader: Unable to load native-hadoop 
library for your platform... using builtin-java classes where applicable
17/12/15 11:38:00 INFO client.RMProxy: Connecting to ResourceManager at 
/0.0.0.0:8032
17/12/15 11:38:01 INFO input.FileInputFormat: Total input paths to process : 1
17/12/15 11:38:01 INFO mapreduce.JobSubmitter: number of splits:1
17/12/15 11:38:02 INFO mapreduce.JobSubmitter: Submitting tokens for job: 
job_1513238905285_0006
17/12/15 11:38:17 INFO impl.YarnClientImpl: Submitted application 
application_1513238905285_0006
17/12/15 11:38:17 INFO mapreduce.Job: The url to track the job: 
http://zdh41:8088/proxy/application_1513238905285_0006/
17/12/15 11:38:17 INFO mapreduce.Job: Running job: job_1513238905285_0006
17/12/15 11:38:23 INFO mapreduce.Job: Job job_1513238905285_0006 running in 
uber mode : false
17/12/15 11:38:23 INFO mapreduce.Job:  map 0% reduce 0%
17/12/15 11:38:28 INFO mapreduce.Job:  map 100% reduce 0%
17/12/15 11:38:34 INFO mapreduce.Job:  map 100% reduce 100%
{code}

  was:
Steps:
1.Create service named yarndev and userName is xiehh
2.The Queue of the default policy for user xiehh is '.*'
3.Using xiehh to execute the command line 'hadoop jar 
/home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
 wordcount -Dmapreduce.job.queuename=default /input /output/mr'
  Exceptions are as follows:
{code}
  [xiehh@zdh41 hadoop-2.7.1]$ hadoop jar 
/home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
 wordcount -Dmapreduce.job.queuename=default /input /output/mr
17/12/15 10:53:27 WARN util.NativeCodeLoader: Unable to load native-hadoop 
library for your platform... using builtin-java classes where applicable
17/12/15 10:53:28 INFO client.RMProxy: Connecting to ResourceManager at 
/0.0.0.0:8032
17/12/15 10:53:28 INFO input.FileInputFormat: Total input paths to process : 1
17/12/15 10:53:28 INFO mapreduce.JobSubmitter: number of splits:1
17/12/15 10:53:29 INFO mapreduce.JobSubmitter: Submitting tokens for job: 
job_1513238905285_0005
17/12/15 10:53:44 INFO mapreduce.JobSubmitter: Cleaning up the staging area 
/tmp/hadoop-yarn/staging/xiehh/.staging/job_1513238905285_0005
java.io.IOException: org.apache.hadoop.yarn.exceptions.YarnException: Failed to 
submit application_1513238905285_0005 to YARN : 
org.apache.hadoop.security.AccessControlException: User xiehh cannot submit 
applications to queue root.default
        at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:306)
        at 
org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)
        at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
        at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
        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:1657)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)
        at org.apache.hadoop.examples.WordCount.main(WordCount.java:87)
        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:606)
        at 
org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:71)
        at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:144)
        at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
        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:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit 
application_1513238905285_0005 to YARN : 
org.apache.hadoop.security.AccessControlException: User xiehh cannot submit 
applications to queue root.default
        at 
org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.submitApplication(YarnClientImpl.java:270)
        at 
org.apache.hadoop.mapred.ResourceMgrDelegate.submitApplication(ResourceMgrDelegate.java:290)
        at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:290)
        ... 22 more
{code}
The user xiehh does't have the permission, and the default policy for 
'all-queue' does't take effect.
4.Through analysis,I find that the Queue ".*" is wrong,we should change to 
"*.*".
5.After changed:
{code}
[xiehh@zdh41 hadoop-2.7.1]$ hadoop jar 
/home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
 wordcount -Dmapreduce.job.queuename=default /input /output/mr1
17/12/15 11:38:00 WARN util.NativeCodeLoader: Unable to load native-hadoop 
library for your platform... using builtin-java classes where applicable
17/12/15 11:38:00 INFO client.RMProxy: Connecting to ResourceManager at 
/0.0.0.0:8032
17/12/15 11:38:01 INFO input.FileInputFormat: Total input paths to process : 1
17/12/15 11:38:01 INFO mapreduce.JobSubmitter: number of splits:1
17/12/15 11:38:02 INFO mapreduce.JobSubmitter: Submitting tokens for job: 
job_1513238905285_0006
17/12/15 11:38:17 INFO impl.YarnClientImpl: Submitted application 
application_1513238905285_0006
17/12/15 11:38:17 INFO mapreduce.Job: The url to track the job: 
http://zdh41:8088/proxy/application_1513238905285_0006/
17/12/15 11:38:17 INFO mapreduce.Job: Running job: job_1513238905285_0006
17/12/15 11:38:23 INFO mapreduce.Job: Job job_1513238905285_0006 running in 
uber mode : false
17/12/15 11:38:23 INFO mapreduce.Job:  map 0% reduce 0%
17/12/15 11:38:28 INFO mapreduce.Job:  map 100% reduce 0%
17/12/15 11:38:34 INFO mapreduce.Job:  map 100% reduce 100%
{code}


> After create the service of yarndev,the policy named 'all-queue' created for 
> the default user should have all the permissions.However, this policy does't 
> take effect.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1932
>                 URL: https://issues.apache.org/jira/browse/RANGER-1932
>             Project: Ranger
>          Issue Type: Bug
>          Components: plugins
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>              Labels: patch
>
> Steps:
> 1.Create service named yarndev and userName is xiehh
> 2.The Queue of the default policy for user xiehh is '.*'
> 3.Using xiehh to execute the command line 'hadoop jar 
> /home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
>  wordcount -Dmapreduce.job.queuename=default /input /output/mr'
>   Exceptions are as follows:
> {code}
>   [xiehh@zdh41 hadoop-2.7.1]$ hadoop jar 
> /home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
>  wordcount -Dmapreduce.job.queuename=default /input /output/mr
> 17/12/15 10:53:27 WARN util.NativeCodeLoader: Unable to load native-hadoop 
> library for your platform... using builtin-java classes where applicable
> 17/12/15 10:53:28 INFO client.RMProxy: Connecting to ResourceManager at 
> /0.0.0.0:8032
> 17/12/15 10:53:28 INFO input.FileInputFormat: Total input paths to process : 1
> 17/12/15 10:53:28 INFO mapreduce.JobSubmitter: number of splits:1
> 17/12/15 10:53:29 INFO mapreduce.JobSubmitter: Submitting tokens for job: 
> job_1513238905285_0005
> 17/12/15 10:53:44 INFO mapreduce.JobSubmitter: Cleaning up the staging area 
> /tmp/hadoop-yarn/staging/xiehh/.staging/job_1513238905285_0005
> java.io.IOException: org.apache.hadoop.yarn.exceptions.YarnException: Failed 
> to submit application_1513238905285_0005 to YARN : 
> org.apache.hadoop.security.AccessControlException: User xiehh cannot submit 
> applications to queue root.default
>       at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:306)
>       at 
> org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)
>       at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)
>       at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)
>       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:1657)
>       at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)
>       at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)
>       at org.apache.hadoop.examples.WordCount.main(WordCount.java:87)
>       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:606)
>       at 
> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:71)
>       at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:144)
>       at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
>       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:606)
>       at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>       at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> Caused by: org.apache.hadoop.yarn.exceptions.YarnException: Failed to submit 
> application_1513238905285_0005 to YARN : 
> org.apache.hadoop.security.AccessControlException: User xiehh cannot submit 
> applications to queue root.default
>       at 
> org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.submitApplication(YarnClientImpl.java:270)
>       at 
> org.apache.hadoop.mapred.ResourceMgrDelegate.submitApplication(ResourceMgrDelegate.java:290)
>       at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:290)
>       ... 22 more
> {code}
> The user xiehh does't have the permission, and the default policy for 
> 'all-queue' does't take effect.
> 4.Through analysis,I find that the Queue ".*"  is wrong,
>  and we should change to "*.*".
> 5.After changed:
> {code}
> [xiehh@zdh41 hadoop-2.7.1]$ hadoop jar 
> /home/xiehh/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar
>  wordcount -Dmapreduce.job.queuename=default /input /output/mr1
> 17/12/15 11:38:00 WARN util.NativeCodeLoader: Unable to load native-hadoop 
> library for your platform... using builtin-java classes where applicable
> 17/12/15 11:38:00 INFO client.RMProxy: Connecting to ResourceManager at 
> /0.0.0.0:8032
> 17/12/15 11:38:01 INFO input.FileInputFormat: Total input paths to process : 1
> 17/12/15 11:38:01 INFO mapreduce.JobSubmitter: number of splits:1
> 17/12/15 11:38:02 INFO mapreduce.JobSubmitter: Submitting tokens for job: 
> job_1513238905285_0006
> 17/12/15 11:38:17 INFO impl.YarnClientImpl: Submitted application 
> application_1513238905285_0006
> 17/12/15 11:38:17 INFO mapreduce.Job: The url to track the job: 
> http://zdh41:8088/proxy/application_1513238905285_0006/
> 17/12/15 11:38:17 INFO mapreduce.Job: Running job: job_1513238905285_0006
> 17/12/15 11:38:23 INFO mapreduce.Job: Job job_1513238905285_0006 running in 
> uber mode : false
> 17/12/15 11:38:23 INFO mapreduce.Job:  map 0% reduce 0%
> 17/12/15 11:38:28 INFO mapreduce.Job:  map 100% reduce 0%
> 17/12/15 11:38:34 INFO mapreduce.Job:  map 100% reduce 100%
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to