输入时:
hive -h <hostname>
从hdfs命令行中,我没有直接进入蜂巢控制台。
仍然要求输入主机名。
'Choose Hive Server/Metastore Hostname from : <hostname>'
'Enter Hive Server/Metastore Hostname :'
如果使用命令hive -h提交了主机名,则理想情况下,它不应再次要求输入主机名。
答案 0 :(得分:0)
使用Hive 3,我从hive -h主机名得到的输出是帮助,没有提到-h选项。使用beeline指定主机名对我有用:
_.filer
帮助输出还包括其他与Hive连接的直线示例:
[me@myhost-1 ~]$ beeline -u jdbc:hive2://myhost-2.com:10000
...
Connecting to jdbc:hive2://myhost.com:10000
Connected to: Apache Hive (version 3.1.0.3.0.3.0-192)
Driver: Hive JDBC (version 3.1.0.3.0.3.0-192)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 3.1.0.3.0.3.0-192 by Apache Hive
0: jdbc:hive2://myhost-2.com:>
使用两个连字符而不是一个是正确的语法:
Example:
1. Connect using simple authentication to HiveServer2 on localhost:10000
$ beeline -u jdbc:hive2://localhost:10000 username password
2. Connect using simple authentication to HiveServer2 on hs.local:10000 using -n for username and -p for password
$ beeline -n username -p password -u jdbc:hive2://hs2.local:10012
3. Connect using Kerberos authentication with hive/localhost@mydomain.com as HiveServer2 principal
$ beeline -u "jdbc:hive2://hs2.local:10013/default;principal=hive/localhost@mydomain.com"
4. Connect using SSL connection to HiveServer2 on localhost at 10000
$ beeline "jdbc:hive2://localhost:10000/default;ssl=true;sslTrustStore=/usr/local/truststore;trustStorePassword=mytruststorepassword"
5. Connect using LDAP authentication
$ beeline -u jdbc:hive2://hs2.local:10013/default <ldap-username> <ldap-password>