doris 访问kerberos的hive表
如果报错:Can't get Kerberos realm,解决办法:将krb5.conf 复制至 /etc/目录,注意: ln -s 方式连接至/etc/krb5.conf是不行的!!!
无需将core-site.xml hdfs-site.xml hive-site.xml mapred-site.xml yarn-site.xml 复制至doris/fe/conf和doris/be/conf
-- HiveServer2 JDBC URL :
drop catalog hive;
CREATE CATALOG hive PROPERTIES (
'type'='hms',
'hive.version' = '2.1.1',
'hive.metastore.uris' = 'thrift://nn1.your_host.com:9083,thrift://nn2.your_host.com:9083',
'hive.metastore.sasl.enabled' = 'true',
'hive.metastore.kerberos.principal' = 'hive/_HOST@YOUR_REALM.COM',
'hadoop.security.authentication' = 'kerberos',
'hadoop.kerberos.keytab' = '/some_path/your_user.keytab',
'hadoop.kerberos.principal' = 'your_user@YOUR_REALM.COM',
'yarn.resourcemanager.principal' = 'rm/_HOST@YOUR_REALM.COM',
'dfs.nameservices'='mycluster',
'dfs.ha.namenodes.mycluster'='nn1,nn2',
'dfs.namenode.rpc-address.mycluster.nn1'='nn1.your_host.com:8020',
'dfs.namenode.rpc-address.mycluster.nn2'='nn2.your_host.com:8020', 'dfs.client.failover.proxy.provider.mycluster'='org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider'
);
switch hive;
show databases;
use hive.your_database;
浙公网安备 33010602011771号