protected void serializeColumnMapping(HiveAccumuloMapColumnMapping columnMapping,
      ObjectInspector fieldObjectInspector, Object value, Mutation mutation) throws IOException {
    MapObjectInspector mapObjectInspector = (MapObjectInspector) fieldObjectInspector;

    Map<?,?> map = mapObjectInspector.getMap(value);
    if (map == null) {
      return;
    }

    ObjectInspector keyObjectInspector = mapObjectInspector.getMapKeyObjectInspector(), valueObjectInspector = mapObjectInspector
        .getMapValueObjectInspector();

    byte[] cfBytes = columnMapping.getColumnFamily().getBytes(Charsets.UTF_8), cqPrefixBytes = columnMapping
        .getColumnQualifierPrefix().getBytes(Charsets.UTF_8);
    byte[] cqBytes, valueBytes;
    for (Entry<?,?> entry : map.entrySet()) {
      output.reset();

      // If the cq prefix is non-empty, add it to the CQ before we set the mutation
      if (0 < cqPrefixBytes.length) {
        output.write(cqPrefixBytes, 0, cqPrefixBytes.length);
      }

      // Write the "suffix" of the cq
      writeWithLevel(keyObjectInspector, entry.getKey(), output, columnMapping, 3);
      cqBytes = output.toByteArray();

      output.reset();

      // Write the value
      writeWithLevel(valueObjectInspector, entry.getValue(), output, columnMapping, 3);
      valueBytes = output.toByteArray();

      mutation.put(cfBytes, cqBytes, visibility, valueBytes);
    }
  }
Serialize the Hive Map into an Accumulo row
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/serde/AccumuloRowSerializer.java