#文件内容
[root@wpixel01 www]# cat wordCount.txt
hadoop contos windows
contos zojirushi zare nike
adidas hadoop my windows google
google baidu zojirushi
#上传到ns1集群的/txt目录
[root@wpixel01 www]# hadoop fs -put wordCount.txt hdfs://ns1/txt/wordCount#运行测试程序
[root@wpixel01 mapreduce]# hadoop jar hadoop-mapreduce-examples-2.8.1.jar wordcount /txt/wordCount /count#这里是yarn计算的基本信息18/01/2817:43:28 INFO input.FileInputFormat: Total input files to process : 118/01/2817:43:28 INFO mapreduce.JobSubmitter: number of splits:118/01/2817:43:29 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1517156134219_0001
18/01/2817:43:31 INFO impl.YarnClientImpl: Submitted application application_1517156134219_0001
18/01/2817:43:31 INFO mapreduce.Job: The url to track the job: http://wpixel03:8088/proxy/application_1517156134219_0001/
18/01/2817:43:31 INFO mapreduce.Job: Running job: job_1517156134219_0001
18/01/2817:44:35 INFO mapreduce.Job: Job job_1517156134219_0001 running in uber mode : false
18/01/2817:44:35 INFO mapreduce.Job: map 0% reduce 0%
18/01/2817:44:50 INFO mapreduce.Job: map 100% reduce 0%
18/01/2817:45:01 INFO mapreduce.Job: map 100% reduce 100%
18/01/2817:45:03 INFO mapreduce.Job: Job job_1517156134219_0001 completed successfully