在History的服务上看到的异常是:
java.lang.NoClassDefFoundError: com/alibaba/fastjson/JSON
那么就还得加入Json的jar包:`fastjson-1.2.58.jar`:
spark-submit \
--name OnLineLogAnalysisTest1 \
--class com.importpack.OnLineLogAnalysis \
--master yarn \
--deploy-mode cluster \
--driver-memory 1G \
--executor-memory 1G \
--executor-cores 1 \
--num-executors 1 \
--packages org.influxdb:influxdb-java:2.5,org.apache.spark:spark-streaming-kafka-0-10_2.11:2.4.2 \
--jars /home/hadoop/lib/fastjson-1.2.58.jar \
--driver-class-path /home/hadoop/lib/fastjson-1.2.58.jar \---->保证也加入到driver中
/home/hadoop/lib/ruozetest-1.0.jar