代码首先在本地测试成功后
需要改写一些,首先把输入输出改成 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/
网友评论