hive中select語句只能執行一遍的問題

先說一下環境,我用的是hadoop3.1.1 + zookeeper3.4.6 + hive3.1.1。採用多用戶模式搭建hive,建表、導入數據等很正常。select如果是hdfs操作也很正常,但如果涉及到MapReduce操作就有個很奇怪的現象:每次啓動hive以後,第一次select的時候可以正確執行,第二次同樣的select語句就會報錯。

FAILED: Hive Internal Error: java.lang.IllegalArgumentException(The value of property yarn.resourcemanager.zk-address must not be null)
java.lang.IllegalArgumentException: The value of property yarn.resourcemanager.zk-address must not be null

但是我明明配置了yarn.resourcemanager.zk-address的。於是只能求助度娘,可能我用的關鍵詞不對,百度了很久只找到了http://www.aboutyun.com/thread-26581-1-1.html有和我同樣的問題,但是他的解決方法說的很簡略,作爲一個小白我沒有看懂。

於是只能自己解決,於是去看hive的日誌,發現其中有這麼一行:

2019-03-19T14:35:16,327 INFO [1cfae819-f9b9-4157-adea-5187f5afc972 main] Configuration.deprecation: yarn.resourcemanager.zk-address is deprecated. Instead, use hadoop.zk.address
於是試着把yarn-site.xml中的yarn.resourcemanager.zk-address改爲hadoop.zk.address,重啓以後問題解決!

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