Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Killing HiveSessions with longer connection times

avatar
Rising Star

We have a requirement where, if there is any query which is taking up more time from HS2 session then terminate the connection and kill the job. To address this we have set below properties but we are seeing that jobs in YARN are not getting killed and running for more than two hours.

hive.server2.session.check.interval = 60000 (in ms) # 10 minutes hive.server2.idle.operation.timeout = 1800000 (in ms) # 30 minutes hive.server2.idle.session.timeout = 2400000 (in ms) # 40 minutes

Does setting below properties kill the related running YARN application after idle session time out. If not, is there any property which we need to set in HiveServer2 to kill long running queries.

1 ACCEPTED SOLUTION

avatar
Master Guru
@Saikiran Parepally

Even if session gets timedout, YARN will retry attempt upto 3 more times and application will get killed if all 4 attempts are failed. That might be the reason why your YARN application runs longer.

Please refer below thread for more information.

https://qnalist.com/questions/4398360/how-to-terminate-a-running-hive-query-executed-with-jdbc-hive-...

View solution in original post

2 REPLIES 2

avatar
Master Guru
@Saikiran Parepally

Even if session gets timedout, YARN will retry attempt upto 3 more times and application will get killed if all 4 attempts are failed. That might be the reason why your YARN application runs longer.

Please refer below thread for more information.

https://qnalist.com/questions/4398360/how-to-terminate-a-running-hive-query-executed-with-jdbc-hive-...

avatar
Rising Star

@Kuldeep KulkarniThanks for your inputs,