Spark RDD count

- 1 min

count

返回RDD中的item数

注:这是一个action操作,会触发实际计算

函数原型:

def count(): Long

例子:


val c = sc.parallelize(List("Gnu", "Cat", "Rat", "Dog"), 2)
c.count
res2: Long = 4
comments powered by Disqus
rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora