We're using HMS with Storage-Based Authorization and have been having trouble with the HMS running out of threads. Looking at the jstack & code, it appears to that the problem is that RPC's ConnectionId is using UGI's equal/hash, which uses the Subject's Object equals/hash. Proxy user UGI's always create a new Subject and thus are always unique.
This leads to the HMS creating too many threads. I've created a jira in Hadoop. https://issues.apache.org/jira/browse/HADOOP-18434 Thanks, Owen