Hadoop indexing task failing on 0.9.2-rc1 -- NoSuchMethodError: com.google.inject.util.Types...

I’m trying to batch index some data using 0.9.2-rc1 and running into the following exception. I pulled this stack trace from a yarn worker. Running the same indexing job on 0.9.1.1 is working.

I setup the cluster by compiling druid 0.9.2-rc1 and dropping it into the imply 0.9.1.1 distribution.

Any suggestions will be appreciated.

2016-10-26 13:52:57,360 ERROR [main] org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.NoSuchMethodError: com.google.inject.util.Types.collectionOf(Ljava/lang/reflect/Type;)Ljava/lang/reflect/ParameterizedType;

at com.google.inject.multibindings.Multibinder.collectionOfProvidersOf(Multibinder.java:202)

at com.google.inject.multibindings.Multibinder$RealMultibinder.(Multibinder.java:283)

at com.google.inject.multibindings.Multibinder$RealMultibinder.(Multibinder.java:258)

at com.google.inject.multibindings.Multibinder.newRealSetBinder(Multibinder.java:178)

at com.google.inject.multibindings.Multibinder.newSetBinder(Multibinder.java:150)

at io.druid.guice.LifecycleModule.getEagerBinder(LifecycleModule.java:130)

at io.druid.guice.LifecycleModule.configure(LifecycleModule.java:136)

at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)

at com.google.inject.spi.Elements.getElements(Elements.java:101)

at com.google.inject.spi.Elements.getElements(Elements.java:92)

at com.google.inject.util.Modules$RealOverriddenModuleBuilder$1.configure(Modules.java:152)

at com.google.inject.AbstractModule.configure(AbstractModule.java:59)

at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)

at com.google.inject.spi.Elements.getElements(Elements.java:101)

at com.google.inject.spi.Elements.getElements(Elements.java:92)

at com.google.inject.util.Modules$RealOverriddenModuleBuilder$1.configure(Modules.java:152)

at com.google.inject.AbstractModule.configure(AbstractModule.java:59)

at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)

at com.google.inject.spi.Elements.getElements(Elements.java:101)

at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)

at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)

at com.google.inject.Guice.createInjector(Guice.java:95)

at com.google.inject.Guice.createInjector(Guice.java:72)

at com.google.inject.Guice.createInjector(Guice.java:62)

at io.druid.initialization.Initialization.makeInjectorWithModules(Initialization.java:366)

at io.druid.indexer.HadoopDruidIndexerConfig.(HadoopDruidIndexerConfig.java:99)

at io.druid.indexer.HadoopDruidIndexerMapper.setup(HadoopDruidIndexerMapper.java:48)

at io.druid.indexer.DeterminePartitionsJob$DeterminePartitionsGroupByMapper.setup(DeterminePartitionsJob.java:263)

at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)

at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)

at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)

at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:422)

at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)

at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)

Searching more carefully in the mailing list, I found two other users getting this stacktrace during druid indexing with 0.9.2-rc1. See below for the discussions. Has anyone found a solution to this exception?

Thanks

–morri

https://groups.google.com/d/msg/druid-user/74at97XZZh0/A0RI8NrxBgAJ

https://groups.google.com/d/msg/druid-development/fg-ObdHmfz8/a56l48y1BwAJ

Adding mapreduce.job.classloader=true to the indexing spec, as suggested here resolved the problem.

–morri

Thanks for posting your solution!

Fyi, we have also documented this on http://druid.io/docs/0.9.2-rc1/operations/other-hadoop.html. I just added a link to that to the release notes for 0.9.2 under “upgrading from 0.9.1”.