code: @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});
    }
docs: Create YARN proxy user and add security tokens to its credentials.
  This method can be called only once per class instance.
  @param proxyName Name of the new proxy user.
  @param hostUGI YARN user to impersonate the proxy.
  @param tokens Security tokens to add to the new proxy user's credentials.