MAPREDUCE-6483. Replace deprecated method NameNode.getUri() with DFSUtilClient.getNNUri() in TestMRCredentials. Contributed by Mingliang Liu.

This commit is contained in:
Haohui Mai 2015-09-18 13:36:09 -07:00
parent f97dc034fe
commit 602335dfe6
2 changed files with 5 additions and 2 deletions

View File

@ -384,6 +384,9 @@ Release 2.8.0 - UNRELEASED
MAPREDUCE-6477. Replace usage of deprecated NameNode.DEFAULT_PORT in MAPREDUCE-6477. Replace usage of deprecated NameNode.DEFAULT_PORT in
TestFileSystem. (Mingliang Liu via wheat9) TestFileSystem. (Mingliang Liu via wheat9)
MAPREDUCE-6483. Replace deprecated method NameNode.getUri() with
DFSUtilClient.getNNUri() in TestMRCredentials. (Mingliang Liu via wheat9)
OPTIMIZATIONS OPTIMIZATIONS
MAPREDUCE-6376. Add avro binary support for jhist files (Ray Chiang via MAPREDUCE-6376. Add avro binary support for jhist files (Ray Chiang via

View File

@ -29,6 +29,7 @@
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.hdfs.DFSUtilClient;
import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.hdfs.server.namenode.NameNode;
import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.JobConf;
@ -111,9 +112,8 @@ public void test () throws IOException {
Configuration jobConf = new JobConf(mrCluster.getConfig()); Configuration jobConf = new JobConf(mrCluster.getConfig());
// provide namenodes names for the job to get the delegation tokens for // provide namenodes names for the job to get the delegation tokens for
//String nnUri = dfsCluster.getNameNode().getUri(namenode).toString();
NameNode nn = dfsCluster.getNameNode(); NameNode nn = dfsCluster.getNameNode();
URI nnUri = NameNode.getUri(nn.getNameNodeAddress()); URI nnUri = DFSUtilClient.getNNUri(nn.getNameNodeAddress());
jobConf.set(JobContext.JOB_NAMENODES, nnUri + "," + nnUri.toString()); jobConf.set(JobContext.JOB_NAMENODES, nnUri + "," + nnUri.toString());