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

Don't do DNS resolving in .META. scanner for each row

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.19.3, 0.20.1
    • 0.20.2, 0.90.0
    • None
    • None
    • Reviewed

    Description

      While debugging a slow HBase on my new Mac, I found that my issue was that DNS resolving was taking 10 seconds. Since Java 1.5, many people complained about that and there's even a very commented issue (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5092063) that's closed but still "active". In fact the real issue here is that when you a bad DNS resolving (my router was acting on me, it's dead now) it waits for 10 seconds or something like that (see previous link). So I was running PE and my meta scanner was being slower and slower. In fact, everything was slow, even starting the shell. So using jps I found that we are resolving DNS for each scanned row in META in checkAssigned here:

      if (sa != null && sa.length() > 0) {
        serverName = HServerInfo.getServerName(sa, sc);
      } 
      HServerInfo storedInfo = null;
      

      HSI.getServerName here creates a new HServerAddress which resolves DNS in its depths and it's not even necessary, we use it just to split the server IP and port.

      Attachments

        1. HBASE-1918.patch
          0.9 kB
          Jean-Daniel Cryans
        2. HBASE-1918-2.patch
          1 kB
          Jean-Daniel Cryans
        3. HBASE-1918-3.patch
          1 kB
          Jean-Daniel Cryans

        Activity

          People

            jdcryans Jean-Daniel Cryans
            jdcryans Jean-Daniel Cryans
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: