4
sc.addPyFile('/path/to/my_file.egg')
但是,如果我做了一些变化,重建我的蛋文件添加一个鸡蛋文件pyspark上下文。我无法再添加它。星火说,该文件已经存在,我不能将其添加again.Here是堆栈跟踪
org.apache.spark.SparkException: File /tmp/spark-ddfc2b0f-2897-4fac-8cf3-d7ccee04700c/userFiles-44152f58-835a-4d9f-acd6-f841468fa2cb/my_file.egg exists and does not match contents of file:///path/to/my_file.egg
at org.apache.spark.util.Utils$.copyFile(Utils.scala:489)
at org.apache.spark.util.Utils$.doFetchFile(Utils.scala:595)
at org.apache.spark.util.Utils$.fetchFile(Utils.scala:394)
at org.apache.spark.SparkContext.addFile(SparkContext.scala:1409)
有没有办法告诉火花来覆盖它?
感谢,
我也遇到过这个问题。它看起来像版本2中的sc.clearFiles()被[删除](https://issues.apache.org/jira/browse/SPARK-17525)。 –
不适用于我。我正在使用Spark 1.6 – Rags