Spark: java.io.IOException: No space left on device

前端 未结 3 846
野的像风
野的像风 2020-12-31 16:06

Now I am learning how to use spark.I have a piece of code which can invert a matrix and it works when the order of the matrix is small like 100.But when the order of the mat

相关标签:
3条回答
  • 2020-12-31 16:23

    This is because Spark create some temp shuffle files under /tmp directory of you local system.You can avoid this issue by setting below properties in your spark conf files.

    Set this property in spark-env.sh.

    SPARK_JAVA_OPTS+=" -Dspark.local.dir=/mnt/spark,/mnt2/spark -Dhadoop.tmp.dir=/mnt/ephemeral-hdfs"
    
    export SPARK_JAVA_OPTS
    
    0 讨论(0)
  • 2020-12-31 16:23

    According to the Error message you have provided, your situation is no disk space left on your hard-drive. However, it's not caused by RDD persistency, but shuffle which you implicitly required when calling reduce.

    Therefore, you should clear your drive and make more spaces for your tmp folder

    0 讨论(0)
  • As a complementary, to specify default folder for you shuffle tmp files, you can add below line to $SPARK_HOME/conf/spark-defaults.conf:

    spark.local.dir /mnt/nvme/local-dir,/mnt/nvme/local-dir2

    0 讨论(0)
提交回复
热议问题