0

Hadoop 단어 수 예제가 작동하지 않습니다. 명령을 실행할 때 예외가 발생했습니다. hadoop jar /home/meghna/Desktop/hadoop-1.1.2/hadoop-examples-1.1.2.jar wordcount /word.txt/out 다음은 예외의 세부 사항입니다.Hadoop 데모 코드가 작동하지 않습니다.

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) 
+0

안녕하세요, 저는 같은 문제가 있습니다. 문제를 해결 했습니까? 그렇다면 경험을 공유 할 수 있습니까? – VirusX

답변

2

HDFS의 일부 디렉토리에 대한 액세스 권한이 없습니다. 다음 동심을 사용해보십시오. hadoop fs -chmod -R 777 mapredsystem

0

액세스 권한이 없습니다. 루트 사용자로 작업을 시작하거나 디렉토리의 사용자 및 권한을 변경하십시오.

+0

나는 루트를 사용하여 이미 실행 중입니다. – Mani

+0

작업을 시작하는 데 사용하는 명령을 표시 할 수 있습니까? – Tariq

+0

hadoop jar /home/meghna/Desktop/hadoop-1.1.2/hadoop-examples-1.1.2.jar wordcount /word.txt/out – Mani