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

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

1 hive

# kadmin.local -q 'ktadd -k /tmp/hive3.keytab -norandkey hive/[email protected]'
# kinit -kt /tmp/hive3.keytab hive/[email protected]
# klist

# beeline -u 'jdbc:hive2://192.168.0.3:10000/;principal=hive/[email protected]'
# hive

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

2 impala

# kadmin.local -q 'ktadd -k /tmp/impala3.keytab -norandkey impala/[email protected]'
# kinit -kt /tmp/impala3.keytab impala/[email protected]
# klist

# impala-shell -i 192.168.0.3:21000 -k
# beeline -u 'jdbc:hive2://192.168.0.3:21050/;principal=impala/[email protected]'

3 hdfs

# kadmin.local -q 'ktadd -k /tmp/hdfs.keytab -norandkey hdfs/[email protected]'
# kinit -kt /tmp/hdfs.keytab hdfs/[email protected]
# klist

# hdfs dfs -ls /
# hdfs dfsadmin -report