【发布时间】:2017-04-08 07:36:21
【问题描述】:
我有以下代码
我调用 spark-shell 如下
./spark-shell --conf spark.cassandra.connection.host=170.99.99.134 --executor-memory 15G --executor-cores 12 --conf spark.cassandra.input.split.size_in_mb=67108864
代码
scala> val df = spark.sql("SELECT test from hello") // Billion rows in hello and test column is 1KB
df: org.apache.spark.sql.DataFrame = [test: binary]
scala> df.count
[Stage 0:> (0 + 2) / 13] // I dont know what these numbers mean precisely.
如果我按如下方式调用 spark-shell
./spark-shell --conf spark.cassandra.connection.host=170.99.99.134
代码
val df = spark.sql("SELECT test from hello") // This has about billion rows
scala> df.count
[Stage 0:=> (686 + 2) / 24686] // What are these numbers precisely?
这两个版本都不起作用 Spark 一直在运行,我已经等待了超过 15 分钟但没有任何响应。关于可能出现的问题以及如何解决此问题的任何想法?
我使用的是 Spark 2.0.2 和 spark-cassandra-connector_2.11-2.0.0-M3.jar
【问题讨论】:
-
如果有十亿行,您可能不得不等待 2 或 3 个小时才能得到大致的答案。
标签: apache-spark apache-spark-sql spark-cassandra-connector