Hadoop Common
  1. Hadoop Common
  2. HADOOP-5369

Small tweaks to reduce MapFile index size


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


      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. smaller_mapfile.patch
        4 kB
        Ben Maurer
      2. mapfile.patch
        4 kB
        Ben Maurer
      3. smaller_mapfile.patch
        5 kB
        Ben Maurer
      4. smaller_mapfile.patch
        6 kB
        Ben Maurer
      5. smaller_mapfile.patch
        6 kB
        Ben Maurer
      6. smaller_mapfile.patch
        6 kB
        Sharad Agarwal



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


            • Created: