What version of Spark are you using?  Also are you sure the type of
textInput is a JavaRDD and not an RDD?

It looks like the 1.0 Java API
<http://spark.apache.org/docs/latest/api/java/org/apache/spark/api/java/JavaRDDLike.html#mapPartitionsWithIndex(org.apache.spark.api.java.function.Function2,
boolean)>does not require a class tag.


On Mon, Jun 2, 2014 at 5:59 PM, bluejoe2008 <bluejoe2...@gmail.com> wrote:

>  hi,all
>    i am programming with Spark in Java, and now i have a question:
> when i made a method call on a JavaRDD such as:
>
> textInput.mapPartitionsWithIndex(
> new Function2<Object, Iterator<String>, Iterator<Integer>>()
> {...},
> false,
> PARAM3
> );
>
> what value should i pass as the PARAM3 parameter?
> it is required as a ClassTag value, then how can i define such a value in
> Java? i really have no idea...
>
> best regards,
> bluejoe2008
>
>

Reply via email to