【原创】大数据基础之Kerberos(2)hive impala hdfs访问

时间:2024-09-30 23:33:27

1 hive

# kadmin.local -q 'ktadd -k /tmp/hive3.keytab -norandkey hive/server03@TEST.COM'
# kinit -kt /tmp/hive3.keytab hive/server03@TEST.COM
# klist

# beeline -u 'jdbc:hive2://192.168.0.3:10000/;principal=hive/server03@TEST.COM'
# hive

注意这里的server03是指hive server的host,而不是客户端服务器的host;

2 impala

# kadmin.local -q 'ktadd -k /tmp/impala3.keytab -norandkey impala/server03@TEST.COM'
# kinit -kt /tmp/impala3.keytab impala/server03@TEST.COM
# klist

# impala-shell -i 192.168.0.3:21000 -k
# beeline -u 'jdbc:hive2://192.168.0.3:21050/;principal=impala/server03@TEST.COM'

3 hdfs

# kadmin.local -q 'ktadd -k /tmp/hdfs.keytab -norandkey hdfs/server01@TEST.COM'
# kinit -kt /tmp/hdfs.keytab hdfs/server01@TEST.COM
# klist

# hdfs dfs -ls /
# hdfs dfsadmin -report