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

LocalCache element memory usage is not calculated properly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • None
    • None

    Description

      Orc footer cache has a calculation of memory usage:

      public int getMemoryUsage() {
        return bb.remaining() + 100; // 100 is for 2 longs, BB and java overheads (semi-arbitrary).
      }
      

      ByteBuffer.remaining returns the remaining space in the bytebuffer, thus allowing this cache have elements MAXWEIGHT/100 of arbitrary size. I think the correct solution would be bb.capacity.

      Attachments

        1. HIVE-17344.2.patch
          1 kB
          Janos Gub
        2. HIVE-17344.patch
          0.7 kB
          Janos Gub

        Activity

          People

            gubjanos Janos Gub
            gubjanos Janos Gub
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: