Affects Version/s: None
Fix Version/s: 3.0.0
Hive doesn't close Tez session properly if AM isn't ready for accepting DAG.
This can be easily reproduced using the following steps:
1) configure cluster on Tez;
2) create file test.hql
3) run the job
$ hive --hiveconf hive.root.logger=DEBUG,console --hiveconf hive.execution.engine=tez -f ~/test.hql
If we login into Yarn UI, we will see that jobs status is failed even it finished successfully.
It happens because hive creates tez session by default. And if query finished very quickly, we can't close tez session properly because AM isn't ready for accepting any requests.