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

Guava StopWatch use causing dependency issue #222

Open
ehsanhaq opened this issue Jun 12, 2018 · 0 comments
Open

Guava StopWatch use causing dependency issue #222

ehsanhaq opened this issue Jun 12, 2018 · 0 comments

Comments

@ehsanhaq
Copy link

I am trying to use magellan in my project which require guava 20. Magellan is using guava 14.0.1. Specifically I am having the following exception.

java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.()V from class magellan.mapreduce.ShapeInputFormat
at magellan.mapreduce.ShapeInputFormat.computeSplits(ShapeInputFormat.scala:50)
at magellan.mapreduce.ShapeInputFormat.getSplits(ShapeInputFormat.scala:43)
at org.apache.spark.rdd.NewHadoopRDD.getPartitions(NewHadoopRDD.scala:125)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:252)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:250)
at scala.Option.getOrElse(Option.scala:121)

The root cause is that the Stopwatch constructor is deprecated in the guava 15 onwards, which is used in ShapeInputFormat.

Bumping the guava version is not a solution either because it will have conflict with the hadoop 2.2.

I have created a PR #221 to address the issue by using apache commons lang3 StopWatch class. One could also just use System.getTime as well.

@ehsanhaq ehsanhaq changed the title Guava dependency issue Guava StopWatch use causing dependency issue Jun 12, 2018
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

No branches or pull requests

1 participant