DEMO-Shell访问Hive/Impala

适用模块

客户端

具体说明

Shell访问Hive/Impala

使用示例


##### Kerberos认证
```bash
# 调整kerberos配置文件-需根据用户集群具体信息进行调整
#  vi /etc/krb5.conf
[logging]
# default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 dns_lookup_realm = false
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 rdns = false
 pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
 default_realm = DEMO.163.COM
# default_ccache_name = KEYRING:persistent:%{uid}


[domain_realm]
   .jd.163.org = DEMO.163.COM
   jd.163.org = DEMO.163.COM


[realms]
    DEMO.163.COM = {
      admin_server = hadoop-poc0.jd.163.org
      kdc = hadoop-poc0.jd.163.org
    }
##### 代码示例
# kerberos认证
## 如通过通过平台调用shell 可省略kinit认证
kinit -kt  hue.keytab  hue/dev@BDMS.163.COM
beeline -u "jdbc:hive2://hadoop-poc3.jd.163.org:10000/;principal=hive/_HOST@DEMO.163.COM"

作者:wangsong