代碼首先在本地測(cè)試成功后
需要改寫一些麻诀,首先把輸入輸出改成 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
執(zhí)行
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/