Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
MAPREDUCE-5261. Fix issues in TestRMContainerAllocator after YARN-617…
Browse files Browse the repository at this point in the history
…. Contributed by Omkar Vinit Joshi.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1485079 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
vinoduec committed May 22, 2013
1 parent 1c9e973 commit af2a5f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class SecurityUtil {
* For use only by tests and initialization
*/
@InterfaceAudience.Private
static void setTokenServiceUseIp(boolean flag) {
public static void setTokenServiceUseIp(boolean flag) {
useIpForTokenService = flag;
hostResolver = !useIpForTokenService
? new QualifiedHostResolver()
Expand Down
3 changes: 3 additions & 0 deletions hadoop-mapreduce-project/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ Release 2.0.5-beta - UNRELEASED
MAPREDUCE-5257. Fix issues in TestContainerLauncherImpl after YARN-617.
(Omkar Vinit Joshi via vinodkv)

MAPREDUCE-5261. Fix issues in TestRMContainerAllocator after YARN-617.
(Omkar Vinit Joshi via vinodkv)

Release 2.0.4-alpha - 2013-04-25

INCOMPATIBLE CHANGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.CommonConfigurationKeys;
import org.apache.hadoop.mapreduce.MRJobConfig;
import org.apache.hadoop.mapreduce.v2.api.records.JobId;
import org.apache.hadoop.mapreduce.v2.api.records.JobState;
Expand All @@ -71,6 +72,7 @@
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.net.NetworkTopology;
import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.yarn.Clock;
import org.apache.hadoop.yarn.ClusterInfo;
import org.apache.hadoop.yarn.SystemClock;
Expand Down Expand Up @@ -100,6 +102,7 @@
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler;
import org.apache.hadoop.yarn.util.BuilderUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

@SuppressWarnings("unchecked")
Expand All @@ -110,9 +113,17 @@ public class TestRMContainerAllocator {
static final RecordFactory recordFactory = RecordFactoryProvider
.getRecordFactory(null);

@Before
public void setup() {
// This is done to make sure token service doesn't use ip.
SecurityUtil.setTokenServiceUseIp(false);
}

@After
public void tearDown() {
DefaultMetricsSystem.shutdown();
SecurityUtil.setTokenServiceUseIp(
CommonConfigurationKeys.HADOOP_SECURITY_TOKEN_SERVICE_USE_IP_DEFAULT);
}

@Test
Expand Down

0 comments on commit af2a5f6

Please sign in to comment.