Uploaded image for project: 'Parquet'
  1. Parquet
  2. PARQUET-75

String decode using 'new String' is slow

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: parquet-mr
    • Labels:
      None

      Description

      There are three implementations of the Binary class and only one is using the faster 'UTF8.decode' in the 'toStringUsingUTF8' method. This fixes them to all use the faster UTF8.decode.

      As noted in the comments, the 'new String' approach creates a new decoder each time, which is slower than the cached instance used by 'UTF8.decode'.

      #1. ByteArraySliceBackedBinary <-- UTF8.decode
      #2. ByteArrayBackedBinary <-- new String
      #3. ByteBufferBackedBinary <-- new String

      https://github.com/apache/incubator-parquet-mr/pull/40

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dweeks-netflix Daniel Weeks
                Reporter:
                dweeks-netflix Daniel Weeks
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: