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:
parent
1a118d6a32
commit
1c0231cc74
|
@ -418,6 +418,9 @@ Release 0.23.3 - UNRELEASED
|
||||||
MAPREDUCE-4169. Container Logs appear in unsorted order (Jonathan Eagles
|
MAPREDUCE-4169. Container Logs appear in unsorted order (Jonathan Eagles
|
||||||
via bobby)
|
via bobby)
|
||||||
|
|
||||||
|
MAPREDUCE-4189. TestContainerManagerSecurity is failing (Devaraj K via
|
||||||
|
bobby)
|
||||||
|
|
||||||
Release 0.23.2 - UNRELEASED
|
Release 0.23.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -47,6 +47,7 @@ import org.apache.hadoop.io.DataInputBuffer;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.net.NetUtils;
|
import org.apache.hadoop.net.NetUtils;
|
||||||
import org.apache.hadoop.security.AccessControlException;
|
import org.apache.hadoop.security.AccessControlException;
|
||||||
|
import org.apache.hadoop.security.SecurityUtil;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
import org.apache.hadoop.security.token.Token;
|
import org.apache.hadoop.security.token.Token;
|
||||||
import org.apache.hadoop.yarn.api.AMRMProtocol;
|
import org.apache.hadoop.yarn.api.AMRMProtocol;
|
||||||
|
@ -401,7 +402,8 @@ public class TestContainerManagerSecurity {
|
||||||
appToken.setService(new Text(schedulerAddr.getHostName() + ":"
|
appToken.setService(new Text(schedulerAddr.getHostName() + ":"
|
||||||
+ schedulerAddr.getPort()));
|
+ schedulerAddr.getPort()));
|
||||||
currentUser.addToken(appToken);
|
currentUser.addToken(appToken);
|
||||||
|
SecurityUtil.setTokenService(appToken, schedulerAddr);
|
||||||
|
|
||||||
AMRMProtocol scheduler = currentUser
|
AMRMProtocol scheduler = currentUser
|
||||||
.doAs(new PrivilegedAction<AMRMProtocol>() {
|
.doAs(new PrivilegedAction<AMRMProtocol>() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue