我正在尝试合并一个目录中的所有spark输出零件文件,并在Scala中创建一个文件。下面是我的代码:import org.apache.spark.sql.functions.regexp_extractmerge(srcPath: String, dstPath: String): Unit = {
val hadoopConfig = new Configuratio
我想将一个星火作业生成的多个文件合并到一个文件中。通常我会做这样的事情:val hdfs = FileSystem.get(hadoopConfig)FileUtil.copyMerge(hdfs, new Path(srcPath), hdfs, new Path(dstPath), deleteSrcFiles, ha