Spark and Influx: OKIO conflict

末鹿安然 提交于 2019-12-06 07:34:49

In my case "using Apache Spark 1.6.3 with Hadoop HDP distribution"

  1. I run spark-shell and see on web UI what jar are used
  2. Search okhttp jar tf /usr/hdp/current/spark-client/lib/spark-assembly-1.6.3.2.6.3.0-235-hadoop2.7.3.2.6.3.0-235.jar | grep okhttp
  3. Extract okhttp version jar xf /usr/hdp/current/spark-client/lib/spark-assembly-1.6.3.2.6.3.0-235-hadoop2.7.3.2.6.3.0-235.jar META-INF/maven/com.squareup.okhttp/okhttp/pom.xml

=> version 2.4.0

No idea who is provided this version.

Sergey Akopyan

I had the same problem on spark 2.1.0.

Solution: I have downgraded the influxdb-java dependency from version 2.11 (2.12 has empty child dependency and we have problems at fat jar assembling) to 2.1.

Influxdb-java 2.1 have a different API, but it works on spark-submit applications.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!