默认情况下,spark(2.4.4)使用MapReduce.fileoutputcommitter.algorithm.version 1。我正在尝试将其更改为版本2。spark UI和sparkCtx._conf.getAll()
显示了版本2,但pyspark仍然使用版本1在S3中写入数据(正在创建临时文件夹)。我试过这些东西
spark.hadoop.mapreduce.fileoutputcommitter.algorithm.version 2
df.write.option("mapreduce.fileoutputcommitter.algorithm.version", "2")
首先,v1和v2算法都使用临时文件。如MAPREDUCE-6336中所述
因此,请确保您实际看到的是与v1而不是v2相对应的更改
另外
spark.hadoop
选项适用于上下文而不是特定的写操作,因此您的第三次尝试应该根本不起作用其余的应该是等效的(第二个,如果在
SparkContext
启动之前设置)相关问题 更多 >
编程相关推荐