Reputation: 1327
I get following error when I run a spark job with Druid Tranquility.
java.lang.NoSuchFieldError: WRITE_DURATIONS_AS_TIMESTAMPS
Druid Tranquility uses higher version of jackson-databind (2.6.1) than what is bundled in spark. I'm using latest stable versions of Druid Tranquility(0.6.4) and Spark(1.5.2).
How to resolve this?
Upvotes: 2
Views: 915
Reputation: 1
add --jars hibernate-validator-5.1.3.Final.jar in the spark-submit, this may help
Upvotes: 0
Reputation: 1327
Gian has given a pull request https://github.com/druid-io/tranquility/pull/81 with downgrade Jackson to match the version in Druid. And announced that next version of tranquility will have it.
Upvotes: 0
Reputation: 37019
You can force Spark to use classes supplied with the job using spark.driver.extraClassPath
and spark.executor.extraClassPath
configuration options, which will prepend anything you specify there to the classpath of Spark driver or Spark executor respectively.
You can try to compile Spark against newer version of jackson-databind
. To do that, update fasterxml.jackson.version
configuration parameter in Spark's pom.xml file, then follow the Spark build instructions. It's not guaranteed that it will compile successfully though.
Excluding jackson from your Tranquility application might work too, just make sure to exclude the following artifacts:
com.fasterxml.jackson.core:jackson-core com.fasterxml.jackson.core:jackson-annotations com.fasterxml.jackson.dataformat:jackson-dataformat-smile com.fasterxml.jackson.datatype:jackson-datatype-joda com.fasterxml.jackson.core:jackson-databind
You can verify that these artifacts are excluded by running sbt dependency-tree
(using this plug-in).
I'd first try (3) then (2) and (1).
Upvotes: 2