hive-h< hostname>未建立到配置单元控制台的连接

xt0899hw  于 2021-05-31  发布在  Hadoop
关注(0)|答案(1)|浏览(515)

输入时: hive -h <hostname> 从hdfs命令行,我没有被引导到配置单元控制台。
仍要求输入主机名。

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

如果主机名是使用命令hive-h提交的,那么理想情况下,它不应该再次请求主机名。

iovurdzv

iovurdzv1#

使用hive3,我从hive-h hostname得到的输出是帮助,它没有提到-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:>

帮助输出还包括其他连接到配置单元的直线示例:

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

相关问题