怎樣將MapReduce程式中Reduce的的結果輸出到HDFS上的csv檔案中?
按照下面的方式,HDFS上mean.csv創建的是一個檔案夾,而不是一個檔案
Path outputPath = new Path("hdfs://Master:9000/mean.csv");
if (fs.exists(outputPath)) {
fs.delete(outputPath, true);
}
FileOutputFormat.setOutputPath(job, outputPath);
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/11716.html
標籤:分布式計算/Hadoop
