问题
描述
环境说明:我使用的是Hadoop生态软件都是社区版。
使用Spark SQL向Hive表写数据,数据写入正常,并没有发现其他任何异常,但是日志信息出现一个ERROR,如下:
ERROR hdfs.KeyProviderCache: Could not find uri with key [dfs.encryption.key.provider.uri] to create a keyProvider !! copyFromLocal: No KeyProvider is configured, cannot access an encrypted file
解决
出现一个ERROR,应该不是一个小问题,但是并没有发现任何异常的影响,不过感觉不放心,还是得查查资料了解一下。
经过搜索,发现网上有对类似问题的讨论,阅读后,发现讨论中是另外的操作引发的这个ERROR,但是对我还是有帮助的。
这个问题貌似最早是在Cloudera社区讨论的,主要结论就是,这不是一个问题。
原文核心内容如下:
CDH's base release versions are just that: base. The fix for the harmless log print due to HDFS-7931 is present in all CDH5 releases since CDH 5.4.1.
If you see that error in context of having configured a KMS, then its a worthy one to consider. If you do not use KMS or EZs, then the error may be ignored. Alternatively upgrade to the latest CDH5 (5.4.x or 5.5.x) releases to receive a bug fix that makes the error only appear when in the context of a KMS being configured over an encrypted path.
Per your log snippet, I don't see a problem (the canary does not appear to be failing?). If you're trying to report a failure, please send us more characteristics of the failure, as HDFS-7931 is a minor issue with an unnecessary log print.
Cloudera公司是Hadoop的主要贡献方之一,社区版Hadoop和CDH的Hadoop大部分是相通的,所以虽然我使用的社区版Hadoop,但是上面这个信息依然对我有用。
我目前没有使用KMS和EZs,所以暂时忽略这个问题,以后需要的时候再研究。