报错信息:
Login failure for hdfs@EXAMPLE.COM
Illegal principal name hdfs@EXAMPLE.COM
No rules applied to hdfs@EXAMPLE.COM
可能原因:
1.hadoop版本问题,保持集群版本一致
2.登录配置了
// configuration.set("hadoop.security.authentication", "Kerberos");
// UserGroupInformation.setConfiguration(configuraion);
3.loginUserFromKeytab方法的顺序与FileSystem.get的顺序,应先登录后获取filesystem(获取时不会报错kerberos权限问题)