使用Beeline连接Hive

服务端启动hiveserver2 [root@node04 ~]# hiveserver2

客户端进入beeline并连接

[root@node03 ~]# beeline

Beeline version 1.2.1 by Apache Hive

beeline> !connect jdbc:hive2://node04:10000

Connecting to jdbc:hive2://node04:10000 Enter username for jdbc:hive2://node04:10000: root

Enter password for jdbc:hive2://node04:10000: ******

Connected to: Apache Hive (version 1.2.1) Driver:

Hive JDBC (version 1.2.1) Transaction isolation: TRANSACTION_REPEATABLE_READ 0: jdbc:hive2://node04:10000>

退出连接 0: jdbc:hive2://node04:10000> !quit
另一种连接方法 [root@node03 ~]# beeline -u jdbc:hive2//node04:10000 -n root

你可能感兴趣的:(hive)