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

Make CryptoCodec Closeable so it can be cleaned up proactively

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha4, 2.8.6
    • None
    • None
    • Reviewed

    Description

      See HADOOP-14523 for motivation. Credit to misha@cloudera.com 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

              xiaochen Xiao Chen
              xiaochen Xiao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: