背景:hadoop2.7.4   hive2.3.6,可以成功启动,可以创建表结构,但是insert插入数据时一直卡在如下警告处,插入不成功,一直没解决。

WARNING: 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日志如下:

java.lang.reflect.UndeclaredThrowableException

Caused by: java.lang.InterruptedException: sleep interrupted

Job Submission failed with exception 'java.lang.reflect.UndeclaredThrowableException(null)'

 后来百度找到解决办法:需要修改hive为本地模式

原博地址:一劳永逸解决Hive执行insert命令调用MR任务报错问题_会撸代码的懒羊羊的博客-CSDN博客_hive insert报错

临时解决:

在hive窗口输入如下命令

set hive.exec.mode.local.auto=true;

永久解决:

修改hive配置文件hive-site.xml

 将hive.exec.mode.local.auto修改为true

备注:修改配置文件后需要重启hive服务。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐