Github user jhu-chang commented on the pull request:
https://github.com/apache/spark/pull/8881#issuecomment-143121026
@jerryshao This is an extreme sample, it is not a real case, just to
demonstrate the issue of RDD.empty, you can see the dependency increasing all
the time and final stack over flow will happen (You can say it is usage error).
Do you know which kind of operations/dstreams will introduce undefined behavior
with ```None``` and what's the appearance?
```
ssc.socketTextStream("localhost", 9999).map(x => (x,1)).updateStateByKey(
(inputs : Seq[Int], oldr : Option[Int]) => {
inputs.headOption
}
).transform(rdd => {
println(rdd.toDebugString.split("\n").length)
sparkContext.makeRDD(Seq[Int]())
}).print
```
Anyway, I will change the PR to throw exception.
---
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]