问题描述
spark连接dws的时候报错,报错为org.postgresql.util.PSQLException:The authentication type 5 is not supported.
告警信息
无
处理过程
经确认,spark自身是有jdbc驱动的
连接dws也需要jdbc驱动
根因
因为jdbc包加载的时候和内置的spark待的驱动包有冲突
解决方案
方案一:连接dws的时候驱动使用自带的gsjdbs200.jar这个驱动包
方案二:在连接的配置参数是将spark.yarn.user.classpath.first、spark.driver.userClassPathFirst、spark.executor.userClassPathFirst三个参数均设置true
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/bigdata/316291.html