StatefulHashMap map = (StatefulHashMap)value;
if (map.size() == 0) {
serializer = ByteBufferSerializer.get();
}
else {
Object value0 = map.values().iterator().next();
Schema schema = TypeUtils.getSchema(value0);
serializer = StatefulHashMapSerializer.get(schema);
}
} else {
serializer = SerializerTypeInferer.getSerializer(value);