-
1、修改配置文件hdfs-site.xml,添加如下内容:
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
-
2、修改配置文件core-site.xml,添加如下内容:
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
-
3、修改hive-site.xml文件,添加如下内容:
<property>
??? <name>hive.server2.thrift.client.user</name>
??? <value>root</value>
??? <description>Username to use against thrift client</description>
? </property>
? <property>
??? <name>hive.server2.thrift.client.password</name>
??? <value>qwer</value>
??? <description>Password to use against thrift client</description>
</property>
-
4、重启hadoop
-
5、开启后台hiveserver服务?
nohup hiveserver2 > /dev/null 2>&1 &
-
6、beeline进行连接
beeline> !connect jdbc:hive2://node01:10000/default
Connecting to jdbc:hive2://node01:10000/default
Enter username for jdbc:hive2://node01:10000/default: root
Enter password for jdbc:hive2://node01:10000/default: ****
Connected to: Apache Hive (version 3.1.2)
Driver: Hive JDBC (version 3.1.2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://node01:10000/default> show databases;