hadoop演示代码不工作

bwleehnv  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(321)

hadoop word count example not working在执行命令hadoop jar/home/meghna/desktop/hadoop-1.1.2/hadoop-examples-1.1.2.jar wordcount/word.txt/out时引发访问控制异常以下是异常的详细信息。

13/06/30 23:21:21 INFO input.FileInputFormat: Total input paths to process : 1
13/06/30 23:21:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
13/06/30 23:21:21 WARN snappy.LoadSnappy: Snappy native library not loaded
13/06/30 23:21:22 INFO mapred.JobClient: Running job: job_201306302144_0005
13/06/30 23:21:23 INFO mapred.JobClient:  map 0% reduce 0%
13/06/30 23:21:25 INFO mapred.JobClient: Task Id : attempt_201306302144_0005_m_000002_0, Status : FAILED
Error initializing attempt_201306302144_0005_m_000002_0:
org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=mapred, access=EXECUTE, inode="mapredsystem":root:supergroup:rwx------
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:95)
    at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:57)
    at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1030)
    at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:524)
    at org.apache.hadoop.mapred.TaskTracker.localizeJobTokenFile(TaskTracker.java:4458)
    at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1280)
    at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1221)
    at org.apache.hadoop.mapred.TaskTracker$5.run(TaskTracker.java:2581)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.security.AccessControlException: Permission denied: user=mapred, access=EXECUTE, inode="mapredsystem":root:supergroup:rwx------
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:199)
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(FSPermissionChecker.java:155)
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:125)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:5468)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkTraverse(FSNamesystem.java:5447)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFileInfo(FSNamesystem.java:2168)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.getFileInfo(NameNode.java:888)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:578)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1393)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1389)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1149)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1387)

    at org.apache.hadoop.ipc.Client.call(Client.java:1107)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
    at $Proxy7.getFileInfo(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62)
    at $Proxy7.getFileInfo(Unknown Source)
    at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1028)
    ... 6 more

13/06/30 23:21:25 WARN mapred.JobClient: Error reading task outputhttp://localhost:50060/tasklog?plaintext=true&attemptid=attempt_201306302144_0005_m_000002_0&filter=stdout
13/06/30 23:21:25 WARN mapred.JobClient: Error reading task outputhttp://localhost:50060/tasklog?plaintext=true&attemptid=attempt_201306302144_0005_m_000002_0&filter=stderr
13/06/30 23:21:25 INFO mapred.JobClient: Task Id : attempt_201306302144_0005_m_000002_1, Status : FAILED
Error initializing attempt_201306302144_0005_m_000002_1:
org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=mapred, access=EXECUTE, inode="mapredsystem":root:supergroup:rwx------
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:95)
    at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:57)
    at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1030)
    at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:524)
    at org.apache.hadoop.mapred.TaskTracker.localizeJobTokenFile(TaskTracker.java:4458)
    at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1280)
    at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1221)
    at org.apache.hadoop.mapred.TaskTracker$5.run(TaskTracker.java:2581)
    at java.lang.Thread.run(Thread.java:662)
r7s23pms

r7s23pms1#

您无权访问hdfs上的某些目录。您可以尝试以下常用方法:hadoopfs-chmod-r777mapredsystem

lmvvr0a8

lmvvr0a82#

你没有访问权限。以root用户身份启动作业或更改目录的用户和权限。

相关问题