private static ObjectMapper createObjectMapper() {
    ObjectMapper objectMapper = new ObjectMapper();
    SimpleModule module = new SimpleModule("ContainerPlacementModule", new Version(1, 0, 0, ""));
    module.addSerializer(ContainerPlacementMessage.class,
        new ContainerPlacementMessageObjectMapper.ContainerPlacementMessageSerializer());
    module.addDeserializer(ContainerPlacementMessage.class,
        new ContainerPlacementMessageObjectMapper.ContainerPlacementMessageDeserializer());
    objectMapper.registerModule(module);
    objectMapper.registerSubtypes(new NamedType(ContainerPlacementResponseMessage.class));
    objectMapper.registerSubtypes(new NamedType(ContainerPlacementRequestMessage.class));
    return objectMapper;
  }
Object mapper for serializing and deserializing Container placement messages
samza-core/src/main/java/org/apache/samza/clustermanager/container/placement/ContainerPlacementMessageObjectMapper.java