To fix the memory leak issue as part of
HAWQ-1621, we are closing the UGI reference at the end of each PXF request. However, `FileSystem.closeAllForUGI` is an expensive operation and is slowing down PXF almost by a factor of 4 (with impersonation on) compared with impersonation turned off.
The proposal is to cache the UGI object for each PXF query session. The getFragments() call will create a new UGI and cache it using SegmentId:TransactionId. The bridge calls can get this UGI from cache. The cache entry will be cleaned-up periodically based on some timeout after inactivity.