Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18226

Disable reverse DNS lookup at HMaster and use the hostname provided by RegionServer

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0, 2.0.0-alpha-2, 2.0.0
    • None
    • None
    • Reviewed
    • Hide
      The following config is added by this JIRA:

      hbase.regionserver.hostname.disable.master.reversedns

      This config is for experts: don't set its value unless you really know what you are doing.
      When set to true, regionserver will use the current node hostname for the servername and HMaster will skip reverse DNS lookup and use the hostname sent by regionserver instead. Note that this config and hbase.regionserver.hostname are mutually exclusive. See https://issues.apache.org/jira/browse/HBASE-18226 for more details.

      Caution: please make sure rolling upgrade succeeds before turning on this feature.
      Show
      The following config is added by this JIRA: hbase.regionserver.hostname.disable.master.reversedns This config is for experts: don't set its value unless you really know what you are doing. When set to true, regionserver will use the current node hostname for the servername and HMaster will skip reverse DNS lookup and use the hostname sent by regionserver instead. Note that this config and hbase.regionserver.hostname are mutually exclusive. See https://issues.apache.org/jira/browse/HBASE-18226 for more details. Caution: please make sure rolling upgrade succeeds before turning on this feature.

    Description

      Description updated:

      In some unusual network environment, forward DNS lookup is supported while reverse DNS lookup may not work properly.

      This JIRA is to address that HMaster uses the hostname passed from RS instead of doing reverse DNS lookup to tells RS which hostname to use during reportForDuty() . This has already been implemented by HBASE-12954 by adding "useThisHostnameInstead" field in RegionServerStatusProtos.

      Currently "useThisHostnameInstead" is optional and RS by default only passes port, server start code and server current time info to HMaster during RS reportForDuty(). In order to use this field, users currently need to specify "hbase.regionserver.hostname" on every regionserver node's hbase-site.xml. This causes some trouble in

      1. some deployments managed by some management tools like Ambari, which maintains the same copy of hbase-site.xml across all the nodes.

      2. HBASE-12954 is targeting multihomed hosts, which users want to manually set the hostname value for each node. In the other cases (not multihomed), I just want RS to use the hostname return by the node and set it in useThisHostnameInstead and pass to HMaster during reportForDuty().

      I would like to introduce a setting that if the setting is set to true, "useThisHostnameInstead" will be set to the hostname RS gets from the node. Then HMaster will skip reverse DNS lookup because it sees "useThisHostnameInstead" field is set in the request.

      "hbase.regionserver.hostname.reported.to.master", is it a good name?

      --------------------
      Regarding the hostname returned by the RS node, I read the source code again (including hadoop-common dns.java). By default RS gets hostname by calling InetAddress.getLocalHost().getCanonicalHostName(). If users specify "hbase.regionserver.dns.interface" or "hbase.regionserver.dns.nameserver" or some underlying system configuration changes (eg. modifying /etc/nsswitch.conf), it may first read from DNS or other sources instead of first checking /etc/hosts file.

      Attachments

        1. HBASE-18226.001.patch
          4 kB
          Duo Xu
        2. HBASE-18226.002.patch
          4 kB
          Duo Xu
        3. HBASE-18226.003.patch
          8 kB
          Duo Xu
        4. HBASE-18226.004.patch
          8 kB
          Duo Xu
        5. HBASE-18226.005.patch
          9 kB
          Duo Xu
        6. HBASE-18226.006.patch
          9 kB
          Duo Xu
        7. HBASE-18226-branch-1.patch
          8 kB
          Duo Xu
        8. 18226.branch-1.txt
          8 kB
          Ted Yu

        Issue Links

          Activity

            People

              onpduo Duo Xu
              onpduo Duo Xu
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: