ALS Spark Scala 中的检查点
Checkpointing In ALS Spark Scala
我只是想问一下如何在Spark中成功使用checkpointInterval的具体细节。 ALS 代码中的注释是什么意思:https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
如果[[org.apache.spark.SparkContext]]中没有设置checkpoint目录,
* 此设置将被忽略。
- 如何设置检查点目录?我们可以为此使用任何与 hdfs 兼容的目录吗?
- 使用 setCheckpointInterval 是否是在 ALS 中实施检查点以避免堆栈溢出错误的正确方法?
编辑:
How can we set checkPoint directory? Can we use any hdfs-compatible directory for this?
您可以使用 SparkContext.setCheckpointDir
。据我所知,在本地模式下,本地和 DFS 路径都可以正常工作,但在集群上 目录必须是 HDFS 路径.
Is using setCheckpointInterval the correct way to implement checkpointing in ALS to avoid Stack Overflow errors?
应该有帮助。参见 SPARK-1006
PS: 似乎为了在 ALS 中实际执行 check-point,必须设置 checkpointDir
或 check-pointing 不会有效 [Ref. here.]
我只是想问一下如何在Spark中成功使用checkpointInterval的具体细节。 ALS 代码中的注释是什么意思:https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
如果[[org.apache.spark.SparkContext]]中没有设置checkpoint目录, * 此设置将被忽略。
- 如何设置检查点目录?我们可以为此使用任何与 hdfs 兼容的目录吗?
- 使用 setCheckpointInterval 是否是在 ALS 中实施检查点以避免堆栈溢出错误的正确方法?
编辑:
How can we set checkPoint directory? Can we use any hdfs-compatible directory for this?
您可以使用 SparkContext.setCheckpointDir
。据我所知,在本地模式下,本地和 DFS 路径都可以正常工作,但在集群上 目录必须是 HDFS 路径.
Is using setCheckpointInterval the correct way to implement checkpointing in ALS to avoid Stack Overflow errors?
应该有帮助。参见 SPARK-1006
PS: 似乎为了在 ALS 中实际执行 check-point,必须设置 checkpointDir
或 check-pointing 不会有效 [Ref. here.]