问题:使用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
如有任何建议,我们将不胜感激:-)
1条答案
按热度按时间jutyujz01#
将结论复制到这里:cdh5.7附带并需要apachekafka0.9。因此,有必要使用oryx2.2.x,它支持0.9和5.7。很快就会发布。