[持續更新]hive異常解決方案

YBCarry發表於2019-02-28

[持續更新]hive異常解決方案

1. hive日誌資訊檢視

###檔案路徑

  • /tmp/<user.name>/hive.log
  • 預設user.name為root

2. 載入資料失敗

報錯提示

Loading data to table default.test01
Failed with exception Unable to move source file:/root/hive_test.txt to destination hdfs://bigdata01:9000/user/hive/warehouse/test01/hive_test_copy_1.txt
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
複製程式碼

異常原因

  • datanode沒有正常啟動

解決方案

  • 重啟Hadoop叢集

3. 載入驅動失敗

報錯提示

Caused by: org.datanucleus.store.rdbms.connectionpool.DatastoreDriverNotFoundException: The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
	at org.datanucleus.store.rdbms.connectionpool.AbstractConnectionPoolFactory.loadDriver(AbstractConnectionPoolFactory.java:58)
	at org.datanucleus.store.rdbms.connectionpool.BoneCPConnectionPoolFactory.createConnectionPool(BoneCPConnectionPoolFactory.java:54)
	at org.datanucleus.store.rdbms.ConnectionFactoryImpl.generateDataSources(ConnectionFactoryImpl.java:213)
複製程式碼

異常原因

  • 缺少MySQL驅動包

解決方案

  • 上傳mysql驅動包到hive的lib目錄下

相關文章