Closed yeenow123 closed 4 years ago
Created this pull request, okio version in the influxdb dependency conflicted with the Spark okio version
Hi @yeenow123, I couldn't reproduce this error with Spark-2.2.0. I checked the spark-deps-hadoop-2.7 for spark branch-2.2 but this branch doesn't show any dependency for okhttp
and okio
jar files. branch-2.3 and branch-2.4 listed the dependency for okhttp
and okio
jar files and versions given are compatible with InfluxDBOutputReporter
. It looks like there is some dependency in your spark application jar which is bringing the older version of okhttp
and okio
jar files. Could you please check the dependency tree for your spark application and identify that jar file? Please also check the version of okhttp
and okio
jar files in that dependency tree. This will help us to narrow down the issue and applying the fix. Thanks.
I am also seeing this error with spark 2.3
I am bringing in 1.14
okio via --repositories
:
[info] | | +-org.influxdb:influxdb-java:2.14
[info] | | +-com.squareup.okhttp3:logging-interceptor:3.11.0
[info] | | | +-com.squareup.okhttp3:okhttp:3.10.0 (evicted by: 3.11.0)
[info] | | | +-com.squareup.okhttp3:okhttp:3.11.0
[info] | | | +-com.squareup.okio:okio:1.14.0
[info] | | |
[info] | | +-com.squareup.okhttp3:okhttp:3.10.0 (evicted by: 3.11.0)
[info] | | +-com.squareup.okhttp3:okhttp:3.11.0
[info] | | | +-com.squareup.okio:okio:1.14.0
[info] | | |
[info] | | +-com.squareup.retrofit2:converter-moshi:2.4.0
[info] | | | +-com.squareup.moshi:moshi:1.5.0
[info] | | | | +-com.squareup.okio:okio:1.13.0 (evicted by: 1.14.0)
[info] | | | | +-com.squareup.okio:okio:1.14.0
[info] | | | |
[info] | | | +-com.squareup.retrofit2:retrofit:2.4.0
[info] | | | +-com.squareup.okhttp3:okhttp:3.10.0 (evicted by: 3.11.0)
[info] | | | +-com.squareup.okhttp3:okhttp:3.11.0
[info] | | | +-com.squareup.okio:okio:1.14.0
[info] | | |
[info] | | +-com.squareup.retrofit2:retrofit:2.4.0
[info] | | | +-com.squareup.okhttp3:okhttp:3.10.0 (evicted by: 3.11.0)
[info] | | | +-com.squareup.okhttp3:okhttp:3.11.0
[info] | | | +-com.squareup.okio:okio:1.14.0
[info] | | |
[info] | | +-org.msgpack:msgpack-core:0.8.16
Nothing else on my dependency list pulls in any square/okio/okhttp.
It appears this only happens in cluster mode, with client mode I do not get the error running an identical spark job.
The cluster mode submit is including this jar on the system classpath:
/usr/hdp/current/hadoop-hdfs-client/lib/okio-1.4.0.jar
EDIT: correction, in client mode it appears the driver does not receive the jar in question, but the executors still do.
in client mode, your driver is the spark submit process...
it looks like /usr/hdp/current/hadoop-hdfs-client/lib/okio-1.4.0.jar
is injected by YARN?
Hey @felixcheung and @yeenow123, this issue might also be caused by the relocations in the POM file -- I had a similar "class not found issue" when testing a new OutputReporter that I'll commit soon, see this PR for how I fixed it the issue: https://github.com/uber-common/jvm-profiler/pull/51
Actually in my case, I fixed it. I used maven and change the version of influxdb: Try this:
Thanks hanhtd2 for the information! I updated influxdb-java to 2.7 in pom.xml just now.
When using the InfluxDB reporter on Spark 2.2.0 with Ambari HDP, I'm getting the following error.
I ran
mvn -P influxdb clean package
to build the jar.Using the following command (with classname / host replaced):
spark-submit --master yarn-cluster --class com.output.spark.FilteringJob --conf spark.jars=hdfs:///user/smorgasborg/lib/jvm-profiler-1.0.0.jar --conf spark.executor.extraJavaOptions=-javaagent:jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.InfluxDBOutputReporter,tag=profiling,sampleInterval=1000,influxdb.host={{HOST HERE}},influxdb.port=8086,influxdb.database=test_profiling --conf spark.yarn.am.waitTime=200s spark-output-assembly.jar