hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1504085 - /hama/trunk/core/src/main/java/org/apache/hama/util/BSPNetUtils.java
Date Wed, 17 Jul 2013 12:14:43 GMT
Author: edwardyoon
Date: Wed Jul 17 12:14:42 2013
New Revision: 1504085

URL: http://svn.apache.org/r1504085
Log:
Remove unnecessary dependency

Modified:
    hama/trunk/core/src/main/java/org/apache/hama/util/BSPNetUtils.java

Modified: hama/trunk/core/src/main/java/org/apache/hama/util/BSPNetUtils.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/util/BSPNetUtils.java?rev=1504085&r1=1504084&r2=1504085&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/util/BSPNetUtils.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/util/BSPNetUtils.java Wed Jul 17 12:14:42
2013
@@ -26,7 +26,6 @@ import java.net.UnknownHostException;
 import java.util.NoSuchElementException;
 
 import org.apache.hama.Constants;
-import org.apache.mina.util.AvailablePortFinder;
 
 /**
  * NetUtils for our needs.
@@ -61,7 +60,7 @@ public class BSPNetUtils {
    */
   public static int getFreePort(int pStartPort) {
     int startPort = pStartPort;
-    while (!AvailablePortFinder.available(startPort)) {
+    while (!available(startPort)) {
       startPort++;
     }
     return startPort;
@@ -92,7 +91,7 @@ public class BSPNetUtils {
    * @param port the port to check for availability
    */
   public static boolean available(int port) {
-    if (port < Constants.DEFAULT_PEER_PORT || port > MAX_PORT_NUMBER) {
+    if (port < 1000 || port > MAX_PORT_NUMBER) {
       throw new IllegalArgumentException("Invalid start port: " + port);
     }
 



Mime
View raw message