import org.apache.hadoop.security.UserGroupInformation; //Kerberos认证 if(hdfsProperties.isKerberosEnable()) { System.setProperty("java.security.krb5.conf", hdfsProperties.getKrb5()); UserGroupInformation.setConfiguration(configuration); UserGroupInformation.loginUserFromKeytab(hdfsProperties.getPrincipal(), hdfsProperties.getKeytab()); }
命令: kinit -kt /home/hdfs.keytab hdfs
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)