PS you will probably have to cast to get the type RDD[Int]: https://issues.apache.org/jira/browse/SPARK-2331
On Tue, Jan 13, 2015 at 5:50 AM, Xuelin Cao <xuelincao2...@gmail.com> wrote: > > > Hi, > > I'd like to create a transform function, that convert RDD[String] to > RDD[Int] > > Occasionally, the input RDD could be an empty RDD. I just want to > directly create an empty RDD[Int] if the input RDD is empty. And, I don't > want to return None as the result. > > Is there an easy way to do that? > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org