Spark jobs finishes but application takes time to close

前端 未结 3 514
难免孤独
难免孤独 2020-12-10 13:45

Running spark job using scala, as expected all jobs are finishing up on time , but somehow some INFO logs are printed for 20-25 minutes before job stops.

Posting few

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 14:18

    I had the same kind of problem when writing files to S3. I use the spark 2.0 version, just to give you a updated code for the verified answer

    In Spark 2.0 you can use,

    val spark = SparkSession.builder().master("local[*]").appName("App_name").getOrCreate()
    
    spark.conf.set("spark.hadoop.mapred.output.committer.class","com.appsflyer.spark.DirectOutputCommitter")
    spark.conf.set("mapreduce.fileoutputcommitter.marksuccessfuljobs", "false")
    

    This solved my problem of job getting struck

提交回复
热议问题