MAPREDUCE-6477. Replace usage of deprecated NameNode.DEFAULT_PORT in TestFileSystem. Contributed by Mingliang Liu.
This commit is contained in:
parent
07f304467d
commit
941001bfa6
@ -381,6 +381,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
MAPREDUCE-6443. Add JvmPauseMonitor to JobHistoryServer. (Robert Kanter
|
MAPREDUCE-6443. Add JvmPauseMonitor to JobHistoryServer. (Robert Kanter
|
||||||
via junping_du)
|
via junping_du)
|
||||||
|
|
||||||
|
MAPREDUCE-6477. Replace usage of deprecated NameNode.DEFAULT_PORT in
|
||||||
|
TestFileSystem. (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
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.conf.Configured;
|
import org.apache.hadoop.conf.Configured;
|
||||||
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.client.HdfsClientConfigKeys;
|
||||||
import org.apache.hadoop.fs.shell.CommandFormat;
|
import org.apache.hadoop.fs.shell.CommandFormat;
|
||||||
import org.apache.hadoop.io.LongWritable;
|
import org.apache.hadoop.io.LongWritable;
|
||||||
import org.apache.hadoop.io.SequenceFile;
|
import org.apache.hadoop.io.SequenceFile;
|
||||||
@ -510,10 +510,10 @@ public FileSystem run() throws IOException {
|
|||||||
|
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
runTestCache(NameNode.DEFAULT_PORT);
|
runTestCache(HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT);
|
||||||
} catch(java.net.BindException be) {
|
} catch(java.net.BindException be) {
|
||||||
LOG.warn("Cannot test NameNode.DEFAULT_PORT (="
|
LOG.warn("Cannot test HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT (="
|
||||||
+ NameNode.DEFAULT_PORT + ")", be);
|
+ HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT + ")", be);
|
||||||
}
|
}
|
||||||
|
|
||||||
runTestCache(0);
|
runTestCache(0);
|
||||||
@ -537,11 +537,11 @@ static void runTestCache(int port) throws Exception {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (port == NameNode.DEFAULT_PORT) {
|
if (port == HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT) {
|
||||||
//test explicit default port
|
//test explicit default port
|
||||||
URI uri2 = new URI(uri.getScheme(), uri.getUserInfo(),
|
URI uri2 = new URI(uri.getScheme(), uri.getUserInfo(),
|
||||||
uri.getHost(), NameNode.DEFAULT_PORT, uri.getPath(),
|
uri.getHost(), HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT,
|
||||||
uri.getQuery(), uri.getFragment());
|
uri.getPath(), uri.getQuery(), uri.getFragment());
|
||||||
LOG.info("uri2=" + uri2);
|
LOG.info("uri2=" + uri2);
|
||||||
FileSystem fs = FileSystem.get(uri2, conf);
|
FileSystem fs = FileSystem.get(uri2, conf);
|
||||||
checkPath(cluster, fs);
|
checkPath(cluster, fs);
|
||||||
|
Loading…
Reference in New Issue
Block a user