@Override
    public void serialize(DrainNotification value, JsonGenerator jsonGenerator, SerializerProvider provider)
        throws IOException {
      Map<String, Object> drainMessageMap = new HashMap<>();
      drainMessageMap.put("uuid", value.getUuid().toString());
      drainMessageMap.put("runId", value.getRunId());
      drainMessageMap.put("drainMode", value.getDrainMode().toString());
      jsonGenerator.writeObject(drainMessageMap);
    }
Wraps a ObjectMapper for serializing and deserializing Drain Notification Messages.
samza-core/src/main/java/org/apache/samza/drain/DrainNotificationObjectMapper.java