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

Avoid static initialization of ObjectMappers

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.2.0
    • 3.2.0, 3.1.2
    • performance
    • None
    • 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
          9 kB
          Todd Lipcon
        2. hadoop-15550.txt
          13 kB
          Todd Lipcon
        3. hadoop-15550.txt
          18 kB
          Todd Lipcon
        4. hadoop-15550.txt
          18 kB
          Todd Lipcon
        5. hadoop-15550.txt
          18 kB
          Todd Lipcon

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment