美文网首页
MapReduce 在服务器上运行

MapReduce 在服务器上运行

作者: V_6619 | 来源:发表于2021-11-19 16:59 被阅读0次

代码首先在本地测试成功后

需要改写一些,首先把输入输出改成 args[0] args[1]
如下:

FileInputFormat.setInputPaths(job, new Path(args[0]));
FileOutputFormat.setOutputPath(job, new Path(args[1]));
 mvn clean package -DskinTests

如果遇到mvn commond not found
执行

source ~/.bash_profile

编写脚本

hadoop jar /home/hadoop/lib/hadoop-train-v2-1.0.jar com.imooc.bigdata.hadoop.mr.project.mrServer.PageStatServerApp hdfs://hadoop000:8020/project/input/raw/ hdfs://hadoop000:8020/project/output/v1/pvstat/

相关文章

网友评论

      本文标题:MapReduce 在服务器上运行

      本文链接:https://www.haomeiwen.com/subject/dlqetrtx.html