OryxProject / oryx

Oryx 2: Lambda architecture on Apache Spark, Apache Kafka for real-time large scale machine learning

Home Page:http://oryx.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.lang.ClassCastException: class kafka.serializer.StringDecoder happen in oryx-2.4.0

jessica0530 opened this issue · comments

java.lang.ClassCastException: class kafka.serializer.StringDecoder
at java.lang.Class.asSubclass(Class.java:3404)
at com.cloudera.oryx.common.lang.ClassUtils.loadClass(ClassUtils.java:54)
at com.cloudera.oryx.lambda.serving.ModelManagerListener.init(ModelManagerListener.java:96)

this error happen in this Code
this.updateDecoderClass = (Class<? extends Deserializer>) ClassUtils.loadClass(
config.getString("oryx.update-topic.message.decoder-class"), Deserializer.class);

"oryx.update-topic.message.decoder-class" is kafka.serializer.StringDecoder

How can I fix this ?? help

You're using outdated configuration. 2.4.x requires Kafka 0.10, and the classes have changed. You need a Deserializer in org.apache.kafka.common.serialization. See https://github.com/OryxProject/oryx/blob/oryx-2.4.0/framework/oryx-common/src/main/resources/reference.conf#L44