我的data檔案:你好我是中文中文
在自己的電腦上面執行cat data|python mapper.py|sort|python reducer.py可順利執行
但在hadoop中卻無法順利執行,
執行hadoop指令
hadoop jar /usr/lib/hadoop/contrib/streaming/hadoop-streaming-0.20.2-cdh3u3.jar -file mapper.py -mapper mapper.py
-file $reducer.py -reducer reducer.py -input /user/stayhigh/ -output $4
hadoop jar /usr/lib/hadoop/contrib/streaming/hadoop-streaming-0.20.2-cdh3u3.jar -file mapper.py -mapper mapper.py
-file $reducer.py -reducer reducer.py -input /user/stayhigh/ -output $4
下面給出錯誤訊息:
12/03/18 10:56:50 INFO security.UserGroupInformation: JAAS Configuration already set up for Hadoop, not re-installing.
packageJobJar: [mapper.py, reducer.py, /var/lib/hadoop-0.20/cache/stayhigh/hadoop-unjar8981423723230921443/] [] /tmp/streamjob2748145161211328089.jar tmpDir=null
12/03/18 10:56:50 WARN snappy.LoadSnappy: Snappy native library is available
12/03/18 10:56:50 INFO util.NativeCodeLoader: Loaded the native-hadoop library
12/03/18 10:56:50 INFO snappy.LoadSnappy: Snappy native library loaded
12/03/18 10:56:50 INFO mapred.FileInputFormat: Total input paths to process : 1
12/03/18 10:56:51 INFO streaming.StreamJob: getLocalDirs(): [/var/lib/hadoop-0.20/cache/stayhigh/mapred/local]
12/03/18 10:56:51 INFO streaming.StreamJob: Running job: job_201203121725_0761
12/03/18 10:56:51 INFO streaming.StreamJob: To kill this job, run:
12/03/18 10:56:51 INFO streaming.StreamJob: /usr/lib/hadoop-0.20/bin/hadoop job -Dmapred.job.tracker=192.168.11.100:8021 -kill job_201203121725_0761
12/03/18 10:56:51 INFO streaming.StreamJob: Tracking URL: http://hadoop:50030/jobdetails.jsp?jobid=job_201203121725_0761
12/03/18 10:56:52 INFO streaming.StreamJob: map 0% reduce 0%
12/03/18 10:56:54 INFO streaming.StreamJob: map 50% reduce 0%
12/03/18 10:57:02 INFO streaming.StreamJob: map 50% reduce 17%
12/03/18 10:57:12 INFO streaming.StreamJob: map 100% reduce 100%
12/03/18 10:57:12 INFO streaming.StreamJob: To kill this job, run:
12/03/18 10:57:12 INFO streaming.StreamJob: /usr/lib/hadoop-0.20/bin/hadoop job -Dmapred.job.tracker=192.168.11.100:8021 -kill job_201203121725_0761
12/03/18 10:57:12 INFO streaming.StreamJob: Tracking URL: http://hadoop:50030/jobdetails.jsp?jobid=job_201203121725_0761
12/03/18 10:57:12 ERROR streaming.StreamJob: Job not successful. Error: NA
12/03/18 10:57:12 INFO streaming.StreamJob: killJob...
Streaming Command Failed!