Statistics in Hive的mysql配置

来源:互联网 发布:天津大学网络自服务 编辑:程序博客网 时间:2024/06/06 01:59

HIVE执行insert overwrite时候默认会有临时的统计数据在derby数据库中。改成mysql库配置如下:

<property>  <name>hive.stats.dbclass</name> <!-- <value>jdbc:derby</value>-->  <value>jdbc:mysql</value>  <description>The default database that stores temporary hive statistics.</description></property><property>  <name>hive.stats.jdbcdriver</name> <!--  <value>org.apache.derby.jdbc.EmbeddedDriver</value>-->  <value>com.mysql.jdbc.Driver</value>  <description>The JDBC driver for the database that stores temporary hive statistics.</description></property><property>  <name>hive.stats.dbconnectionstring</name> <!-- <value>jdbc:derby:;databaseName=TempStatsStore;create=true</value> --><value>jdbc:mysql://IP:port/hive_datapool?CreateDatabaseIfNotExist=true&user= your_user&password= your_ password </value>   <description>The default connection string for the database that stores temporary hive statistics.</description></property>

更详细的官方文档:https://cwiki.apache.org/confluence/display/Hive/StatsDev

0 0
原创粉丝点击