Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-20343][BUILD] Add avro dependency in core POM to resolve build failure in SBT Hadoop 2.6 master on Jenkins #17642

Closed
wants to merge 1 commit into from

Conversation

HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Apr 15, 2017

What changes were proposed in this pull request?

This PR proposes to add

      <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro</artifactId>
      </dependency>

in core POM to see if it resolves the build failure as below:

[error] /home/jenkins/workspace/spark-master-test-sbt-hadoop-2.6/core/src/main/scala/org/apache/spark/serializer/GenericAvroSerializer.scala:123: value createDatumWriter is not a member of org.apache.avro.generic.GenericData
[error]     writerCache.getOrElseUpdate(schema, GenericData.get.createDatumWriter(schema))
[error]     

https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-master-test-sbt-hadoop-2.6/2770/consoleFull

How was this patch tested?

I tried many ways but I was unable to reproduce this in my local. Sean also tried the way I did but he was also unable to reproduce this.

Please refer the comments in #17477 (comment)

@HyukjinKwon
Copy link
Member Author

cc @srowen and @vanzin. I think apparently it is a similar issue with SPARK-11538. Could you check if it makes sense?

I think this is going to resolve the problem as a safe workaround.

@@ -448,7 +448,9 @@ object DockerIntegrationTests {
*/
object DependencyOverrides {
lazy val settings = Seq(
dependencyOverrides += "com.google.guava" % "guava" % "14.0.1")
dependencyOverrides ++= Set(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Seq produces an error as below:

[error] .../spark/project/SparkBuild.scala:451: No implicit for Append.Values[Set[sbt.ModuleID], Seq[sbt.ModuleID]] found,
[error]   so Seq[sbt.ModuleID] cannot be appended to Set[sbt.ModuleID]
[error]     dependencyOverrides ++= Seq(
[error]                         ^
[error] one error found

@SparkQA
Copy link

SparkQA commented Apr 15, 2017

Test build #75817 has finished for PR 17642 at commit 1ae57f2.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member Author

retest this please

@SparkQA
Copy link

SparkQA commented Apr 15, 2017

Test build #75820 has started for PR 17642 at commit 1ae57f2.

@HyukjinKwon
Copy link
Member Author

retest this please

@srowen
Copy link
Member

srowen commented Apr 15, 2017

Before doing this, can you instead try adding org.apache.avro:avro as a direct dependency of core? it looks like it should be, and, could be the reason the resolution is not as expected in this case.

@SparkQA
Copy link

SparkQA commented Apr 15, 2017

Test build #75821 has finished for PR 17642 at commit 1ae57f2.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member Author

HyukjinKwon commented Apr 15, 2017

Sure, I will. (I was just worried of a case we should revert)

@HyukjinKwon HyukjinKwon changed the title [SPARK-20343][BUILD] Force Avro 1.7.7 in sbt build to resolve build failure in SBT Hadoop 2.6 master on Jenkins [SPARK-20343][BUILD] Add Avro 1.7.7 in core POM to resolve build failure in SBT Hadoop 2.6 master on Jenkins Apr 15, 2017
@HyukjinKwon HyukjinKwon changed the title [SPARK-20343][BUILD] Add Avro 1.7.7 in core POM to resolve build failure in SBT Hadoop 2.6 master on Jenkins [SPARK-20343][BUILD] Add avro dependency in core POM to resolve build failure in SBT Hadoop 2.6 master on Jenkins Apr 15, 2017
@SparkQA
Copy link

SparkQA commented Apr 15, 2017

Test build #75823 has finished for PR 17642 at commit a983010.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and can't hurt, as it should be more correct. We won't know if it fixes that build until I merge though.

@HyukjinKwon
Copy link
Member Author

Thank you for your approval @srowen.

@srowen
Copy link
Member

srowen commented Apr 16, 2017

Merged to master

@asfgit asfgit closed this in ad935f5 Apr 16, 2017
@HyukjinKwon
Copy link
Member Author

Ugh.. it seems this try was failed..

https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-sbt-hadoop-2.6/lastBuild/console

[error] /home/jenkins/workspace/spark-master-test-sbt-hadoop-2.6/core/src/main/scala/org/apache/spark/serializer/GenericAvroSerializer.scala:123: value createDatumWriter is not a member of org.apache.avro.generic.GenericData
[error]     writerCache.getOrElseUpdate(schema, GenericData.get.createDatumWriter(schema))
[error]                                                         ^

Could I give another shot with SBT one? ( and should I revert the change back in the PR I am going to open?).

@srowen
Copy link
Member

srowen commented Apr 16, 2017

OK, it was a decent idea. I think the change can be left in place because it's technically correct anyway.

I dislike hacking the SBT build this way, but I don't have a better idea at the moment. The hack would have to be prominently documented for sure.

@HyukjinKwon
Copy link
Member Author

I see. Sure, I will. Thank you for guiding me.

@HyukjinKwon HyukjinKwon deleted the SPARK-20343 branch April 16, 2017 16:36
peter-toth pushed a commit to peter-toth/spark that referenced this pull request Oct 6, 2018
… failure in SBT Hadoop 2.6 master on Jenkins

## What changes were proposed in this pull request?

This PR proposes to add

```
      <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro</artifactId>
      </dependency>
```

in core POM to see if it resolves the build failure as below:

```
[error] /home/jenkins/workspace/spark-master-test-sbt-hadoop-2.6/core/src/main/scala/org/apache/spark/serializer/GenericAvroSerializer.scala:123: value createDatumWriter is not a member of org.apache.avro.generic.GenericData
[error]     writerCache.getOrElseUpdate(schema, GenericData.get.createDatumWriter(schema))
[error]
```

https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-master-test-sbt-hadoop-2.6/2770/consoleFull

## How was this patch tested?

I tried many ways but I was unable to reproduce this in my local. Sean also tried the way I did but he was also unable to reproduce this.

Please refer the comments in apache#17477 (comment)

Author: hyukjinkwon <[email protected]>

Closes apache#17642 from HyukjinKwon/SPARK-20343.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants