@InterfaceAudience.Private public final class Superusers extends Object
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
private static List<String> |
superGroups |
static String |
SUPERUSER_CONF_KEY
Configuration key for superusers
|
private static List<String> |
superUsers |
private static User |
systemUser |
Modifier | Constructor and Description |
---|---|
private |
Superusers() |
Modifier and Type | Method and Description |
---|---|
static User |
getSystemUser() |
static void |
initialize(org.apache.hadoop.conf.Configuration conf)
Should be called only once to pre-load list of super users and super
groups from Configuration.
|
static boolean |
isSuperUser(String user)
Deprecated.
this method is for backward compatibility, use
isSuperUser(User) instead |
static boolean |
isSuperUser(User user) |
private static final org.apache.commons.logging.Log LOG
public static final String SUPERUSER_CONF_KEY
private static User systemUser
public static void initialize(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- configuration to load users fromIOException
- if unable to initialize lists of superusers or super groupsIllegalStateException
- if current user is nullpublic static boolean isSuperUser(User user)
user
- to checkIllegalStateException
- if lists of superusers/super groups
haven't been initialized properly@Deprecated public static boolean isSuperUser(String user)
isSuperUser(User)
insteaduser
- to checkIllegalStateException
- if lists of superusers/super groups
haven't been initialized properlypublic static User getSystemUser()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.