|
@@ -39,6 +39,7 @@ public class I2IDSSMService {
|
|
|
CMDService cmd = new CMDService();
|
|
|
Map<String, String> argMap = cmd.parse(args);
|
|
|
String file = argMap.get("path");
|
|
|
+ int repartition = NumberUtils.toInt(argMap.get("repartition"), 64);
|
|
|
|
|
|
// 加载模型
|
|
|
String bucketName = "art-recommend";
|
|
@@ -73,7 +74,7 @@ public class I2IDSSMService {
|
|
|
|
|
|
// 将处理后的数据写入新的文件,使用Gzip压缩
|
|
|
String outputPath = "hdfs:/dyp/vec2";
|
|
|
- processedRdd.saveAsTextFile(outputPath, GzipCodec.class);
|
|
|
+ processedRdd.coalesce(repartition).saveAsTextFile(outputPath, GzipCodec.class);
|
|
|
}
|
|
|
|
|
|
private String processLine(String line, Predictor predictor) {
|