<property>
<name>hive.server2.thrift.bind.host</name>
<value>slave01</value>
<description>Bind host on which to run the HiveServer2 Thrift service.</description>
</property>
<property>
<name>hive.server2.thrift.port</name>
<value>10000</value>
<description>Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'binary'.</description>
</property>
<property>
<name>hive.server2.thrift.http.port</name>
<value>10001</value>
<description>Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'http'.</description>
</property>
<property>
<name>hive.server2.thrift.client.user</name>
<value>hadoop</value>
<description>Username to use against thrift client</description>
</property>
<property>
<name>hive.server2.thrift.client.password</name>
<value>hadoop</value>
<description>Password to use against thrift client</description>
</property>
hadoop@master:~/bigdata/hive$ beeline
Beeline version 1.2.1.spark2 by Apache Hive
beeline>
beeline> !connect jdbc:hive2://slave01:10000 // 2中配置项的host:port ,因为启动的是hiveserver2,所以参数中是hive2
Connecting to jdbc:hive2://ndh-slave01:10000
Enter username for jdbc:hive2://ndh-slave01:10000: hadoop
Enter password for jdbc:hive2://ndh-slave01:10000: ****** //2中配置项的user/password
17/09/08 14:39:27 INFO jdbc.Utils: Supplied authorities: ndh-slave01:10000
17/09/08 14:39:27 INFO jdbc.Utils: Resolved authority: ndh-slave01:10000
17/09/08 14:39:27 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://slave01:10000
Connected to: Apache Hive (version 2.1.1)
Driver: Hive JDBC (version 1.2.1.spark2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://slave01:10000>