virajjasani edited a comment on pull request #4028:
URL: https://github.com/apache/hadoop/pull/4028#issuecomment-1056772509


   @ayushtkn @tomscut  With the latest changes, here is the result of a stretch 
test on MacOS:
   
   ```
   java.lang.IllegalStateException: 50000 free ports could not be acquired.
   
        at org.apache.hadoop.net.NetUtils.getFreeSocketPorts(NetUtils.java:1072)
        at 
org.apache.hadoop.hdfs.qjournal.TestMiniJournalCluster.testStartStopWithPorts(TestMiniJournalCluster.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
   
   ```
   
   The patch used:
   ```
   diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestMiniJournalCluster.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestMiniJournalCluster.java
   index daff40d898f..d35536a37a0 100644
   --- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestMiniJournalCluster.java
   +++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestMiniJournalCluster.java
   @@ -99,7 +99,7 @@ public void testStartStopWithPorts() throws Exception {
                  .setRpcPorts(8481, 8482, 8483).build();
            });
    
   -    final Set<Integer> httpAndRpcPorts = NetUtils.getFreeSocketPorts(6);
   +    final Set<Integer> httpAndRpcPorts = NetUtils.getFreeSocketPorts(50000);
        LOG.info("Free socket ports: {}", httpAndRpcPorts);
    
        final int[] httpPorts = new int[3];
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to