Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6054

MiniQJMHACluster should not use static port to avoid binding failure in unit test

    Details

    • Type: Improvement Improvement
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: test
    • Labels:
      None
    • Target Version/s:

      Description

      One example of the test failues: TestFailureToReadEdits

      Error Message
      
      Port in use: localhost:10003
      
      Stacktrace
      
      java.net.BindException: Port in use: localhost:10003
      	at sun.nio.ch.Net.bind(Native Method)
      	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
      	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
      	at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
      	at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:845)
      	at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:786)
      	at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:132)
      	at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:593)
      	at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:492)
      	at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:650)
      	at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:635)
      	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1283)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNode(MiniDFSCluster.java:966)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNodesAndSetConf(MiniDFSCluster.java:851)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:697)
      	at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:374)
      	at org.apache.hadoop.hdfs.MiniDFSCluster$Builder.build(MiniDFSCluster.java:355)
      	at org.apache.hadoop.hdfs.server.namenode.ha.TestFailureToReadEdits.setUpCluster(TestFailureToReadEdits.java:108)
      
      
      1. HDFS-6054.002.patch
        4 kB
        Yongjun Zhang
      2. HDFS-6054.002.patch
        4 kB
        Yongjun Zhang
      3. HDFS-6054.001.patch
        3 kB
        Yongjun Zhang

        Activity

        Brandon Li created issue -
        Yongjun Zhang made changes -
        Field Original Value New Value
        Assignee Yongjun Zhang [ yzhangal ]
        Yongjun Zhang made changes -
        Attachment HDFS-6054.001.patch [ 12696380 ]
        Yongjun Zhang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Kihwal Lee made changes -
        Target Version/s 2.7.0 [ 12327584 ]
        Component/s test [ 12312916 ]
        Yongjun Zhang made changes -
        Attachment HDFS-6054.002.patch [ 12696646 ]
        Yongjun Zhang made changes -
        Attachment HDFS-6054.002.patch [ 12696920 ]

          People

          • Assignee:
            Yongjun Zhang
            Reporter:
            Brandon Li
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development