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,重启以后问题解决!

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