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

Webhdfs client leaks active NameNode connections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • webhdfs
    • None
    • Reviewed

    Description

      The attached script simulates a process opening ~50 files via webhdfs and performing random reads. Note that there are at most 50 concurrent reads, and all webhdfs sessions are kept open. Each read is ~64k at a random position.

      The script periodically (once per second) shells into the NameNode and produces a summary of the socket states. For my test cluster with 5 nodes, it took ~30 seconds for the NameNode to have ~25000 active connections and fails.

      It appears that each request to the webhdfs client is opening a new connection to the NameNode and keeping it open after the request is complete. If the process continues to run, eventually (~30-60 seconds), all of the open connections are closed and the NameNode recovers.

      This smells like SoftReference reaping. Are we using SoftReferences in the webhdfs client to cache NameNode connections but never re-using them?

      Attachments

        1. HDFS-8855.4.patch
          18 kB
          Xiaobing Zhou
        2. HDFS-8855.3.patch
          8 kB
          Xiaobing Zhou
        3. HDFS-8855.2.patch
          8 kB
          Xiaobing Zhou
        4. HDFS-8855.1.patch
          3 kB
          Xiaobing Zhou
        5. HDFS-8855.009.patch
          21 kB
          Xiaobing Zhou
        6. HDFS-8855.008.patch
          21 kB
          Xiaobing Zhou
        7. HDFS-8855.007.patch
          20 kB
          Xiaobing Zhou
        8. HDFS-8855.006.patch
          20 kB
          Xiaobing Zhou
        9. HDFS-8855.005.patch
          20 kB
          Xiaobing Zhou
        10. HDFS_8855.prototype.patch
          5 kB
          Bob Hansen

        Issue Links

          Activity

            People

              xiaobingo Xiaobing Zhou
              bobhansen Bob Hansen
              Votes:
              0 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: