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

HDFS Peercache enabled check should not lock on object

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.7.0
    • Component/s: hdfs-client
    • Labels:
    • Target Version/s:

      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. dfs-open-10-threads.png
          327 kB
          Gopal Vijayaraghavan
        2. hdfs-7266.001.patch
          2 kB
          Andrew Wang

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: