1

Ich versuche, in Windows7 ein Hadoop-Programm im pseudoverteilten Modus auszuführen, und eine RuntimeException wurde ausgelöst. Ich weiß nicht warum und wie ich es beheben kann.Warum hat Hadoop in Windows7 eine RuntimeException ausgelöst: Fehler beim Konfigurieren des Objekts

Ich benutze Python für mapreduce Arbeit statt Java mit Hadoop-Streaming-Dienstprogramm (https://hadoop.apache.org/docs/current/hadoop-streaming/HadoopStreaming.html). Ich lief hadoop jar %HADOOP_HOME%\share\hadoop\tools\lib\hadoop-streaming-2.6.2.jar -mapper mapper.py -reducer reducer.py -input myinput -output myoutput -file mapper.py -file reducer.py und ein java.lang.RuntimeException: Error in configuring object wurde ausgelöst und Job fehlgeschlagen.

Meine Hadoop-Version ist 2.6.2, und Hadoop ist auf Windows7 x64, nicht auf der virtuellen Maschine oder Cygwin gebaut.

Zuerst habe ich das Standard-Testprogramm von hadoop verwendet, um zu testen, ob hadoop erfolgreich installiert wurde. Ich lief yarn jar %HADOOP_HOME%/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.2.jar pi 16 1000 und die Ausgabe ist korrekt. Hadoop und MapReduce arbeiten.

Zweitens wurden die Mapper.py und Reducer.py unter Eingabeaufforderung mit Befehl cat data.txt | python mapper.py | sort | python reducer.py getestet und die Ausgabe ist korrekt. Daher wäre es nicht der Bug des Python-Programms.

Ich versuche, die Eigenschaft 'hadoop.tmp.dir' in das lokale Verzeichnis und/tmp zu ändern, aber keiner von beiden hat funktioniert. Ich weiß nicht, warum die Ausnahme ausgelöst wurde und wie sie zu beheben ist. Vielen Dank, wenn mir jemand helfen kann!

Das komplette Ausnahmeprotokoll ist wie folgt:

16/03/25 18:47:46 WARN streaming.StreamJob: -file option is deprecated, please use generic option -files instead. 
packageJobJar: [mapper.py, reducer.py, /C:/Users/chensk/AppData/Local/Temp/hadoop-unjar5079915111177028733/] [] C:\Users\chensk\AppData\Local\Temp\streamjob6081649198401076264.jar tmpDir=null 
16/03/25 18:47:47 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032 
16/03/25 18:47:48 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032 
16/03/25 18:47:50 INFO mapred.FileInputFormat: Total input paths to process : 1 
16/03/25 18:47:50 INFO mapreduce.JobSubmitter: number of splits:2 
16/03/25 18:47:50 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1458902651843_0002 
16/03/25 18:47:51 INFO impl.YarnClientImpl: Submitted application application_1458902651843_0002 
16/03/25 18:47:51 INFO mapreduce.Job: The url to track the job: http://skyfalls:8088/proxy/application_1458902651843_0002/ 
16/03/25 18:47:51 INFO mapreduce.Job: Running job: job_1458902651843_0002 
16/03/25 18:47:59 INFO mapreduce.Job: Job job_1458902651843_0002 running in uber mode : false 
16/03/25 18:47:59 INFO mapreduce.Job: map 0% reduce 0% 
16/03/25 18:48:07 INFO mapreduce.Job: Task Id : attempt_1458902651843_0002_m_000001_0, Status : FAILED 
Error: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:446) 
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) 
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163) 
    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:1656) 
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 9 more 
Caused by: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38) 
    ... 14 more 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 17 more 
Caused by: java.lang.RuntimeException: configuration exception 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:222) 
    at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66) 
    ... 22 more 
Caused by: java.io.IOException: Cannot run program "G:\Programs\hadoop\tmp\nm-local-dir\usercache\chensk\appcache\application_1458902651843_0002\container_1458902651843_0002_01_000003\.\mapper.py": CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209) 
    ... 23 more 
Caused by: java.io.IOException: CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385) 
    at java.lang.ProcessImpl.start(ProcessImpl.java:136) 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) 
    ... 24 more 

16/03/25 18:48:08 INFO mapreduce.Job: map 50% reduce 0% 
16/03/25 18:48:08 INFO mapreduce.Job: Task Id : attempt_1458902651843_0002_m_000000_0, Status : FAILED 
Error: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:446) 
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) 
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163) 
    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:1656) 
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 9 more 
Caused by: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38) 
    ... 14 more 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 17 more 
Caused by: java.lang.RuntimeException: configuration exception 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:222) 
    at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66) 
    ... 22 more 
Caused by: java.io.IOException: Cannot run program "G:\Programs\hadoop\tmp\nm-local-dir\usercache\chensk\appcache\application_1458902651843_0002\container_1458902651843_0002_01_000002\.\mapper.py": CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209) 
    ... 23 more 
Caused by: java.io.IOException: CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385) 
    at java.lang.ProcessImpl.start(ProcessImpl.java:136) 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) 
    ... 24 more 

16/03/25 18:48:09 INFO mapreduce.Job: map 0% reduce 0% 
16/03/25 18:48:14 INFO mapreduce.Job: Task Id : attempt_1458902651843_0002_m_000001_1, Status : FAILED 
Error: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:446) 
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) 
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163) 
    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:1656) 
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 9 more 
Caused by: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38) 
    ... 14 more 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 17 more 
Caused by: java.lang.RuntimeException: configuration exception 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:222) 
    at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66) 
    ... 22 more 
Caused by: java.io.IOException: Cannot run program "G:\Programs\hadoop\tmp\nm-local-dir\usercache\chensk\appcache\application_1458902651843_0002\container_1458902651843_0002_01_000004\.\mapper.py": CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209) 
    ... 23 more 
Caused by: java.io.IOException: CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385) 
    at java.lang.ProcessImpl.start(ProcessImpl.java:136) 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) 
    ... 24 more 

16/03/25 18:48:16 INFO mapreduce.Job: Task Id : attempt_1458902651843_0002_m_000000_1, Status : FAILED 
Error: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:446) 
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) 
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163) 
    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:1656) 
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 9 more 
Caused by: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38) 
    ... 14 more 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 17 more 
Caused by: java.lang.RuntimeException: configuration exception 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:222) 
    at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66) 
    ... 22 more 
Caused by: java.io.IOException: Cannot run program "G:\Programs\hadoop\tmp\nm-local-dir\usercache\chensk\appcache\application_1458902651843_0002\container_1458902651843_0002_01_000005\.\mapper.py": CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209) 
    ... 23 more 
Caused by: java.io.IOException: CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385) 
    at java.lang.ProcessImpl.start(ProcessImpl.java:136) 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) 
    ... 24 more 

16/03/25 18:48:23 INFO mapreduce.Job: Task Id : attempt_1458902651843_0002_m_000001_2, Status : FAILED 
Error: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:446) 
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) 
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163) 
    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:1656) 
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 9 more 
Caused by: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38) 
    ... 14 more 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 17 more 
Caused by: java.lang.RuntimeException: configuration exception 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:222) 
    at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66) 
    ... 22 more 
Caused by: java.io.IOException: Cannot run program "G:\Programs\hadoop\tmp\nm-local-dir\usercache\chensk\appcache\application_1458902651843_0002\container_1458902651843_0002_01_000006\.\mapper.py": CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209) 
    ... 23 more 
Caused by: java.io.IOException: CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385) 
    at java.lang.ProcessImpl.start(ProcessImpl.java:136) 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) 
    ... 24 more 

16/03/25 18:48:25 INFO mapreduce.Job: Task Id : attempt_1458902651843_0002_m_000000_2, Status : FAILED 
Error: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:446) 
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) 
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163) 
    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:1656) 
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 9 more 
Caused by: java.lang.RuntimeException: Error in configuring object 
    at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) 
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75) 
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) 
    at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38) 
    ... 14 more 
Caused by: java.lang.reflect.InvocationTargetException 
    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.ReflectionUtils.setJobConf(ReflectionUtils.java:106) 
    ... 17 more 
Caused by: java.lang.RuntimeException: configuration exception 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:222) 
    at org.apache.hadoop.streaming.PipeMapper.configure(PipeMapper.java:66) 
    ... 22 more 
Caused by: java.io.IOException: Cannot run program "G:\Programs\hadoop\tmp\nm-local-dir\usercache\chensk\appcache\application_1458902651843_0002\container_1458902651843_0002_01_000007\.\mapper.py": CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) 
    at org.apache.hadoop.streaming.PipeMapRed.configure(PipeMapRed.java:209) 
    ... 23 more 
Caused by: java.io.IOException: CreateProcess error=193, %1 ??????完?? Win32 ??車 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385) 
    at java.lang.ProcessImpl.start(ProcessImpl.java:136) 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) 
    ... 24 more 

16/03/25 18:48:32 INFO mapreduce.Job: map 100% reduce 100% 
16/03/25 18:48:34 INFO mapreduce.Job: Job job_1458902651843_0002 failed with state FAILED due to: Task failed task_1458902651843_0002_m_000001 
Job failed as tasks failed. failedMaps:1 failedReduces:0 

16/03/25 18:48:34 INFO mapreduce.Job: Counters: 13 
    Job Counters 
     Failed map tasks=7 
     Killed map tasks=1 
     Launched map tasks=8 
     Other local map tasks=6 
     Data-local map tasks=2 
     Total time spent by all maps in occupied slots (ms)=52274 
     Total time spent by all reduces in occupied slots (ms)=0 
     Total time spent by all map tasks (ms)=52274 
     Total vcore-seconds taken by all map tasks=52274 
     Total megabyte-seconds taken by all map tasks=53528576 
    Map-Reduce Framework 
     CPU time spent (ms)=0 
     Physical memory (bytes) snapshot=0 
     Virtual memory (bytes) snapshot=0 
16/03/25 18:48:34 ERROR streaming.StreamJob: Job not successful! 
Streaming Command Failed! 

Antwort

0

Die Werte der -mapper und -reducer Befehlszeilenargumente müssen ausführbare Dateien sein. Unter Windows, das Shebang-Zeilen nicht unterstützt, sind Python-Skripte nicht ausführbar.

Versuchen Sie, die -mapper und -reducer Argumente wie folgt spezifiziert:

-mapper "python mapper.py" -reducer "python reducer.py" 

Bitte beachten Sie, dass ich mich nicht laufen diese so garantieren kann ich nicht, dass es funktionieren wird. Es kann sich beschweren, dass es eine Datei mit dem Namen python mapper.py nicht finden kann.

Wenn dies nicht funktioniert, schreiben Sie kurze Batch-Skripts und reducer.bat, die nur das entsprechende Python-Skript ausführen. Zum Beispiel würde mapper.bat die folgenden Zeilen enthalten:

@echo off 
python mapper.py %* 

Dann diese Batch-Skripten als -mapper und -reducer Argumente angeben. Fügen Sie außerdem die Befehlszeilenargumente -file mapper.bat und -file reducer.bat hinzu, um sicherzustellen, dass diese Stapelskripte auf alle Ihre Rechenknoten kopiert werden.

+0

Ich versuche, die Argumente -mapper und -reducer als 'python mapper.py' und' python reducer.py' anzugeben, und das funktioniert! Danke vielmals! –

Verwandte Themen