accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject svn commit: r1415919 - in /accumulo/trunk/start/src/test: java/org/apache/accumulo/start/classloader/vfs/ java/org/apache/accumulo/test/ resources/application1/conf/ resources/default/conf/
Date Sat, 01 Dec 2012 04:58:19 GMT
Author: elserj
Date: Sat Dec  1 04:58:18 2012
New Revision: 1415919

URL: http://svn.apache.org/viewvc?rev=1415919&view=rev
Log:
ACCUMULO-890 Change the Namenode port from 8020 to 8620 to decrease the likelihood of tests
failing due to the port already being in use.

Modified:
    accumulo/trunk/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
    accumulo/trunk/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java
    accumulo/trunk/start/src/test/resources/application1/conf/accumulo-site.xml
    accumulo/trunk/start/src/test/resources/default/conf/accumulo-site.xml

Modified: accumulo/trunk/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java?rev=1415919&r1=1415918&r2=1415919&view=diff
==============================================================================
--- accumulo/trunk/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
(original)
+++ accumulo/trunk/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
Sat Dec  1 04:58:18 2012
@@ -104,7 +104,7 @@ public class AccumuloVFSClassLoaderTest 
     AccumuloContextClassLoader accl = (AccumuloContextClassLoader) acl;
     AccumuloReloadingVFSClassLoader arvcl = accl.getClassLoader(AccumuloContextClassLoader.DEFAULT_CONTEXT);
     Assert.assertEquals(1, arvcl.getFiles().length);
-    Assert.assertTrue(arvcl.getFiles()[0].getURL().toString().equals("hdfs://localhost:8020/accumulo/classpath/HelloWorld.jar"));
+    Assert.assertTrue(arvcl.getFiles()[0].getURL().toString().equals(AccumuloDFSBase.HDFS_URI
+ "/accumulo/classpath/HelloWorld.jar"));
     Class<?> clazz1 = arvcl.loadClass("test.HelloWorld");
     Object o1 = clazz1.newInstance();
     Assert.assertEquals("Hello World!", o1.toString());
@@ -146,7 +146,7 @@ public class AccumuloVFSClassLoaderTest 
     //DEFAULT CONTEXT
     AccumuloReloadingVFSClassLoader arvcl = accl.getClassLoader(AccumuloContextClassLoader.DEFAULT_CONTEXT);
     Assert.assertEquals(1, arvcl.getFiles().length);
-    Assert.assertTrue(arvcl.getFiles()[0].getURL().toString().equals("hdfs://localhost:8020/accumulo/classpath/HelloWorld.jar"));
+    Assert.assertTrue(arvcl.getFiles()[0].getURL().toString().equals(AccumuloDFSBase.HDFS_URI
+ "/accumulo/classpath/HelloWorld.jar"));
     Class<?> clazz1 = arvcl.loadClass("test.HelloWorld");
     Object o1 = clazz1.newInstance();
     Assert.assertEquals("Hello World!", o1.toString());
@@ -154,7 +154,7 @@ public class AccumuloVFSClassLoaderTest 
     //APPLICATION CONTEXT
     AccumuloReloadingVFSClassLoader arvcl2 = accl.getClassLoader("application1");
     Assert.assertEquals(1, arvcl2.getFiles().length);
-    Assert.assertTrue(arvcl2.getFiles()[0].getURL().toString().equals("hdfs://localhost:8020/application1/classpath/HelloWorld.jar"));
+    Assert.assertTrue(arvcl2.getFiles()[0].getURL().toString().equals(AccumuloDFSBase.HDFS_URI
+ "/application1/classpath/HelloWorld.jar"));
     Class<?> clazz2 = arvcl2.loadClass("test.HelloWorld");
     Object o2 = clazz2.newInstance();
     Assert.assertEquals("Hello World!", o2.toString());

Modified: accumulo/trunk/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java?rev=1415919&r1=1415918&r2=1415919&view=diff
==============================================================================
--- accumulo/trunk/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java (original)
+++ accumulo/trunk/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java Sat Dec
 1 04:58:18 2012
@@ -42,7 +42,11 @@ public class AccumuloDFSBase {
     System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog");
   }
 
-  protected static final String HDFS_URI = "hdfs://localhost:8020";
+  // Choose an IANA unassigned port
+  // http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
+  protected static final Integer HDFS_PORT = 8620;
+  
+  protected static final String HDFS_URI = "hdfs://localhost:" + HDFS_PORT;
   
   protected static Configuration conf = null;
   protected static DefaultFileSystemManager vfs = null;
@@ -82,7 +86,7 @@ public class AccumuloDFSBase {
     conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 1024 * 100); //100K blocksize
     
     try {
-      cluster = new MiniDFSCluster(8020, conf, 1, true, true, true, null, null, null, null);
+      cluster = new MiniDFSCluster(HDFS_PORT, conf, 1, true, true, true, null, null, null,
null);
       cluster.waitActive();
     } catch (IOException e) {
       throw new RuntimeException("Error setting up mini cluster", e);

Modified: accumulo/trunk/start/src/test/resources/application1/conf/accumulo-site.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/test/resources/application1/conf/accumulo-site.xml?rev=1415919&r1=1415918&r2=1415919&view=diff
==============================================================================
--- accumulo/trunk/start/src/test/resources/application1/conf/accumulo-site.xml (original)
+++ accumulo/trunk/start/src/test/resources/application1/conf/accumulo-site.xml Sat Dec  1
04:58:18 2012
@@ -106,7 +106,7 @@
 	</property>
 	<property>
 		<name>classloader.vfs.context.classpath.system</name>
-		<value>hdfs://localhost:8020/accumulo/classpath</value>
+		<value>hdfs://localhost:8620/accumulo/classpath</value>
 	</property>
 	<property>
 		<name>classloader.vfs.context.names</name>
@@ -114,7 +114,7 @@
 	</property>
 	<property>
 		<name>classloader.vfs.context.classpath.application1</name>
-		<value>hdfs://localhost:8020/application1/classpath</value>
+		<value>hdfs://localhost:8620/application1/classpath</value>
 	</property>
 
 </configuration>

Modified: accumulo/trunk/start/src/test/resources/default/conf/accumulo-site.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/start/src/test/resources/default/conf/accumulo-site.xml?rev=1415919&r1=1415918&r2=1415919&view=diff
==============================================================================
--- accumulo/trunk/start/src/test/resources/default/conf/accumulo-site.xml (original)
+++ accumulo/trunk/start/src/test/resources/default/conf/accumulo-site.xml Sat Dec  1 04:58:18
2012
@@ -106,7 +106,7 @@
 	</property>
 	<property>
 		<name>classloader.vfs.context.classpath.system</name>
-		<value>hdfs://localhost:8020/accumulo/classpath</value>
+		<value>hdfs://localhost:8620/accumulo/classpath</value>
 	</property>
 
 </configuration>



Mime
View raw message