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

HDFS Peercache enabled check should not lock on object

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 2.7.0
    • hdfs-client

    Description

      HDFS fs.Open synchronizes on the Peercache, even when peer cache is disabled.

       public synchronized Peer get(DatanodeID dnId, boolean isDomain) {
      
          if (capacity <= 0) { // disabled
            return null;
          }
      

      since capacity is a final, this could be moved outside the lock.

      Attachments

        1. hdfs-7266.001.patch
          2 kB
          Andrew Wang
        2. dfs-open-10-threads.png
          327 kB
          Gopal Vijayaraghavan

        Activity

          People

            andrew.wang Andrew Wang
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: