MapObjectInspector moi = (MapObjectInspector) oi;
ObjectInspector koi = moi.getMapKeyObjectInspector();
ObjectInspector voi = moi.getMapValueObjectInspector();
Map<?, ?> map = moi.getMap(o);
serializeMap = new TMap(keyType.getType(), valueType.getType(), map.size());
oprot.writeMapBegin(serializeMap);
for (Object element : map.entrySet()) {
Map.Entry it = (Map.Entry) element;
Object key = it.getKey();