标签:
出现这个问题,是因为spark的excutor执行的时候,缺少hive的依赖包,添加依赖包的参数是:
--conf "spark.executor.extraClassPath=/opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hive/lib/*"
下面是是一个例子:
spark-submit --class com.simple.spark.Test \
--master yarn-client \
--num-executors 2 \
--driver-memory 600m \
--executor-memory 600m \
--executor-cores 1 \
--conf "spark.executor.extraClassPath=/opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hive/lib/*" \
--jars /opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hive/lib/hbase-common.jar test.jar
sparksql 提交到yarn出现 java.lang.NoClassDefFoundError: Lorg/apache/hadoop/hive/ql/plan/TableDesc
标签:
原文地址:http://www.cnblogs.com/smartcuning/p/4595140.html