@Override
    public DrainNotification deserialize(JsonParser jsonParser, DeserializationContext context)
        throws IOException {
      ObjectCodec oc = jsonParser.getCodec();
      JsonNode node = oc.readTree(jsonParser);
      UUID uuid = UUID.fromString(node.get("uuid").textValue());
      String runId = node.get("runId").textValue();
      DrainMode drainMode = DrainMode.valueOf(node.get("drainMode").textValue().toUpperCase(Locale.ROOT));
      return new DrainNotification(uuid, runId, drainMode);
    }
Wraps a ObjectMapper for serializing and deserializing Drain Notification Messages.
samza-core/src/main/java/org/apache/samza/drain/DrainNotificationObjectMapper.java