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

Avoid static initialization of ObjectMappers

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.0, 3.1.2
    • Component/s: performance
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Various classes statically initialize an ObjectMapper READER instance. This ends up doing a bunch of class-loading of Jackson libraries that can add up to a fair amount of CPU, even if the reader ends up not being used. This is particularly the case with WebHdfsFileSystem, which is class-loaded by a serviceloader even when unused in a particular job. We should lazy-init these members instead of doing so as a static class member.

        Attachments

        1. hadoop-15550.txt
          18 kB
          Todd Lipcon
        2. hadoop-15550.txt
          18 kB
          Todd Lipcon
        3. hadoop-15550.txt
          18 kB
          Todd Lipcon
        4. hadoop-15550.txt
          13 kB
          Todd Lipcon
        5. hadoop-15550.txt
          9 kB
          Todd Lipcon

          Issue Links

            Activity

              People

              • Assignee:
                tlipcon Todd Lipcon
                Reporter:
                tlipcon Todd Lipcon
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: