/// <summary>This method uses the currentUser, and real user to create a proxy</summary> /// <param name="effectiveUser">The user who is being proxied by the real user</param> /// <param name="realUser">The actual user who does the command</param> /// <returns>Proxy UserGroupInformation</returns> /// <exception cref="System.IO.IOException">If proxying fails</exception> internal virtual UserGroupInformation GetUserGroupInformation(string effectiveUser , UserGroupInformation realUser) { Preconditions.CheckNotNull(effectiveUser); Preconditions.CheckNotNull(realUser); realUser.CheckTGTAndReloginFromKeytab(); UserGroupInformation ugi = UserGroupInformation.CreateProxyUser(effectiveUser, realUser ); if (Log.IsDebugEnabled()) { Log.Debug(string.Format("Created ugi:" + " %s for username: %s", ugi, effectiveUser )); } return(ugi); }