hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1354790 - /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestFileSystem.java
Date Thu, 28 Jun 2012 01:11:26 GMT
Author: szetszwo
Date: Thu Jun 28 01:11:22 2012
New Revision: 1354790

URL: http://svn.apache.org/viewvc?rev=1354790&view=rev
Log:
HDFS-3576. Move the definition of the constant NameNode.DEFAULT_PORT to DFSConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT.
 Contributed by Brandon Li

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestFileSystem.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestFileSystem.java?rev=1354790&r1=1354789&r2=1354790&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestFileSystem.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestFileSystem.java
Thu Jun 28 01:11:22 2012
@@ -39,6 +39,7 @@ import junit.framework.TestCase;
 import org.apache.commons.logging.Log;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.server.namenode.NameNode;
 import org.apache.hadoop.fs.shell.CommandFormat;
@@ -509,10 +510,10 @@ public class TestFileSystem extends Test
     
     {
       try {
-        runTestCache(NameNode.DEFAULT_PORT);
+        runTestCache(DFSConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT);
       } catch(java.net.BindException be) {
-        LOG.warn("Cannot test NameNode.DEFAULT_PORT (="
-            + NameNode.DEFAULT_PORT + ")", be);
+        LOG.warn("Cannot test NameNode's default RPC port (="
+            + DFSConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT + ")", be);
       }
 
       runTestCache(0);
@@ -535,11 +536,11 @@ public class TestFileSystem extends Test
         }
       }
       
-      if (port == NameNode.DEFAULT_PORT) {
+      if (port == DFSConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT) {
         //test explicit default port
-        URI uri2 = new URI(uri.getScheme(), uri.getUserInfo(),
-            uri.getHost(), NameNode.DEFAULT_PORT, uri.getPath(),
-            uri.getQuery(), uri.getFragment());  
+        URI uri2 = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(),
+            DFSConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT, uri.getPath(),
+            uri.getQuery(), uri.getFragment());
         LOG.info("uri2=" + uri2);
         FileSystem fs = FileSystem.get(uri2, conf);
         checkPath(cluster, fs);



Mime
View raw message