Got it, thanks!

On Tue, Jan 13, 2015 at 2:00 PM, Justin Yip <[email protected]> wrote:

> Xuelin,
>
> There is a function called emtpyRDD under spark context
> <http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.SparkContext>
>  which
> serves this purpose.
>
> Justin
>
> On Mon, Jan 12, 2015 at 9:50 PM, Xuelin Cao <[email protected]>
> 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?
>>
>>
>>
>

Reply via email to