HADOOP-7189. Add ability to enable debug property in JAAS configuration. Contributed by Ted Yu.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1102123 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7f77fad79a
commit
65117781ec
|
@ -443,6 +443,9 @@ Release 0.22.0 - Unreleased
|
||||||
HADOOP-7244. Documentation change for updated configuration keys.
|
HADOOP-7244. Documentation change for updated configuration keys.
|
||||||
(tomwhite via eli)
|
(tomwhite via eli)
|
||||||
|
|
||||||
|
HADOOP-7189. Add ability to enable 'debug' property in JAAS configuration.
|
||||||
|
(Ted Yu via todd)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).
|
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).
|
||||||
|
|
|
@ -340,15 +340,24 @@ public class UserGroupInformation {
|
||||||
"hadoop-user-kerberos";
|
"hadoop-user-kerberos";
|
||||||
private static final String KEYTAB_KERBEROS_CONFIG_NAME =
|
private static final String KEYTAB_KERBEROS_CONFIG_NAME =
|
||||||
"hadoop-keytab-kerberos";
|
"hadoop-keytab-kerberos";
|
||||||
|
|
||||||
|
private static final Map<String, String> BASIC_JAAS_OPTIONS =
|
||||||
|
new HashMap<String,String>();
|
||||||
|
static {
|
||||||
|
String jaasEnvVar = System.getenv("HADOOP_JAAS_DEBUG");
|
||||||
|
if (jaasEnvVar != null && "true".equalsIgnoreCase(jaasEnvVar)) {
|
||||||
|
BASIC_JAAS_OPTIONS.put("debug", "true");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static final AppConfigurationEntry OS_SPECIFIC_LOGIN =
|
private static final AppConfigurationEntry OS_SPECIFIC_LOGIN =
|
||||||
new AppConfigurationEntry(OS_LOGIN_MODULE_NAME,
|
new AppConfigurationEntry(OS_LOGIN_MODULE_NAME,
|
||||||
LoginModuleControlFlag.REQUIRED,
|
LoginModuleControlFlag.REQUIRED,
|
||||||
new HashMap<String,String>());
|
BASIC_JAAS_OPTIONS);
|
||||||
private static final AppConfigurationEntry HADOOP_LOGIN =
|
private static final AppConfigurationEntry HADOOP_LOGIN =
|
||||||
new AppConfigurationEntry(HadoopLoginModule.class.getName(),
|
new AppConfigurationEntry(HadoopLoginModule.class.getName(),
|
||||||
LoginModuleControlFlag.REQUIRED,
|
LoginModuleControlFlag.REQUIRED,
|
||||||
new HashMap<String,String>());
|
BASIC_JAAS_OPTIONS);
|
||||||
private static final Map<String,String> USER_KERBEROS_OPTIONS =
|
private static final Map<String,String> USER_KERBEROS_OPTIONS =
|
||||||
new HashMap<String,String>();
|
new HashMap<String,String>();
|
||||||
static {
|
static {
|
||||||
|
@ -359,6 +368,7 @@ public class UserGroupInformation {
|
||||||
if (ticketCache != null) {
|
if (ticketCache != null) {
|
||||||
USER_KERBEROS_OPTIONS.put("ticketCache", ticketCache);
|
USER_KERBEROS_OPTIONS.put("ticketCache", ticketCache);
|
||||||
}
|
}
|
||||||
|
USER_KERBEROS_OPTIONS.putAll(BASIC_JAAS_OPTIONS);
|
||||||
}
|
}
|
||||||
private static final AppConfigurationEntry USER_KERBEROS_LOGIN =
|
private static final AppConfigurationEntry USER_KERBEROS_LOGIN =
|
||||||
new AppConfigurationEntry(Krb5LoginModule.class.getName(),
|
new AppConfigurationEntry(Krb5LoginModule.class.getName(),
|
||||||
|
@ -371,6 +381,7 @@ public class UserGroupInformation {
|
||||||
KEYTAB_KERBEROS_OPTIONS.put("useKeyTab", "true");
|
KEYTAB_KERBEROS_OPTIONS.put("useKeyTab", "true");
|
||||||
KEYTAB_KERBEROS_OPTIONS.put("storeKey", "true");
|
KEYTAB_KERBEROS_OPTIONS.put("storeKey", "true");
|
||||||
KEYTAB_KERBEROS_OPTIONS.put("refreshKrb5Config", "true");
|
KEYTAB_KERBEROS_OPTIONS.put("refreshKrb5Config", "true");
|
||||||
|
KEYTAB_KERBEROS_OPTIONS.putAll(BASIC_JAAS_OPTIONS);
|
||||||
}
|
}
|
||||||
private static final AppConfigurationEntry KEYTAB_KERBEROS_LOGIN =
|
private static final AppConfigurationEntry KEYTAB_KERBEROS_LOGIN =
|
||||||
new AppConfigurationEntry(Krb5LoginModule.class.getName(),
|
new AppConfigurationEntry(Krb5LoginModule.class.getName(),
|
||||||
|
|
Loading…
Reference in New Issue