@Test (timeout = 30000) public void testCreateRemoteUser() { UserGroupInformation ugi = UserGroupInformation.createRemoteUser("user1"); assertEquals(AuthenticationMethod.SIMPLE, ugi.getAuthenticationMethod()); assertTrue (ugi.toString().contains("(auth:SIMPLE)")); ugi = UserGroupInformation.createRemoteUser("user1", AuthMethod.KERBEROS); assertEquals(AuthenticationMethod.KERBEROS, ugi.getAuthenticationMethod()); assertTrue (ugi.toString().contains("(auth:KERBEROS)")); }
@InterfaceAudience.Public @InterfaceStability.Evolving public static UserGroupInformation createRemoteUser(String user) { return createRemoteUser(user, AuthMethod.SIMPLE); }
UserGroupInformation { @InterfaceAudience.Public @InterfaceStability.Evolving public static UserGroupInformation createRemoteUser(String user) { return createRemoteUser(user, AuthMethod.SIMPLE); } }
UserGroupInformation { @InterfaceAudience.Public @InterfaceStability.Evolving public static UserGroupInformation createRemoteUser(String user) { return createRemoteUser(user, AuthMethod.SIMPLE); } UserGroupInformation(Subject subject); }
UserGroupInformation { @InterfaceAudience.Public @InterfaceStability.Evolving public static UserGroupInformation createRemoteUser(String user) { return createRemoteUser(user, AuthMethod.SIMPLE); } UserGroupInformation(Subject subject); @InterfaceAudience.Public @InterfaceStability.Evolving static void setConfiguration(Configuration conf); static boolean isSecurityEnabled(); boolean hasKerberosCredentials(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static UserGroupInformation getCurrentUser(); static UserGroupInformation getBestUGI(
      String ticketCachePath, String user); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation getUGIFromTicketCache(
            String ticketCache, String user); static UserGroupInformation getUGIFromSubject(Subject subject); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static UserGroupInformation getLoginUser(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static void loginUserFromSubject(Subject subject); @InterfaceAudience.Private @InterfaceStability.Unstable @VisibleForTesting synchronized static void setLoginUser(UserGroupInformation ugi); boolean isFromKeytab(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static void loginUserFromKeytab(String user,
                                  String path
                                  ); @InterfaceAudience.Public @InterfaceStability.Evolving void logoutUserFromKeytab(); synchronized void checkTGTAndReloginFromKeytab(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized void reloginFromKeytab(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized void reloginFromTicketCache(); synchronized static UserGroupInformation loginUserFromKeytabAndReturnUGI(String user,
                                  String path
                                  ); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static boolean isLoginKeytabBased(); static boolean isLoginTicketBased(); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createRemoteUser(String user); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createRemoteUser(String user, AuthMethod authMethod); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createProxyUser(String user,
      UserGroupInformation realUser); @InterfaceAudience.Public @InterfaceStability.Evolving UserGroupInformation getRealUser(); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createUserForTesting(String user, 
                                                          String[] userGroups); static UserGroupInformation createProxyUserForTesting(String user,
      UserGroupInformation realUser, String[] userGroups); String getShortUserName(); String getPrimaryGroupName(); @InterfaceAudience.Public @InterfaceStability.Evolving String getUserName(); synchronized boolean addTokenIdentifier(TokenIdentifier tokenId); synchronized Set<TokenIdentifier> getTokenIdentifiers(); boolean addToken(Token<? extends TokenIdentifier> token); boolean addToken(Text alias, Token<? extends TokenIdentifier> token); Collection<Token<? extends TokenIdentifier>> getTokens(); Credentials getCredentials(); void addCredentials(Credentials credentials); synchronized String[] getGroupNames(); @Override String toString(); synchronized void setAuthenticationMethod(AuthenticationMethod authMethod); void setAuthenticationMethod(AuthMethod authMethod); synchronized AuthenticationMethod getAuthenticationMethod(); synchronized AuthenticationMethod getRealAuthenticationMethod(); static AuthenticationMethod getRealAuthenticationMethod(
      UserGroupInformation ugi); @Override boolean equals(Object o); @Override int hashCode(); @InterfaceAudience.Public @InterfaceStability.Evolving T doAs(PrivilegedAction<T> action); @InterfaceAudience.Public @InterfaceStability.Evolving T doAs(PrivilegedExceptionAction<T> action
                    ); static void main(String [] args); }
UserGroupInformation { @InterfaceAudience.Public @InterfaceStability.Evolving public static UserGroupInformation createRemoteUser(String user) { return createRemoteUser(user, AuthMethod.SIMPLE); } UserGroupInformation(Subject subject); @InterfaceAudience.Public @InterfaceStability.Evolving static void setConfiguration(Configuration conf); static boolean isSecurityEnabled(); boolean hasKerberosCredentials(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static UserGroupInformation getCurrentUser(); static UserGroupInformation getBestUGI(
      String ticketCachePath, String user); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation getUGIFromTicketCache(
            String ticketCache, String user); static UserGroupInformation getUGIFromSubject(Subject subject); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static UserGroupInformation getLoginUser(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static void loginUserFromSubject(Subject subject); @InterfaceAudience.Private @InterfaceStability.Unstable @VisibleForTesting synchronized static void setLoginUser(UserGroupInformation ugi); boolean isFromKeytab(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static void loginUserFromKeytab(String user,
                                  String path
                                  ); @InterfaceAudience.Public @InterfaceStability.Evolving void logoutUserFromKeytab(); synchronized void checkTGTAndReloginFromKeytab(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized void reloginFromKeytab(); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized void reloginFromTicketCache(); synchronized static UserGroupInformation loginUserFromKeytabAndReturnUGI(String user,
                                  String path
                                  ); @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static boolean isLoginKeytabBased(); static boolean isLoginTicketBased(); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createRemoteUser(String user); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createRemoteUser(String user, AuthMethod authMethod); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createProxyUser(String user,
      UserGroupInformation realUser); @InterfaceAudience.Public @InterfaceStability.Evolving UserGroupInformation getRealUser(); @InterfaceAudience.Public @InterfaceStability.Evolving static UserGroupInformation createUserForTesting(String user, 
                                                          String[] userGroups); static UserGroupInformation createProxyUserForTesting(String user,
      UserGroupInformation realUser, String[] userGroups); String getShortUserName(); String getPrimaryGroupName(); @InterfaceAudience.Public @InterfaceStability.Evolving String getUserName(); synchronized boolean addTokenIdentifier(TokenIdentifier tokenId); synchronized Set<TokenIdentifier> getTokenIdentifiers(); boolean addToken(Token<? extends TokenIdentifier> token); boolean addToken(Text alias, Token<? extends TokenIdentifier> token); Collection<Token<? extends TokenIdentifier>> getTokens(); Credentials getCredentials(); void addCredentials(Credentials credentials); synchronized String[] getGroupNames(); @Override String toString(); synchronized void setAuthenticationMethod(AuthenticationMethod authMethod); void setAuthenticationMethod(AuthMethod authMethod); synchronized AuthenticationMethod getAuthenticationMethod(); synchronized AuthenticationMethod getRealAuthenticationMethod(); static AuthenticationMethod getRealAuthenticationMethod(
      UserGroupInformation ugi); @Override boolean equals(Object o); @Override int hashCode(); @InterfaceAudience.Public @InterfaceStability.Evolving T doAs(PrivilegedAction<T> action); @InterfaceAudience.Public @InterfaceStability.Evolving T doAs(PrivilegedExceptionAction<T> action
                    ); static void main(String [] args); static final String HADOOP_TOKEN_FILE_LOCATION; }