hive整合spark之後進入hive報錯

解決原文鏈接:
https://blog.csdn.net/u014804456/article/details/77747720
githup地址:https://github.com/apache/hive/blob/master/metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql

故障描述如下:
spark和hive整合之後,spark-sql可以使用,hive直接進入會保錯,保錯信息如下
Logging initialized using configuration in jar:file:/home/hadoop/hdfs/hive/lib/hive-common-2.3.4.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
hive> show tables;
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
hive整合spark之後進入hive報錯hive整合spark之後進入hive報錯

進入存儲元數據的數據庫,本地庫位mysql
MariaDB [(none)]> use metastore;
更新以下內容

MariaDB [metastore]> SELECT 'Upgrading MetaStore schema from 2.2.0 to 2.3.0' AS MESSAGE;
+------------------------------------------------+
| MESSAGE                                        |
+------------------------------------------------+
| Upgrading MetaStore schema from 2.2.0 to 2.3.0 |
+------------------------------------------------+
1 row in set (0.00 sec)

MariaDB [metastore]> UPDATE VERSION SET SCHEMA_VERSION='2.3.0', VERSION_COMMENT='Hive release version 2.3.0' where VER_ID=1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [metastore]> SELECT 'Finished upgrading MetaStore schema from 2.2.0 to 2.3.0' AS MESSAGE;
+---------------------------------------------------------+
| MESSAGE                                                 |
+---------------------------------------------------------+
| Finished upgrading MetaStore schema from 2.2.0 to 2.3.0 |
+---------------------------------------------------------+
1 row in set (0.00 sec)

MariaDB [metastore]> exit;
Bye

再次通過hive進入hive命令行界面進行測試
hive整合spark之後進入hive報錯
問題完美解決

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