命令和执行结果如下:
[mw_shl_code=shell,true]hadoop@node-master:~/workspace/flow_statistic$ hadoop jar /usr/local/src/hadoop-3.1.0/share/hadoop/tools/lib/hadoop-streaming-3.1.0.jar -file flow_statistic_mapper.py -mapper 'python flow_statistic_mapper.py' -file flow_statistic_reducer.py -reducer 'python flow_statistic_reducer.py' -input all_cdn_logs/*.gz -output output-flow
2018-05-15 19:14:26,975 WARN streaming.StreamJob: -file option is deprecated, please use generic option -files instead.
packageJobJar: [flow_statistic_mapper.py, flow_statistic_reducer.py, /tmp/hadoop-unjar3114046136813781093/] [] /tmp/streamjob6407868495582297159.jar tmpDir=null
2018-05-15 19:14:28,667 INFO client.RMProxy: Connecting to ResourceManager at node-master/120.77.239.67:18040
2018-05-15 19:14:28,944 INFO client.RMProxy: Connecting to ResourceManager at node-master/120.77.239.67:18040
2018-05-15 19:14:29,587 INFO mapreduce.JobResourceUploader: Disabling Erasure Coding for path: /tmp/hadoop-yarn/staging/hadoop/.staging/job_1526300938491_0016
2018-05-15 19:14:30,598 INFO mapred.FileInputFormat: Total input files to process : 24
2018-05-15 19:14:30,741 INFO mapreduce.JobSubmitter: number of splits:24
2018-05-15 19:14:30,789 INFO Configuration.deprecation: yarn.resourcemanager.system-metrics-publisher.enabled is deprecated. Instead, use yarn.system-metrics-publisher.enabled
2018-05-15 19:14:31,866 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1526300938491_0016
2018-05-15 19:14:31,868 INFO mapreduce.JobSubmitter: Executing with tokens: []
2018-05-15 19:14:32,071 INFO conf.Configuration: resource-types.xml not found
2018-05-15 19:14:32,072 INFO resource.ResourceUtils: Unable to find 'resource-types.xml'.
2018-05-15 19:14:32,177 INFO impl.YarnClientImpl: Submitted application application_1526300938491_0016
2018-05-15 19:14:32,229 INFO mapreduce.Job: The url to track the job: http://node-master:18088/proxy/application_1526300938491_0016/
2018-05-15 19:14:32,231 INFO mapreduce.Job: Running job: job_1526300938491_0016
2018-05-15 19:14:38,323 INFO mapreduce.Job: Job job_1526300938491_0016 running in uber mode : false
2018-05-15 19:14:38,325 INFO mapreduce.Job: map 0% reduce 0%
2018-05-15 19:14:46,398 INFO mapreduce.Job: map 8% reduce 0%
2018-05-15 19:14:50,419 INFO mapreduce.Job: map 21% reduce 0%
2018-05-15 19:14:54,438 INFO mapreduce.Job: map 25% reduce 0%
2018-05-15 19:14:56,449 INFO mapreduce.Job: map 29% reduce 0%
2018-05-15 19:15:04,487 INFO mapreduce.Job: map 38% reduce 0%
2018-05-15 19:15:05,492 INFO mapreduce.Job: map 42% reduce 0%
2018-05-15 19:15:06,497 INFO mapreduce.Job: map 50% reduce 0%
2018-05-15 19:15:14,534 INFO mapreduce.Job: map 54% reduce 0%
2018-05-15 19:15:15,539 INFO mapreduce.Job: map 58% reduce 0%
2018-05-15 19:15:21,569 INFO mapreduce.Job: map 67% reduce 0%
2018-05-15 19:15:23,578 INFO mapreduce.Job: map 71% reduce 0%
2018-05-15 19:15:24,582 INFO mapreduce.Job: map 75% reduce 0%
2018-05-15 19:15:30,608 INFO mapreduce.Job: map 75% reduce 25%
2018-05-15 19:15:31,613 INFO mapreduce.Job: map 79% reduce 25%
2018-05-15 19:15:32,617 INFO mapreduce.Job: map 88% reduce 25%
2018-05-15 19:15:34,626 INFO mapreduce.Job: map 92% reduce 25%
2018-05-15 19:15:36,634 INFO mapreduce.Job: map 92% reduce 31%
2018-05-15 19:15:39,646 INFO mapreduce.Job: map 96% reduce 31%
2018-05-15 19:15:40,651 INFO mapreduce.Job: map 100% reduce 31%
2018-05-15 19:15:41,659 INFO mapreduce.Job: map 100% reduce 100%
2018-05-15 19:15:43,676 INFO mapreduce.Job: Job job_1526300938491_0016 completed successfully
2018-05-15 19:15:43,784 INFO mapreduce.Job: Counters: 53
File System Counters
FILE: Number of bytes read=2208548
FILE: Number of bytes written=9857943
FILE: Number of read operations=0
FILE: Number of large read operations=0
FILE: Number of write operations=0
HDFS: Number of bytes read=864242
HDFS: Number of bytes written=303
HDFS: Number of read operations=77
HDFS: Number of large read operations=0
HDFS: Number of write operations=2
Job Counters
Launched map tasks=24
Launched reduce tasks=1
Data-local map tasks=24
Total time spent by all maps in occupied slots (ms)=167511
Total time spent by all reduces in occupied slots (ms)=32319
Total time spent by all map tasks (ms)=167511
Total time spent by all reduce tasks (ms)=32319
Total vcore-milliseconds taken by all map tasks=167511
Total vcore-milliseconds taken by all reduce tasks=32319
Total megabyte-milliseconds taken by all map tasks=343062528
Total megabyte-milliseconds taken by all reduce tasks=66189312
Map-Reduce Framework
Map input records=87876
Map output records=35060
Map output bytes=2138422
Map output materialized bytes=2208686
Input split bytes=3864
Combine input records=0
Combine output records=0
Reduce input groups=9
Reduce shuffle bytes=2208686
Reduce input records=35060
Reduce output records=9
Spilled Records=70120
Shuffled Maps =24
Failed Shuffles=0
Merged Map outputs=24
GC time elapsed (ms)=3650
CPU time spent (ms)=23560
Physical memory (bytes) snapshot=8264720384
Virtual memory (bytes) snapshot=66202730496
Total committed heap usage (bytes)=6004146176
Peak Map Physical memory (bytes)=346320896
Peak Map Virtual memory (bytes)=2619580416
Peak Reduce Physical memory (bytes)=210169856
Peak Reduce Virtual memory (bytes)=3486892032
Shuffle Errors
BAD_ID=0
CONNECTION=0
IO_ERROR=0
WRONG_LENGTH=0
WRONG_MAP=0
WRONG_REDUCE=0
File Input Format Counters
Bytes Read=860378
File Output Format Counters
Bytes Written=303