【2019-07-21】spark on hbase运行一天token失效

问题描述

运行一天发现访问hbase失败,异常如下token cant be found In cache。

分析

1.检查配置项,怀疑是缓存导致,
spark.inputFormat.cache.enabled是否为false
spark.yarn.security.credentials.hbase.enabled是否为true
2.日志打印:

2019-07-20 16:07:24,773 | WARN  | [main] | spark.yarn.security.credentials.hbase.enabled is deprecated.  Please use spark.security.credentials.hbase.enabled instead. | org.apache.spark.internal.Logging$class.logWarning(Logging.scala:66)
2019-07-20 16:07:24,775 | DEBUG | [main] | Using the following delegation token providers: hadoopfs, hive. | org.apache.spark.internal.Logging$class.logDebug(Logging.scala:58)

从这里看,只有hadoopfs, hive了,没有hbase的token了

结论

初步结论,hbase开关在2.3将hbase的开关从spark.yarn.security.credentials.hbase.enabled变化成了spark.security.credentials.hbase.enabled

解决措施

spark.security.credentials.hbase.enabled 开关在Spark2.1和Spark2.3使用了不同的参数。
2.1:
spark.inputFormat.cache.enabled是否为false
spark.yarn.security.credentials.hbase.enabled是否为true
2.3:
spark.security.credentials.hbase.enabled

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容