Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3748

TestDFSUtil#testHANameNodesWithFederation failed because of misuse toString to generate hostname:port

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.0.0-alpha
    • None
    • federation, ha, test
    • Use InetSocketAddress.getHostName() and InetSocketAddress.getPort() to make up the hostname:port format.

    Description

      In the test case TestDFSUtil#testHANameNodesWithFederation, it misused InetSocketAddress.toString() to generate hostname:port format data. It cause the following assert failure when run this test case.
      assertEquals(NS1_NN1_HOST, map.get("ns1").get("ns1-nn1").toString());
      assertEquals(NS1_NN2_HOST, map.get("ns1").get("ns1-nn2").toString());
      assertEquals(NS2_NN1_HOST, map.get("ns2").get("ns2-nn1").toString());
      assertEquals(NS2_NN2_HOST, map.get("ns2").get("ns2-nn2").toString());

      Attachments

        1. HADOOP-3748.patch
          1 kB
          Yanbo Liang

        Activity

          People

            Unassigned Unassigned
            yanboliang Yanbo Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: