YARN-1085. Addendum patch to address issues with the earlier patch.
svn merge --ignore-ancestry -c 1517721 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1517722 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
922647fe26
commit
ba89f8efc7
|
@ -129,6 +129,15 @@ public class JHAdminConfig {
|
|||
public static final int DEFAULT_MR_HISTORY_WEBAPP_PORT = 19888;
|
||||
public static final String DEFAULT_MR_HISTORY_WEBAPP_ADDRESS =
|
||||
"0.0.0.0:" + DEFAULT_MR_HISTORY_WEBAPP_PORT;
|
||||
|
||||
/**The kerberos principal to be used for spnego filter for history server*/
|
||||
public static final String MR_WEBAPP_SPNEGO_USER_NAME_KEY =
|
||||
MR_HISTORY_PREFIX + "webapp.spnego-principal";
|
||||
|
||||
/** The kerberos keytab to be used for spnego filter for history server*/
|
||||
public static final String MR_WEBAPP_SPNEGO_KEYTAB_FILE_KEY =
|
||||
MR_HISTORY_PREFIX + "webapp.spnego-keytab-file";
|
||||
|
||||
/*
|
||||
* HS Service Authorization
|
||||
*/
|
||||
|
|
|
@ -153,9 +153,9 @@ public class HistoryClientService extends AbstractService {
|
|||
.$for("jobhistory", HistoryClientService.class, this, "ws")
|
||||
.with(conf)
|
||||
.withHttpSpnegoKeytabKey(
|
||||
YarnConfiguration.JHS_WEBAPP_SPNEGO_KEYTAB_FILE_KEY)
|
||||
JHAdminConfig.MR_WEBAPP_SPNEGO_KEYTAB_FILE_KEY)
|
||||
.withHttpSpnegoPrincipalKey(
|
||||
YarnConfiguration.JHS_WEBAPP_SPNEGO_USER_NAME_KEY)
|
||||
JHAdminConfig.MR_WEBAPP_SPNEGO_USER_NAME_KEY)
|
||||
.at(NetUtils.getHostPortString(bindAddress)).start(webApp);
|
||||
conf.updateConnectAddr(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS,
|
||||
webApp.getListenerAddress());
|
||||
|
|
|
@ -214,11 +214,13 @@ public class YarnConfiguration extends Configuration {
|
|||
public static final String RM_KEYTAB =
|
||||
RM_PREFIX + "keytab";
|
||||
|
||||
/**The kerberos principal to be used for spnego filter for RM.*/
|
||||
public static final String RM_WEBAPP_SPNEGO_USER_NAME_KEY =
|
||||
RM_PREFIX + "webapp.spnego-principal";
|
||||
|
||||
public static final String RM_WEBAPP_SPENGO_KEYTAB_FILE_KEY =
|
||||
RM_PREFIX + "webapp.spengo-keytab-file";
|
||||
/**The kerberos keytab to be used for spnego filter for RM.*/
|
||||
public static final String RM_WEBAPP_SPNEGO_KEYTAB_FILE_KEY =
|
||||
RM_PREFIX + "webapp.spnego-keytab-file";
|
||||
|
||||
/** How long to wait until a container is considered dead.*/
|
||||
public static final String RM_CONTAINER_ALLOC_EXPIRY_INTERVAL_MS =
|
||||
|
@ -615,9 +617,11 @@ public class YarnConfiguration extends Configuration {
|
|||
public static final String NM_USER_HOME_DIR =
|
||||
NM_PREFIX + "user-home-dir";
|
||||
|
||||
/**The kerberos principal to be used for spnego filter for NM.*/
|
||||
public static final String NM_WEBAPP_SPNEGO_USER_NAME_KEY =
|
||||
NM_PREFIX + "webapp.spnego-principal";
|
||||
|
||||
/**The kerberos keytab to be used for spnego filter for NM.*/
|
||||
public static final String NM_WEBAPP_SPNEGO_KEYTAB_FILE_KEY =
|
||||
NM_PREFIX + "webapp.spnego-keytab-file";
|
||||
|
||||
|
@ -750,12 +754,6 @@ public class YarnConfiguration extends Configuration {
|
|||
// Other Configs
|
||||
////////////////////////////////
|
||||
|
||||
public static final String JHS_WEBAPP_SPNEGO_USER_NAME_KEY =
|
||||
"jobhistoryserver.webapp.spnego-principal";
|
||||
|
||||
public static final String JHS_WEBAPP_SPNEGO_KEYTAB_FILE_KEY =
|
||||
"jobhistoryserver.webapp.spnego-keytab-file";
|
||||
|
||||
/**
|
||||
* The interval of the yarn client's querying application state after
|
||||
* application submission. The unit is millisecond.
|
||||
|
|
|
@ -217,11 +217,13 @@ public class WebApps {
|
|||
{
|
||||
if (UserGroupInformation.isSecurityEnabled()) {
|
||||
boolean initSpnego = true;
|
||||
if (spnegoPrincipalKey == null || spnegoPrincipalKey.isEmpty()) {
|
||||
if (spnegoPrincipalKey == null
|
||||
|| conf.get(spnegoPrincipalKey, "").isEmpty()) {
|
||||
LOG.warn("Principal for spnego filter is not set");
|
||||
initSpnego = false;
|
||||
}
|
||||
if (spnegoKeytabKey == null || spnegoKeytabKey.isEmpty()) {
|
||||
if (spnegoKeytabKey == null
|
||||
|| conf.get(spnegoKeytabKey, "").isEmpty()) {
|
||||
LOG.warn("Keytab for spnego filter is not set");
|
||||
initSpnego = false;
|
||||
}
|
||||
|
|
|
@ -584,7 +584,7 @@ public class ResourceManager extends CompositeService implements Recoverable {
|
|||
.withHttpSpnegoPrincipalKey(
|
||||
YarnConfiguration.RM_WEBAPP_SPNEGO_USER_NAME_KEY)
|
||||
.withHttpSpnegoKeytabKey(
|
||||
YarnConfiguration.RM_WEBAPP_SPENGO_KEYTAB_FILE_KEY)
|
||||
YarnConfiguration.RM_WEBAPP_SPNEGO_KEYTAB_FILE_KEY)
|
||||
.at(this.conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
|
||||
YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS));
|
||||
String proxyHostAndPort = YarnConfiguration.getProxyHostAndPort(conf);
|
||||
|
|
Loading…
Reference in New Issue