You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Deep Pradhan <pr...@gmail.com> on 2014/11/14 07:21:40 UTC

toLocalIterator in Spark 1.0.0

Hi,

I am using Spark 1.0.0 and Scala 2.10.3.

I want to use toLocalIterator in a code but the spark shell tells

*not found: value toLocalIterator*

I also did import org.apache.spark.rdd but even after this the shell tells

*object toLocalIterator is not a member of package org.apache.spark.rdd*

Can anyone help me in this?

Thank You

Re: toLocalIterator in Spark 1.0.0

Posted by Andrew Ash <an...@andrewash.com>.
Deep,

toLocalIterator is a method on the RDD class.  So try this instead:

rdd.toLocalIterator()



On Fri, Nov 14, 2014 at 12:21 AM, Deep Pradhan <pr...@gmail.com>
wrote:

> val iter = toLocalIterator (rdd)
>
> This is what I am doing and it says error: not found
>
> On Fri, Nov 14, 2014 at 12:34 PM, Patrick Wendell <pw...@gmail.com>
> wrote:
>
>> It looks like you are trying to directly import the toLocalIterator
>> function. You can't import functions, it should just appear as a
>> method of an existing RDD if you have one.
>>
>> - Patrick
>>
>> On Thu, Nov 13, 2014 at 10:21 PM, Deep Pradhan
>> <pr...@gmail.com> wrote:
>> > Hi,
>> >
>> > I am using Spark 1.0.0 and Scala 2.10.3.
>> >
>> > I want to use toLocalIterator in a code but the spark shell tells
>> >
>> > not found: value toLocalIterator
>> >
>> > I also did import org.apache.spark.rdd but even after this the shell
>> tells
>> >
>> > object toLocalIterator is not a member of package org.apache.spark.rdd
>> >
>> > Can anyone help me in this?
>> >
>> > Thank You
>>
>
>

Re: toLocalIterator in Spark 1.0.0

Posted by Deep Pradhan <pr...@gmail.com>.
val iter = toLocalIterator (rdd)

This is what I am doing and it says error: not found

On Fri, Nov 14, 2014 at 12:34 PM, Patrick Wendell <pw...@gmail.com>
wrote:

> It looks like you are trying to directly import the toLocalIterator
> function. You can't import functions, it should just appear as a
> method of an existing RDD if you have one.
>
> - Patrick
>
> On Thu, Nov 13, 2014 at 10:21 PM, Deep Pradhan
> <pr...@gmail.com> wrote:
> > Hi,
> >
> > I am using Spark 1.0.0 and Scala 2.10.3.
> >
> > I want to use toLocalIterator in a code but the spark shell tells
> >
> > not found: value toLocalIterator
> >
> > I also did import org.apache.spark.rdd but even after this the shell
> tells
> >
> > object toLocalIterator is not a member of package org.apache.spark.rdd
> >
> > Can anyone help me in this?
> >
> > Thank You
>

Re: toLocalIterator in Spark 1.0.0

Posted by Patrick Wendell <pw...@gmail.com>.
It looks like you are trying to directly import the toLocalIterator
function. You can't import functions, it should just appear as a
method of an existing RDD if you have one.

- Patrick

On Thu, Nov 13, 2014 at 10:21 PM, Deep Pradhan
<pr...@gmail.com> wrote:
> Hi,
>
> I am using Spark 1.0.0 and Scala 2.10.3.
>
> I want to use toLocalIterator in a code but the spark shell tells
>
> not found: value toLocalIterator
>
> I also did import org.apache.spark.rdd but even after this the shell tells
>
> object toLocalIterator is not a member of package org.apache.spark.rdd
>
> Can anyone help me in this?
>
> Thank You

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org