【原创】大叔问题定位分享(9)oozie提交spark任务报 java.lang.NoClassDefFoundError: org/apache/kafka/clients/producer/KafkaProducer

oozie中支持很多的action类型,比如spark、hive,对应的标签为:

<spark xmlns="uri:oozie:spark-action:0.1">

...

oozie中sharelib用于存放每个action类型需要的依赖,可以查看当前所有的action类型以及每个action类型的依赖

oozie admin -shareliblist
[Available ShareLib]
hive
sparkbak
distcp
mapreduce-streaming
spark
oozie
hcatalog
hive2
sqoop
pig

oozie admin -shareliblist spark

...

上述报错是由于oozie中spark依赖里的kafka基础依赖缺少kafka-clients-0.8.2.2.jar,将jar上传到sharelib目录,然后手动更新即可

oozie admin -sharelibupdate

更新之后可见:

oozie admin -shareliblist spark|grep kafka
        hdfs://hdfs_name/oozie/share/lib_20180801121138/spark/kafka-clients-0.8.2.2.jar
        hdfs://hdfs_name/oozie/share/lib_20180801121138/spark/kafka_2.11-0.8.2.1.jar
        hdfs://hdfs_name/oozie/share/lib_20180801121138/spark/spark-streaming-kafka-0-8_2.11-2.1.0.jar

添加成功

上一篇:开源组件ExcelReport 3.x.x 使用手册(为.netcore而来)


下一篇:Linux上的防病毒软件ClamAV