spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <so...@cloudera.com>
Subject Re: How to create an empty RDD with a given type?
Date Tue, 13 Jan 2015 09:59:41 GMT
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 <xuelincao2014@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-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message