Created
September 6, 2020 20:56
-
-
Save vzayaz/1609bc150d47a9b67e0d28ba77981539 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pseudo_rdd_count(rdd: RDD[T]): Long = { | |
val iter = rdd.compute | |
var result = 0 | |
while (iter.hasNext) result += 1 | |
result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment