Naming hive session cannot work sometimes

282 Views Asked by At

I ran sqls on hive tez by hive -f xxx.sql --hiveconf hive.session.id=sessionName but on the yarn resourcemanager displays like this

HIVE-f4ea6c3f-f4cf-4db3-8801-da6f94e20237
HIVE-d920c434-d2e6-4c1c-a506-d69b580960f7

sometimes it displays correctly.. How can solve this problem

1

There are 1 best solutions below

1
On

The thing is Tez can reuse containers. AM container reuse = session reuse. controlled by this parameter: tez.am.container.reuse.enabled=true

One yarn AM container can be reused for different Tez sessions. This is the reason why yarn name is different.

BTW there is one more parameter added in this JIRA HIVE-12357, you can set name for each DAG:

hive.query.name