如何为 Spark 的 Matrix 数据类型设置底层缓存 RDD 的名称

How to set a name for underlying cached RDD for Spark's Matrix data type

当将 BlockMatrix, I call .cache() on it (and then force eval it), but how can I 缓存到它以便于在 Spark 的 UI 控制台上识别时?

您可以 setNameblocks:

matrix.blocks.setName("foo")