Hadoop Common
  1. Hadoop Common
  2. HADOOP-5369

Small tweaks to reduce MapFile index size

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Two minor tweaks can help reduce the memory overhead of the MapFile index a bit:

      1) Because the index file is a sequence file, it's length is not known. That means the index is built using the standard "mulitply the size of the buffer on overflow" with a factor of 3/2. With small keys, the slack in the index can be substantial. This patch has a constant upper bound on the amount of slack allowed.

      2) In block compressed map files the index file often has entries with the same offset (because the compressed block had more than index interval keys). The entries with identical offsets do not help MapFile do random access any faster. This patch eliminates these types of entries from new map files, and ignores them while reading old map files. This patch greatly helped with memory usage on a compressed hbase table.

      1. mapfile.patch
        4 kB
        Ben Maurer
      2. smaller_mapfile.patch
        6 kB
        Sharad Agarwal
      3. smaller_mapfile.patch
        6 kB
        Ben Maurer
      4. smaller_mapfile.patch
        6 kB
        Ben Maurer
      5. smaller_mapfile.patch
        5 kB
        Ben Maurer
      6. smaller_mapfile.patch
        4 kB
        Ben Maurer

        Activity

        Ben Maurer created issue -
        Ben Maurer made changes -
        Field Original Value New Value
        Attachment smaller_mapfile.patch [ 12401173 ]
        Ben Maurer made changes -
        Attachment mapfile.patch [ 12401423 ]
        Doug Cutting made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags [Reviewed]
        Assignee Ben Maurer [ bmaurer ]
        Fix Version/s 0.21.0 [ 12313563 ]
        Ben Maurer made changes -
        Attachment smaller_mapfile.patch [ 12401652 ]
        Ben Maurer made changes -
        Attachment smaller_mapfile.patch [ 12401660 ]
        Doug Cutting made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Doug Cutting made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Ben Maurer made changes -
        Attachment smaller_mapfile.patch [ 12401772 ]
        Ben Maurer made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Ben Maurer made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Sharad Agarwal made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Sharad Agarwal made changes -
        Attachment smaller_mapfile.patch [ 12407970 ]
        Sharad Agarwal made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Sharad Agarwal made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Ben Maurer
            Reporter:
            Ben Maurer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development