hadoop實戰隨筆_0714

Map接口的輸出key-value類型要與Reduce接口的輸入key-value類型對應。 

輸入輸出路徑:作業在提交之前還需要在主函數中配置MapReduce作業在Hadoop集羣上的輸入輸出路徑(必須保證輸出路徑不存在),代碼爲:

FileInputFormat.setInputPaths(conf, new Path(args[0]));

FileOutputFormat.setOutputPath(conf, new Path(args[1]));


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章