What's your actual code? that can't compile since groupBy would return
a JavaPairRDD.

I tried compiling that (after changing to void type) with Java 7 and
Java 8 (meaning, not just the JDK but compiling for the language level
too) and both worked.

On Mon, Mar 2, 2015 at 10:03 PM, btiernay <btier...@hotmail.com> wrote:
> The following method demonstrates the issue:
>
>   private static Tuple2<String, String> group(JavaPairRDD<String, String>
> rdd, Function<Tuple2<String, String>, String> f) {
>     return rdd.groupBy(f);
>   }
>
> I get the following compilation error using Spark 1.1.1 and Java 8u31:
>
> The method groupBy(Function<Tuple2<String,String>,String>) is ambiguous
> for the type JavaPairRDD<String,String>
>
> I believe it is ambiguous because both JavaPairRDD and JavaRDDLike offer the
> same method.
>
> Has anyone encountered this before? Is there a solution?
>
> Thanks!
>
>
>
> --
> View this message in context: 
> http://apache-spark-user-list.1001560.n3.nabble.com/JavaRDD-method-ambiguous-after-upgrading-to-Java-8-tp21882.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org
>

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

Reply via email to