问题: 当使用ALS示例启动oryx服务层时,我得到以下异常:
SEVERE: Exception sending context initialized event to listener
instance of class com.cloudera.oryx.lambda.serving.ModelManagerListener
java.lang.NoSuchMethodError: kafka.admin.AdminUtils.topicExists(Lorg/I0Itec/zkclient/ZkClient;Ljava/lang/String;)Z
at com.cloudera.oryx.kafka.util.KafkaUtils.topicExists(KafkaUtils.java:93)
at com.cloudera.oryx.lambda.serving.ModelManagerListener.contextInitialized(ModelManagerListener.java:113)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
上下文:我在docker容器中的CDH 5.7上运行 - 所有jar都在compute-classpath建议的预期位置,并且kafka(0.8.2.0)启动并运行主题需要:
**In dir opt/cloudera/parcels/CDH/jars:**
commons-cli-1.2.jar
kafka_2.10-0.8.2.0-kafka-1.4.0.jar
commons-collections-3.2.2.jar
kafka-clients-0.8.2.0-kafka-1.4.0.jar
commons-configuration-1.6.jar
protobuf-java-2.5.0.jar
hadoop-auth.jar
scala-library-2.11.8.jar
hadoop-common.jar
snappy-java-1.0.4.1.jar
hadoop-hdfs.jar
spark-examples-1.6.0-cdh5.7.0-hadoop2.6.0-cdh5.7.0.jar
htrace-core4-4.0.1-incubating.jar
zookeeper-copy.jar
配置:
kafka-brokers = "localhost:9092"
zk-servers = "localhost:2181"
hdfs-base = "hdfs:///user/example/Oryx"
oryx {
id = "ALSExample"
als {
rescorer-provider-class = null
}
input-topic {
broker = ${kafka-brokers}
lock = {
master = ${zk-servers}
}
}
update-topic {
broker = ${kafka-brokers}
lock = {
master = ${zk-servers}
}
}
batch {
streaming {
generation-interval-sec = 300
num-executors = 4
executor-cores = 8
executor-memory = "4g"
}
update-class = "com.cloudera.oryx.app.batch.mllib.als.ALSUpdate"
storage {
data-dir = ${hdfs-base}"/data/"
model-dir = ${hdfs-base}"/model/"
}
ui {
port = 4040
}
}
speed { model-manager-class = "com.cloudera.oryx.app.speed.als.ALSSpeedModelManager"
ui {
port = 4041
}
}
serving { model-manager-class = "com.cloudera.oryx.app.serving.als.model.ALSServingModelManager"
application-resources = "com.cloudera.oryx.app.serving,com.cloudera.oryx.app.serving.als"
api {
port = 8080
}
}
}
示例启动命令:
/oryx-run.sh serving --conf als-example.conf --app-jar oryx-serving-2.1.2.jar
要么
/oryx-run.sh serving --conf als-example.conf --app-jar example.jar
我们将非常感谢任何建议: - )
答案 0 :(得分:0)
将结论复制回来:CDH 5.7附带并需要Apache Kafka 0.9。因此,有必要使用支持0.9的Oryx 2.2.x和5.7。它将很快发布。