File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
mllib/src/main/scala/org/apache/spark/mllib/impl Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ import org.apache.spark.storage.StorageLevel
5151 * - This class removes checkpoint files once later Datasets have been checkpointed.
5252 * However, references to the older Datasets will still return isCheckpointed = true.
5353 *
54- * @param checkpointInterval Datasets will be checkpointed at this interval
54+ * @param checkpointInterval Datasets will be checkpointed at this interval.
55+ * If this interval was set as -1, then checkpointing will be disabled.
5556 * @param sc SparkContext for the Datasets given to this checkpointer
5657 * @tparam T Dataset type, such as RDD[Double]
5758 */
@@ -88,7 +89,8 @@ private[mllib] abstract class PeriodicCheckpointer[T](
8889 updateCount += 1
8990
9091 // Handle checkpointing (after persisting)
91- if ((updateCount % checkpointInterval) == 0 && sc.getCheckpointDir.nonEmpty) {
92+ if (checkpointInterval != - 1 && (updateCount % checkpointInterval) == 0
93+ && sc.getCheckpointDir.nonEmpty) {
9294 // Add new checkpoint before removing old checkpoints.
9395 checkpoint(newData)
9496 checkpointQueue.enqueue(newData)
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ import org.apache.spark.storage.StorageLevel
6969 * // checkpointed: graph4
7070 * }}}
7171 *
72- * @param checkpointInterval Graphs will be checkpointed at this interval
72+ * @param checkpointInterval Graphs will be checkpointed at this interval.
73+ * If this interval was set as -1, then checkpointing will be disabled.
7374 * @tparam VD Vertex descriptor type
7475 * @tparam ED Edge descriptor type
7576 *
You can’t perform that action at this time.
0 commit comments