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