You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
ehsanhaq
changed the title
Guava dependency issue
Guava StopWatch use causing dependency issue
Jun 12, 2018
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.
The text was updated successfully, but these errors were encountered: