Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-473

Hook InetAddress.getLocalHost().getHostName() to support cluster simulatation.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • all

    Description

      I have been running a simulation for weeks now (and also a 30 machine crawl). To make it work I need to sometimes
      let DataNodes, and TaskTrackers think they have a different machine-name than the one in InetAddress.getLocalHost()

      The patch is:

      1) replace InetAddress.getLocalHost().getHostName() with xxxx
      1.a)xxxx could be "conf.get("inetaddress.localhost.name",InetAddress.getLocalHost().getHostName())"
      1.b)or, xxxx could be a static call, I chose the latter: "InetAddressWrapper.getLocalHostName(conf)"
      2) InetAddressWrapper.getLocalHostName(conf) checks the config for a hostname, and then calls InetAddress.getLocalHost().getHostName()

      There's 3 places where it happens:
      DataNode
      DFSClient
      TaskTracker

      I did not patch the two tests that call InetAddress because they are not really using hostname.

      Attachments

        1. InetAddressWrapper.patch
          3 kB
          alan wootton
        2. conf_getHostName.patch
          4 kB
          alan wootton

        Activity

          People

            omalley Owen O'Malley
            awootton alan wootton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: