hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r951796 - in /hbase/branches/0.20: CHANGES.txt src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java
Date Sun, 06 Jun 2010 01:41:09 GMT
Author: todd
Date: Sun Jun  6 01:41:09 2010
New Revision: 951796

URL: http://svn.apache.org/viewvc?rev=951796&view=rev
Log:
HBASE-2483. Tests should use an ephemeral port for the master

Modified:
    hbase/branches/0.20/CHANGES.txt
    hbase/branches/0.20/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java

Modified: hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.20/CHANGES.txt?rev=951796&r1=951795&r2=951796&view=diff
==============================================================================
--- hbase/branches/0.20/CHANGES.txt (original)
+++ hbase/branches/0.20/CHANGES.txt Sun Jun  6 01:41:09 2010
@@ -23,6 +23,8 @@ Release 0.20.5 - Sat Jun  5 09:15:06 PDT
    HBASE-2616  TestHRegion.testWritesWhileGetting flaky on trunk
                (Ryan Rawson via Stack)
    HBASE-2615  M/R on bulk imported tables
+   HBASE-2483  Tests should use an ephemeral port for the master
+               (Jonathan Gray via Todd Lipcon)
 
   IMPROVEMENTS
    HBASE-2567  [stargate] minimize differences between 0.20 branch and trunk

Modified: hbase/branches/0.20/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.20/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java?rev=951796&r1=951795&r2=951796&view=diff
==============================================================================
--- hbase/branches/0.20/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java (original)
+++ hbase/branches/0.20/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java Sun Jun  6
01:41:09 2010
@@ -50,26 +50,14 @@ public class MiniHBaseCluster implements
   public MiniHBaseCluster(HBaseConfiguration conf, int numRegionServers) 
   throws IOException {
     this.conf = conf;
+    conf.set(MASTER_PORT, "0");
     init(numRegionServers);
   }
 
   private void init(final int nRegionNodes) throws IOException {
     try {
-      // start up a LocalHBaseCluster
-      while (true) {
-        try {
-          hbaseCluster = new LocalHBaseCluster(conf, nRegionNodes);
-          hbaseCluster.startup();
-        } catch (BindException e) {
-          //this port is already in use. try to use another (for multiple testing)
-          int port = conf.getInt(MASTER_PORT, DEFAULT_MASTER_PORT);
-          LOG.info("Failed binding Master to port: " + port, e);
-          port++;
-          conf.setInt(MASTER_PORT, port);
-          continue;
-        }
-        break;
-      }
+      hbaseCluster = new LocalHBaseCluster(conf, nRegionNodes);
+      hbaseCluster.startup();
     } catch(IOException e) {
       shutdown();
       throw e;



Mime
View raw message