标签:
1, 右击project,选择 maven build,产生jar文件。
2,产生输入文件:
hadoop fs -put 输入文件路径 文件夹 example: hadoop fs -put $HADOOP_HOME/Hadoop-WordCount/input/ input hadoop fs -ls input
3, 运行java 文件:
hadoop jar jar文件路径 package名称.文件名 input文件 输出文件 example: hadoop jar $HADOOP_HOME/Hadoop-WordCount/wordcount.jar WordCount input output
4, view output file
hadoop fs -ls output hadoop fs -cat output/*
如果想要显示system.out.println 的文件:
Easy way to access the logs is http://localhost:50030/jobtracker.jsp->click on the completed job->click on map or reduce task->click on tasknumber->task logs->stdout logs.
标签:
原文地址:http://www.cnblogs.com/lilyfindjobs/p/4455277.html