This article is an extension to the official HDP document.
Apart from following the steps listed in this document, you must perform the following checks to ensure the hook is configured correctly and does not result in errors when you start executing queries in Hive.
1. In hive-site.xml, verify hive.server2.async.exec.threads is not set to 1. If so, then increase to 100.
2. In hive-site.xml, verify the max thread pool size is not set to 1. Increase it to 5 to begin with and you may need to increase it further depending on the load.