public static UserGroupInformation getCurrentUGI ( ) { try { // Check original caller's UGI in case call went through proxy UserGroupInformation origUGI = OrigUGI . get ( ) ; if ( origUGI != null ) { return origUGI ; } // If original caller's UGI is not set then we get the UGI of connecting client Call call = CurCall . get ( ) ; if ( call != null ) { return call . connection . header . getUgi ( ) ; } } catch ( Exception e ) { } return null ; }
Gives access to the subject of the current call .