Github user mallman commented on a diff in the pull request:
https://github.com/apache/spark/pull/15125#discussion_r100641170
--- Diff:
graphx/src/main/scala/org/apache/spark/graphx/util/PeriodicGraphCheckpointer.scala
---
@@ -87,10 +88,7 @@ private[mllib] class PeriodicGraphCheckpointer[VD, ED](
override protected def persist(data: Graph[VD, ED]): Unit = {
if (data.vertices.getStorageLevel == StorageLevel.NONE) {
- data.vertices.persist()
- }
- if (data.edges.getStorageLevel == StorageLevel.NONE) {
- data.edges.persist()
+ data.persist()
--- End diff --
I enhanced the persistence tests in `PeriodicGraphCheckpointSuite` to check
that the storage level requested in the graph construction is the storage level
seen after persistence. Both this version and the original version of this
method failed that unit test.
The graph's vertex and edge rdds are somewhat peculiar in that `.cache()`
and `.persist()` do not do the same thing, unlike other RDDs. And while
`.cache()` honors the default storage level specified at graph construction
time, `.persist()` always caches with the `MEMORY_ONLY` storage level.
At any rate, getting the `PeriodicGraphCheckpointer` to honor the default
storage level specified at graph construction time requires changing these
method calls from `persist()` to `cache()`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]