Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3168

LazyBinaryObjectInspector.getPrimitiveJavaObject copies beyond length of underlying BytesWritable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0
    • 0.10.0
    • None

    Description

      LazyBinaryObjectInspector.getPrimitiveJavaObject copies the full capacity of the LazyBinary's underlying BytesWritable object, which can be greater than the size of the actual contents.

      This leads to additional characters at the end of the ByteArrayRef returned. When the LazyBinary object gets re-used, there can be remnants of the later portion of previous entry.
      This was not seen while reading through hive queries, which I think is because a copy elsewhere seems to create LazyBinary with length == capacity. (probably LazyBinary copy constructor). This was seen when MR or pig used Hcatalog to read the data.

      Attachments

        1. HIVE-3168.3.patch
          10 kB
          Thejas Nair
        2. HIVE-3168.2.patch
          10 kB
          Thejas Nair
        3. HIVE-3168.1.patch
          5 kB
          Thejas Nair

        Issue Links

          Activity

            People

              thejas Thejas Nair
              thejas Thejas Nair
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: