0

I'm using storm 0.93 with titan 0.5.4. Titan is running in the same VM as my application and communicates with cassandra database running externally.

When I deploy my topology to storm, one of the bolts uses titan's API to do some query. I get the following exception: com.esotericsoftware.kryo.KryoException: Encountered unregistered class ID: 10.

This is because Titan and storm uses slightly different kyro versions. Titan uses 2.22 and storm uses 2.21.

Any advice on how I can work around this problem?

Thanks.

user3261334
  • 139
  • 4
  • 13
  • You can use different class loader manually to deal with different version of kryo, maybe OSGi is useful in your case. You'd have two class loaders one with each version of kryo and custom code between to convert. A bit long, maybe there's something better? – zenbeni Apr 11 '15 at 21:05

1 Answers1

1

I've solved this exact problem by replacing kryo-2.21.jar that ships with Storm 0.9.3 with kryo-2.22.jar. I haven't experienced any adverse side effects to replacing this jar. We've been running in production error free for several months.

TL;DR
If your using a debain package to install storm this project may help. I've submitted a pull request upgrading the project to storm 0.9.3. Before you create the debian package replace kryo-2.21.jar with kryo-2.22.jar

Curtis Allen
  • 873
  • 1
  • 6
  • 19
  • Your method worked once but now I am getting the same error @Curtis Allen, later I tried putting both versions of kryo into storm lib to find some new error but it didn't show any error & my application worked. I don't know what's happening. – Ajeesh May 20 '15 at 11:22
  • @Ajeesh You should only ever have one version of kryo on your classpath. My guess is you have an additional version of kryo that's added somehow. I'd suggest you look at your running java process using something like `ps -ef | grep kryo` and ensure there is only one version on the classpath. – Curtis Allen May 20 '15 at 16:33
  • I excluded kryo from all my dependent depencies in my application, and using kryo 2.22 in storm/lib folder but it showed the same error. So to find some new error I put kryo 2.21 also but somehow it worked. I tried only using kryo 2.21 but same exception "Unregistered class Id: 10". – Ajeesh May 21 '15 at 10:04