@InterfaceAudience.Private public class HBaseKerberosUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
KRB_KEYTAB_FILE |
static String |
KRB_PRINCIPAL |
private static org.slf4j.Logger |
LOG |
static String |
MASTER_KRB_PRINCIPAL |
Constructor and Description |
---|
HBaseKerberosUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.conf.Configuration |
getConfigurationWoPrincipal() |
static String |
getKeytabFileForTesting() |
static String |
getPrincipalForTesting() |
static org.apache.hadoop.conf.Configuration |
getSecuredConfiguration() |
static boolean |
isKerberosPropertySetted() |
static org.apache.hadoop.security.UserGroupInformation |
loginAndReturnUGI(org.apache.hadoop.conf.Configuration conf,
String username) |
static void |
setKeytabFileForTesting(String keytabFile) |
static void |
setPrincipalForTesting(String principal) |
static void |
setSecuredConfiguration(org.apache.hadoop.conf.Configuration conf) |
static void |
setSystemProperty(String propertyName,
String propertyValue) |
private static final org.slf4j.Logger LOG
public static final String KRB_PRINCIPAL
public static final String MASTER_KRB_PRINCIPAL
public static final String KRB_KEYTAB_FILE
public HBaseKerberosUtils()
public static boolean isKerberosPropertySetted()
public static void setPrincipalForTesting(String principal)
public static void setKeytabFileForTesting(String keytabFile)
public static void setSystemProperty(String propertyName, String propertyValue)
public static String getKeytabFileForTesting()
public static String getPrincipalForTesting()
public static org.apache.hadoop.conf.Configuration getConfigurationWoPrincipal()
public static org.apache.hadoop.conf.Configuration getSecuredConfiguration()
public static void setSecuredConfiguration(org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.security.UserGroupInformation loginAndReturnUGI(org.apache.hadoop.conf.Configuration conf, String username) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.