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

getFileEncryptionInfo should return quickly for non-encrypted cluster

    XMLWordPrintableJSON

Details

    Description

      FSDirectory#getFileEncryptionInfo always acquires readLock and checks if the path belongs to an EZ. For a busy system with potentially many listing operations, this could cause locking contention.

      I think we should add a call EncryptionZoneManager#hasEncryptionZone() to return whether the system has any EZ. If no EZ at all, getFileEncryptionInfo should return null without readLock.

      If hasEncryptionZone is only used in the above scenario, maybe itself doesn't need a readLock – if the system doesn't have any EZ when getFileEncryptionInfo is called on a path, it means the path cannot be encrypted.

      Attachments

        1. HDFS-10458.00.patch
          0.9 kB
          Zhe Zhang
        2. HDFS-10458.03.patch
          5 kB
          Zhe Zhang
        3. HDFS-10458.04.patch
          5 kB
          Zhe Zhang
        4. HDFS-10458.05.patch
          5 kB
          Zhe Zhang
        5. HDFS-10458-branch-2.00.patch
          5 kB
          Zhe Zhang
        6. HDFS-10458-branch-2.6.00.patch
          4 kB
          Zhe Zhang
        7. HDFS-10458-branch-2.6.01.patch
          4 kB
          Zhe Zhang
        8. HDFS-10458-branch-2.7.00.patch
          5 kB
          Zhe Zhang
        9. HDFSA-10458.01.patch
          3 kB
          Zhe Zhang
        10. HDFSA-10458.02.patch
          3 kB
          Zhe Zhang

        Activity

          People

            zhz Zhe Zhang
            zhz Zhe Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: