1、報錯:ERROR storage.DiskBlockObjectWriter: Uncaught exception while reverting partial writes to file /hadoop/application_1415632483774_448143/spark-local-20141127115224-9ca8/04/shuffle_1_1562_27
java.io.FileNotFoundException: /hadoop/application_1415632483774_448143/spark-local-20141127115224-9ca8/04/shuffle_1_1562_27 (No such file or directory)
表面上看是因為shuffle沒有地方寫了,如果后面的stack是local space 的問題,那么清一下磁盤就好了。上面這種問題,是因為一個excutor給分配的內存不夠,此時,減少excutor-core的數量,加大excutor-memory的值應該就沒有問題。
2、報錯:ERROR executor.CoarseGrainedExecutorBackend: Driver Disassociated [akka.tcp://sparkExecutor@pc-jfqdfx31:48586] -> [akka.tcp://sparkDriver@pc-jfqdfx30:41656] disassociated! Shutting down.
15/07/23 10:50:56 ERROR executor.CoarseGrainedExecutorBackend: RECEIVED SIGNAL 15: SIGTERM
這個錯誤比較隱晦,從信息上看來不知道是什么問題,但是歸根結底還是內存的問題,有兩個方法可以解決這個錯誤,一是,如上面所說,加大excutor-memory的值,減少executor-cores的數量,問題可以解決。二是,加大executor.overhead的值,但是這樣其實並沒有解決掉根本的問題。所以如果集群的資源是支持的話,就用1的辦法吧。
另外,這個錯誤也出現在partitionBy(new HashPartition(partiton-num))時,如果partiton-num太大或者太小的時候會報這種錯誤,說白了也是內存的原因,不過這個時候增加內存和overhead沒有什么用,得去調整這個partiton-num的值。