Spark的GraphX:为什么即使在坚持涉及RDD之后,我仍然"Joining / Diffing two VertexPartitions with different indexes is sl



我正在使用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)

我在运行时收到警告:

  • [WARN - org.apache.spark.graphx.impl.ShippableVertexPartitionOps] - Diffing two VertexPartitions with different indexes is slow.

  • [WARN - org.apache.spark.graphx.impl.ShippableVertexPartitionOps] - Joining two VertexPartitions with different indexes is slow.

我阅读了主题的答案 通过unpersist graph在Spark和GraphX中加入具有不同索引的两个顶点分区很慢,但就我而言,一切都被持久化了。

我做错了什么?

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

MEMORY_AND_DISK_SER级别切换到MEMORY_AND_DISK级别可能会增加计算时间(并且您将不再看到警告(,但缓存的数据将占用更多空间。

最新更新