Run Hive on spark tasks with Hue, always running more than 30 min

环境

CDH 6.3.1
Hive 2.1.1(执行引擎Spark)
Hue
Spark 2.4.0

问题

Hue执行hive sql:
Run Hive on spark tasks with Hue, always running more than 30 min_第1张图片
理论上14.005s已经执行完了,结果已经正常返回,但是hue上的job 持续了30m才结束,详情如下:
Run Hive on spark tasks with Hue, always running more than 30 min_第2张图片

解决思路

查找各种资料,也调整各种timeout, 就是不work; 因为每次都是规律的30分钟结束,最终找到hive配置文件中的一个配置:

Run Hive on spark tasks with Hue, always running more than 30 min_第3张图片
调整此值为300s后,按照预想的5分钟执行完成了:
Run Hive on spark tasks with Hue, always running more than 30 min_第4张图片

总结思考

hive.spark.session.timeout 这个配置藏得有点儿深;另外hue不能根据查询到yarn上的状态自动更新状态为finished吗?单靠这个session timeout来控制太不友好了,尤其是对有些执行时间长的任务. 有时间想去翻翻hue源代码看看具体怎么交互的。

你可能感兴趣的:(大数据)