Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/6632#discussion_r32869380
--- Diff:
external/kafka/src/test/scala/org/apache/spark/streaming/kafka/KafkaRDDSuite.scala
---
@@ -68,6 +68,21 @@ class KafkaRDDSuite extends SparkFunSuite with
BeforeAndAfterAll {
val received = rdd.map(_._2).collect.toSet
assert(received === messages)
+
+ // size-related method optimizations return sane results
+ assert(rdd.count === messages.size)
+ assert(rdd.countApprox(0).getFinalValue.mean === messages.size)
+ assert(! rdd.isEmpty)
+ assert(rdd.take(1).size === 1)
+ assert(messages(rdd.take(1).head._2))
--- End diff --
What does this check? Shouldnt it check that `rdd.take(1) === "the" //
whatever is expected`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]