Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14524

Make CryptoCodec Closeable so it can be cleaned up proactively

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      See HADOOP-14523 for motivation. Credit to Misha Dmitriev for reporting initially there.

      Basically, the CryptoCodec class is not a closeable, but the OpensslAesCtrCryptoCodec implementation of it contains a closeable member (the Random object). Currently it is left for finalize() to clean up, this depends on when a FGC is run, and would create problems if OpensslAesCtrCryptoCodec is used with OsSecureRandom, which could let OS run out of FDs on /dev/urandom if too many codecs created.

        Attachments

        1. HADOOP-14524.01.patch
          11 kB
          Xiao Chen
        2. HADOOP-14524.branch-2.01.patch
          11 kB
          Xiao Chen

          Issue Links

            Activity

              People

              • Assignee:
                xiaochen Xiao Chen
                Reporter:
                xiaochen Xiao Chen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: