From 09715035221096af2f7aad76aceeffcac1ff4790 Mon Sep 17 00:00:00 2001 From: Haohui Mai Date: Fri, 18 Sep 2015 13:36:09 -0700 Subject: [PATCH] MAPREDUCE-6483. Replace deprecated method NameNode.getUri() with DFSUtilClient.getNNUri() in TestMRCredentials. Contributed by Mingliang Liu. --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../apache/hadoop/mapreduce/security/TestMRCredentials.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 2957ffe702d..84a83967e2e 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -112,6 +112,9 @@ Release 2.8.0 - UNRELEASED MAPREDUCE-6477. Replace usage of deprecated NameNode.DEFAULT_PORT in TestFileSystem. (Mingliang Liu via wheat9) + MAPREDUCE-6483. Replace deprecated method NameNode.getUri() with + DFSUtilClient.getNNUri() in TestMRCredentials. (Mingliang Liu via wheat9) + OPTIMIZATIONS MAPREDUCE-6376. Add avro binary support for jhist files (Ray Chiang via diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestMRCredentials.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestMRCredentials.java index 72639e23dec..85d60f0ba10 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestMRCredentials.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestMRCredentials.java @@ -29,6 +29,7 @@ import java.net.URI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.hdfs.DFSUtilClient; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.mapred.JobConf; @@ -111,9 +112,8 @@ public class TestMRCredentials { Configuration jobConf = new JobConf(mrCluster.getConfig()); // provide namenodes names for the job to get the delegation tokens for - //String nnUri = dfsCluster.getNameNode().getUri(namenode).toString(); NameNode nn = dfsCluster.getNameNode(); - URI nnUri = NameNode.getUri(nn.getNameNodeAddress()); + URI nnUri = DFSUtilClient.getNNUri(nn.getNameNodeAddress()); jobConf.set(JobContext.JOB_NAMENODES, nnUri + "," + nnUri.toString());