Statistics in Hive的mysql配置

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章