Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0
    • Java
    • None

    Description

      The java project depends on several json libraries, can we unify them into one so that we can also reduce the dependencies.

      use jackson-core in orc-benchmarks-core
      org.apache.orc.bench.core.convert.json.JsonWriter

      use gson in tools
      org.apache.orc.tools.convert.JsonReader
      org.apache.orc.tools.json.JsonSchemaFinder
      org.apache.orc.tools.json.JsonShredder
      org.apache.orc.tools.json.TestJsonSchemaFinder

      use jettjson in tools
      org.apache.orc.tools.KeyTool
      org.apache.orc.tools.JsonFileDump
      org.apache.orc.tools.PrintData

       

      I could provide a pr to unify the json library. But I'd like to hear from people
      1. is the unification necessary?
      2. if so, which library do we use? jackson/gson/jettison

       

       

      Attachments

        1. image-2021-08-15-10-10-05-605.png
          20 kB
          Yiqun Zhang
        2. image-2021-08-15-10-10-29-685.png
          48 kB
          Yiqun Zhang
        3. image-2021-08-15-10-10-56-564.png
          36 kB
          Yiqun Zhang
        4. image-2021-08-15-10-11-19-710.png
          45 kB
          Yiqun Zhang

        Issue Links

          Activity

            dongjoon Dongjoon Hyun added a comment -

            Thank you for filing a JIRA issue, Guiyankuang.
            1. I'm okay for the unification.
            2. Have you compare them? Which one is the most popular?

            cc omalley, pgaref, william

            dongjoon Dongjoon Hyun added a comment - Thank you for filing a JIRA issue, Guiyankuang . 1. I'm okay for the unification. 2. Have you compare them? Which one is the most popular? cc omalley , pgaref , william
            Guiyankuang Yiqun Zhang added a comment -

            Popularity shows that gson is used more often.

            Some benchmarking articles
            https://www.overops.com/blog/the-ultimate-json-library-json-simple-vs-gson-vs-jackson-vs-json/
            https://www.ericthecoder.com/2020/10/13/benchmarking-gson-vs-jackson-vs-moshi-2020/

            • If you have an environment that deals often or primarily with big JSON files, then Jackson is your library of interest. GSON struggles the most with big files.
            • If your environment primarily deals with lots of small JSON requests, such as in a micro services or distributed architecture setup, then GSON is your library of interest. Jackson struggles the most with small files.

            On balance I prefer to use gson with minimal changes.

            Guiyankuang Yiqun Zhang added a comment - Popularity shows that gson is used more often. Some benchmarking articles https://www.overops.com/blog/the-ultimate-json-library-json-simple-vs-gson-vs-jackson-vs-json/ https://www.ericthecoder.com/2020/10/13/benchmarking-gson-vs-jackson-vs-moshi-2020/ If you have an environment that deals often or primarily with big JSON files, then  Jackson  is your library of interest. GSON struggles the most with big files. If your environment primarily deals with lots of small JSON requests, such as in a micro services or distributed architecture setup, then  GSON  is your library of interest. Jackson struggles the most with small files. On balance I prefer to use gson with minimal changes.
            dongjoon Dongjoon Hyun added a comment -

            +1 for the analysis. Go for it, Guiyankuang.

            dongjoon Dongjoon Hyun added a comment - +1 for the analysis. Go for it, Guiyankuang .
            dongjoon Dongjoon Hyun added a comment - This is resolved via https://github.com/apache/orc/pull/869

            People

              Guiyankuang Yiqun Zhang
              Guiyankuang Yiqun Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: