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

Substitute the synchronized code in MD5Hash to avoid lock contention. Use ThreadLocal instead.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.19.0
    • io
    • None
    • Reviewed

    Description

      Currently the MD5Hash class uses a singleton instance of the MessageDigester. The access to this instance is synchronized, so MD5Hash has performance problems when used from several Threads. I propose to substitute the singleton instance by a TheadLocal instances cache. I will provide a patch.

      Attachments

        1. MD5Hash-ThreadLocal.patch
          2 kB
          Iván de Prado
        2. 3556.patch
          4 kB
          Iván de Prado

        Activity

          People

            ivan.prado Iván de Prado
            ivan.prado Iván de Prado
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: