@InterfaceAudience.Private public final class Superusers extends Object
限定符和类型 | 字段和说明 |
---|---|
static String |
SUPERUSER_CONF_KEY
Configuration key for superusers
|
限定符和类型 | 方法和说明 |
---|---|
static Collection<String> |
getSuperUsers() |
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(User user) |
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 properlypublic static Collection<String> getSuperUsers()
public static User getSystemUser()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.