|
@@ -33,14 +33,6 @@ public class I2IDSSMPredict {
|
|
|
String file = argMap.get("path");
|
|
|
int repartition = NumberUtils.toInt(argMap.get("repartition"), 64);
|
|
|
|
|
|
- // 将处理后的数据写入新的文件,使用Gzip压缩
|
|
|
- String outputPath = "hdfs:/dyp/vec2";
|
|
|
- try {
|
|
|
- hdfsService.deleteOnExit(outputPath);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("deleteOnExit error outputPath {}", outputPath, e);
|
|
|
- }
|
|
|
-
|
|
|
// 加载模型
|
|
|
SparkSession spark = SparkSession.builder()
|
|
|
.appName("I2IDSSMInfer")
|
|
@@ -124,7 +116,13 @@ public class I2IDSSMPredict {
|
|
|
}
|
|
|
};
|
|
|
});
|
|
|
-
|
|
|
+ // 将处理后的数据写入新的文件,使用Gzip压缩
|
|
|
+ String outputPath = "hdfs:/dyp/vec2";
|
|
|
+ try {
|
|
|
+ hdfsService.deleteIfExist(outputPath);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("deleteOnExit error outputPath {}", outputPath, e);
|
|
|
+ }
|
|
|
processedRdd.coalesce(repartition).saveAsTextFile(outputPath, GzipCodec.class);
|
|
|
}
|
|
|
|