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

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.19.0
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: