spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elmer Garduno (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-5052) Shaded com.google.common.base.Optional transform() method has a wrong signature
Date Thu, 01 Jan 2015 22:03:13 GMT

    [ https://issues.apache.org/jira/browse/SPARK-5052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262673#comment-14262673
] 

Elmer Garduno commented on SPARK-5052:
--------------------------------------

Reverting to Guava 14 still generates the same error. But including com.google.common.base.Function
on the [pom|https://github.com/apache/spark/blob/master/core/pom.xml#L394] seems to generate
an assembly jar with the correct method signature:

public abstract <V extends java/lang/Object> com.google.common.base.Optional<V>
transform(com.google.common.base.Function<? super T, V>);

I'm now creating the distribution to test on the cluster.

> Shaded com.google.common.base.Optional transform() method has a wrong signature
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-5052
>                 URL: https://issues.apache.org/jira/browse/SPARK-5052
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 1.2.0
>            Reporter: Elmer Garduno
>
> PR https://github.com/apache/spark/pull/1813 shaded Guava jar file and moved Guava classes
to package org.spark-project.guava when Spark is built by Maven.
> When a user jar uses the actual com.google.common.base.Optional transform(com.google.common.base.Function);
method from Guava,  a java.lang.NoSuchMethodError: com.google.common.base.Optional.transform(Lcom/google/common/base/Function;)Lcom/google/common/base/Optional;
is thrown.
> The reason seems to be that the Optional class included on spark-assembly-1.2.0-hadoop1.0.4.jar
has an incorrect method signature that includes the shaded class as an argument:
> Expected:
> javap -classpath target/scala-2.10/googlegenomics-spark-examples-assembly-1.0.jar com.google.common.base.Optional
>   public abstract <V extends java/lang/Object> com.google.common.base.Optional<V>
transform(com.google.common.base.Function<? super T, V>);
> Found:
> javap -classpath lib/spark-assembly-1.2.0-hadoop1.0.4.jar com.google.common.base.Optional
>   public abstract <V extends java/lang/Object> com.google.common.base.Optional<V>
transform(org.spark-project.guava.common.base.Function<? super T, V>);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message