我的hiveserver2一直不能啟動,命令行一直卡住不動,然後我就想是不是配置文件沒有配置相關的參數,然後就來修改hive-site.xml 最終修改完後的hive-site.xml: 配置成功後,hiveserver2就能啟動成功了。 ...
我的hiveserver2一直不能啟動,命令行一直卡住不動,然後我就想是不是配置文件沒有配置相關的參數,然後就來修改hive-site.xml
最終修改完後的hive-site.xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://**.**.**.**(你的地址):3306/hive?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>123456</value>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/soft/hive/warehouse</value> //(hive所在集群的IP地址)
<description>location of default database for the warehouse</description>
</property>
<property>
<name>hive.server2.thrift.port</name>
<value>10000</value>
<description>Port number of HiveServer2 Thrift interface.
Can be overridden by setting $HIVE_SERVER2_THRIFT_PORT</description>
</property>
<property>
<name>hive.server2.thrift.bind.host</name>
<value>**.**.**.**</value> //主機地址
<description>Bind host on which to run the HiveServer2 Thrift interface.
Can be overridden by setting $HIVE_SERVER2_THRIFT_BIND_HOST</description>
</property>
<property>
<name>hive.server2.long.polling.timeout</name>
<value>5000</value>
<description>Time in milliseconds that HiveServer2 will wait, before responding to asynchronous calls that use long polling</description>
</property>
</configuration>
配置成功後,hiveserver2就能啟動成功了。