private void parse() {

    byte[] bytes = this.bytes.getData();

    // get the VInt that represents the map size
    LazyBinaryUtils.readVInt(bytes, start, vInt);
    mapSize = vInt.value;
    if (0 == mapSize) {
      parsed = true;
      return;
    }

    // adjust arrays
    adjustArraySize(mapSize);

    // find out the null-bytes
    int mapByteStart = start + vInt.length;
    int nullByteCur = mapByteStart;
    int nullByteEnd = mapByteStart + (mapSize * 2 + 7) / 8;
    int lastElementByteEnd = nullByteEnd;

    // parsing the keys and values one by one
    for (int i = 0; i < mapSize; i++) {
      // parse a key
      keyIsNull[i] = true;
      if ((bytes[nullByteCur] & (1 << ((i * 2) % 8))) != 0) {
        keyIsNull[i] = false;
        LazyBinaryUtils.checkObjectByteInfo(((MapObjectInspector) oi)
            .getMapKeyObjectInspector(), bytes, lastElementByteEnd, recordInfo, vInt);
        keyStart[i] = lastElementByteEnd + recordInfo.elementOffset;
        keyLength[i] = recordInfo.elementSize;
        lastElementByteEnd = keyStart[i] + keyLength[i];
      } else if (!nullMapKey) {
        nullMapKey = true;
        LOG.warn("Null map key encountered! Ignoring similar problems.");
      }

      // parse a value
      valueIsNull[i] = true;
      if ((bytes[nullByteCur] & (1 << ((i * 2 + 1) % 8))) != 0) {
        valueIsNull[i] = false;
        LazyBinaryUtils.checkObjectByteInfo(((MapObjectInspector) oi)
            .getMapValueObjectInspector(), bytes, lastElementByteEnd,
            recordInfo, vInt);
        valueStart[i] = lastElementByteEnd + recordInfo.elementOffset;
        valueLength[i] = recordInfo.elementSize;
        lastElementByteEnd = valueStart[i] + valueLength[i];
      }

      // move onto the next null byte
      if (3 == (i % 4)) {
        nullByteCur++;
      }
    }

    Arrays.fill(keyInited, 0, mapSize, false);
    Arrays.fill(valueInited, 0, mapSize, false);
    parsed = true;
  }
Parse the byte[] and fill keyStart, keyLength, keyIsNull valueStart,
valueLength and valueIsNull.
serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryMap.java