Version conflict in jackson with Cloudera Hadoop
Related to #1669 there is still a version conflict of jackson with CDH5.x. I only got Druid working with Hadoop by changing the jackson version back to 2.3.5. Is there a specific requirement for a new jackson version in the code?
There are various Jackson fixes that go in over time, so rolling back could break in very silent ways, especially dropping from a 2.4 to a 2.3
Minimum supported versions of dependency libraries are not currently a feature of Druid.
When including Druid as a library-like feature in another framework, it is probably best to try and isolate classloader issues if possible, and force library versions only if the former is not feasible.
TLDR: using libraries other than the ones suggested by the druid POM is not supported. (might work fine, might break everything, might only break things you don't use)
Thanks for your feedback, I think it makes sense to take the "shading route" as proposed in different ticket. We should leave this ticket open nevertheless, so hopefully we can close it once shading is done :)
@kupferk I have been using a simpler workaround described in this PR: #2815.
You can try it with the following configuration in your task if you want to continue using the Vanilla version of Druid:
"tuningConfig" : {
...
"jobProperties" : {
"mapreduce.job.user.classpath.first": "true"
},
...
}
@slaunay Hi,I use this way to reslove the issue : java.lang.VerifyError: class com.fasterxml.jackson.datatype.guava.deser.HostAndPortDeserializer overrides final method deserialize.(Lcom/fasterxml/jackson/core/JsonParser;Lcom/fasterxml/jackson/databind/DeserializationContext;)Ljava/lang/Object;
but it comes a new issue :
java.lang.NoSuchMethodError: org.apache.hadoop.yarn.webapp.util.WebAppUtils.getProxyHostsAndPortsForAmFilter(Lorg/apache/hadoop/conf/Configuration;)Ljava/util/List; at org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer.initFilter(AmFilterInitializer.java:40) ~[hadoop-yarn-server-web-proxy-2.6.0-cdh5.7.1.jar:?] at org.apache.hadoop.http.HttpServer2.initializeWebServer(HttpServer2.java:384) ~[hadoop-common-2.3.0.jar:?] at org.apache.hadoop.http.HttpServer2.<init>(HttpServer2.java:342) ~[hadoop-common-2.3.0.jar:?] at org.apache.hadoop.http.HttpServer2.<init>(HttpServer2.java:102) ~[hadoop-common-2.3.0.jar:?] at org.apache.hadoop.http.HttpServer2$Builder.build(HttpServer2.java:290) ~[hadoop-common-2.3.0.jar:?] at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:234) ~[hadoop-yarn-common-2.3.0.jar:?] at org.apache.hadoop.mapreduce.v2.app.client.MRClientService.serviceStart(MRClientService.java:136) ~[hadoop-mapreduce-client-app-2.3.0.jar:?] at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) ~[hadoop-common-2.3.0.jar:?] at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceStart(MRAppMaster.java:1064) ~[hadoop-mapreduce-client-app-2.3.0.jar:?] at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) ~[hadoop-common-2.3.0.jar:?] at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$1.run(MRAppMaster.java:1457) ~[hadoop-mapreduce-client-app-2.3.0.jar:?] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_60] at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_60] at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) ~[hadoop-common-2.3.0.jar:?] at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1453) ~[hadoop-mapreduce-client-app-2.3.0.jar:?] at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1386) [hadoop-mapreduce-client-app-2.3.0.jar:?] 2016-07-19T15:51:26,757 INFO [main] org.apache.hadoop.util.ExitUtil - Exiting with status 1
,So what should I do ?
@anonymous-shy We recently updated this doc with tips for getting different Hadoop versions to work: https://github.com/druid-io/druid/blob/master/docs/content/operations/other-hadoop.md
You might need to download a version of Hadoop dependencies that more closely matches your distribution. Or you could you try setting mapreduce.job.classpath to true instead of setting mapreduce.job.user.classpath.first. With more recent hadoop distributions this seems to work better.
@anonymous-shy it looks like you are using Hadoop 2.6.0 from Cloudera and try to submit a job from Druid compiled against Hadoop 2.3.0, the fix I mentioned is when you use the same or very close version of Hadoop from different distributions (vanilla vs CDH).
I would take a look at the documentation in order to change the Hadoop version Druid pulls: http://druid.io/docs/0.9.1.1/operations/other-hadoop.html
As well as the --no-default-hadoop from 47894c4 recent commit.
@anonymous-shy Adding onto what @gianm says, I would suggest using pull-deps (http://druid.io/docs/latest/operations/pull-deps.html) and looking at the hadoopDependencyCoordinates option in the indexing task, in combination with mapreduce.job.classpath=true or mapreduce.job.user.classpath.first=true.
For example, with CDH5.x which uses hadoop 2.6.0:
"hadoopDependencyCoordinates": ["org.apache.hadoop:hadoop-client:2.6.0"]
Thx guys! @gianm @slaunay @jon-wei I rebulid Druid with hadoop2.6.0 and config mapreduce.job.classpath=true ,it successed.
Awesome! Good to know you got it working.
I'm going to close this ticket, since I think that the approach of (1) pull in your specific matching Hadoop version, and (2) set mapreduce.job.classpath=true has worked for the cases we saw so far. We'll be updating our docs in 0.9.2 to recommend that approach.