You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/03/02 10:37:43 UTC

[GitHub] [hadoop] virajjasani edited a comment on pull request #4028: HDFS-16481. Provide support to set Http and Rpc ports in MiniJournalCluster

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


   @ayushtkn 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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org