gpt4 book ai didi

hadoop - hive -h <主机名>未建立与hive控制台的连接

转载 作者:行者123 更新时间:2023-12-02 20:29:54 24 4
gpt4 key购买 nike

输入时:
hive -h <hostname>
从hdfs命令行中,我没有直接转到hive控制台。

仍要求输入主机名。

'Choose Hive Server/Metastore Hostname from : <hostname>'
'Enter Hive Server/Metastore Hostname :'

如果使用命令hive -h提交了主机名,则理想情况下,它不应再次要求输入主机名。

最佳答案

使用Hive 3,我从hive -h主机名得到的输出是帮助,没有提到-h选项。使用beeline指定主机名对我有用:

[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:>

帮助输出还包括其他连接到Hive的直线示例:
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>

正确的语法是使用两个连字符,而不是一个:
hive --help
Usage ./hive <parameters> --service serviceName <service parameters>
Service List: beeline cleardanglingscratchdir cli fixacidkeyindex help hiveburninclient hiveserver2 hplsql jar lineage llapdump llap llapstatus metastore metatool orcfiledump rcfilecat schemaTool strictmanagedmigration tokentool version
Parameters parsed:
--auxpath : Auxiliary jars
--config : Hive configuration directory
--service : Starts specific service/component. cli is default
Parameters used:
HADOOP_HOME or HADOOP_PREFIX : Hadoop install directory
HIVE_OPT : Hive options
For help on a particular service:
./hive --service serviceName --help
Debug help: ./hive --debug --help

关于hadoop - hive -h <主机名>未建立与hive控制台的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53757790/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com