@ SafeVarargs public final void set ( final String proxyName , final UserGroupInformation hostUGI , final Token < ? extends TokenIdentifier > ... tokens ) { assert this . proxyUGI == null ; this . proxyUGI = UserGroupInformation . createProxyUser ( proxyName , hostUGI ) ; for ( final Token < ? extends TokenIdentifier > token : tokens ) { this . proxyUGI . addToken ( token ) ; } LOG . log ( Level . FINE , "UGI: user {0} set to: {1}" , new Object [ ] { proxyName , this } ) ; }
Create YARN proxy user and add security tokens to its credentials . This method can be called only once per class instance .