Vaibhav Gumashta Thanks for looking at the issue.
1. Would enabling the per session/operation log config mean that there will be no consolidated log?
HiveServer2 logs like session open, session close etc will continue to be consolidated. Only the query logs like job client logs, driver or task logs will be redirected. Turning off the log redirection would again consolidate everything into a single log file as is done currently.
I'd be curious to hear what your method of detecting abandoned sessions is.
For detecting abandoned sessions w.r.t. log purging, I can check the last modified time of an operation log file. If that is older than a configured value, we can close the session.