Spark 的 GraphX:为什么我在坚持使用 RDD 后仍然得到 "Joining / Diffing two VertexPartitions with different indexes is slow"

Spark's GraphX: Why am I getting "Joining / Diffing two VertexPartitions with different indexes is slow" even after having persisted involved RDDs

我是运行以下使用 GraphX 的片段:

val g = Graph(
      v.persist(StorageLevel.MEMORY_AND_DISK_SER),
      e.persist(StorageLevel.MEMORY_AND_DISK_SER),
      1,
      StorageLevel.MEMORY_AND_DISK_SER,
      StorageLevel.MEMORY_AND_DISK_SER)

val pageRankResult = g.pageRank(0.0001)

我在运行时收到警告:

我阅读了主题 Get Joining two VertexPartitions with different indexes is slow in Spark and GraphX by unpersist graph 的答案,但在我的情况下,一切都被保留了。

我做错了什么?

您不得使用 _SER 后缀存储级别来利用 VertexPartitions 的快速 zip 连接。

MEMORY_AND_DISK_SER 级别切换到 MEMORY_AND_DISK 可能会让您获得更多的计算时间(并且您将不会再看到警告)但是缓存数据将花费更多 space。