MAPREDUCE-4189. TestContainerManagerSecurity is failing (Devaraj K via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1331046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-04-26 19:40:48 +00:00
parent 1a118d6a32
commit 1c0231cc74
2 changed files with 6 additions and 1 deletions

View File

@ -418,6 +418,9 @@ Release 0.23.3 - UNRELEASED
MAPREDUCE-4169. Container Logs appear in unsorted order (Jonathan Eagles
via bobby)
MAPREDUCE-4189. TestContainerManagerSecurity is failing (Devaraj K via
bobby)
Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -47,6 +47,7 @@
import org.apache.hadoop.io.Text;
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.security.AccessControlException;
import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.yarn.api.AMRMProtocol;
@ -401,7 +402,8 @@ private AMRMProtocol submitAndRegisterApplication(
appToken.setService(new Text(schedulerAddr.getHostName() + ":"
+ schedulerAddr.getPort()));
currentUser.addToken(appToken);
SecurityUtil.setTokenService(appToken, schedulerAddr);
AMRMProtocol scheduler = currentUser
.doAs(new PrivilegedAction<AMRMProtocol>() {
@Override