为什么 RDDs 没有在 spark UI/storage 页面中列出
Why RDDs is not listed in the spark UI/storage page
我是 Spark 的新手。
我在我的 mac 上安装了 Spark 1.3.1,并使用 spark-shell 来玩它,这是我所做的:
scala> val lfile = sc.textFile("/Users/jackzhang/Downloads/ProdPart.txt");
scala> val count = lfile.filter(line => line.contains("XYZ_COW"))
scala> count.count
输出
res27: Long = 1
我也试过运行
scala> count.cache
也没用。
我的理解是我应该把count
RDD具体化在内存(或磁盘)中,因为我运行是count.count
,而count
是一个Action
根据 Spark Documentation, and I should be able to see it from http://localhost:4040/storage,我错了吗?
正如 Makoton 提到的,https://forums.databricks.com/questions/117/why-is-my-rdd-not-showing-up-in-the-storage-tab-of.html 回答了这个问题。
要在 "Storage" 选项卡中查看 RDD,这是我在阅读 post 之后所做的:
scala> val cacheCount = count.cache
scala> cacheCount.collect
之后,我可以在选项卡中看到 RDD,但是,我也尝试通过 运行:
更新 RDD 名称
scala> cacheCount.setName("Test")
scala> cacheCount.cache
scala> cacheCount.collect
RDD 的名称未更新。这意味着论坛中 post 的部分答案不正确。
我是 Spark 的新手。
我在我的 mac 上安装了 Spark 1.3.1,并使用 spark-shell 来玩它,这是我所做的:
scala> val lfile = sc.textFile("/Users/jackzhang/Downloads/ProdPart.txt");
scala> val count = lfile.filter(line => line.contains("XYZ_COW"))
scala> count.count
输出
res27: Long = 1
我也试过运行
scala> count.cache
也没用。
我的理解是我应该把count
RDD具体化在内存(或磁盘)中,因为我运行是count.count
,而count
是一个Action
根据 Spark Documentation, and I should be able to see it from http://localhost:4040/storage,我错了吗?
正如 Makoton 提到的,https://forums.databricks.com/questions/117/why-is-my-rdd-not-showing-up-in-the-storage-tab-of.html 回答了这个问题。
要在 "Storage" 选项卡中查看 RDD,这是我在阅读 post 之后所做的:
scala> val cacheCount = count.cache
scala> cacheCount.collect
之后,我可以在选项卡中看到 RDD,但是,我也尝试通过 运行:
更新 RDD 名称scala> cacheCount.setName("Test")
scala> cacheCount.cache
scala> cacheCount.collect
RDD 的名称未更新。这意味着论坛中 post 的部分答案不正确。