给spark任务添加jar包的方式
spark中使用的jar分成2种,一种是用户自行添加的jar,另一种是spark环境依赖的jar
1.spark环境依赖的jar
其添加的方式有有下面几种
1. --conf spark.driver.extraClassPath=...
or --driver-class-path ...
2. --conf spark.driver.extraLibraryPath=...
, or --driver-library-path ...
3. --conf spark.executor.extraClassPath=...
4. --conf spark.executor.extraLibraryPath=...
上面的配置参数指定的jar包最终都是放到了系统类加载器的classpath里,由系统类加载器完成加载。