samza-log4j/src/main/java/org/apache/samza/logging/log4j/serializers/LoggingEventJsonSerde.java [165:195]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    throw new UnsupportedOperationException("Unable to decode LoggingEvents.");
  }

  public static String dateFormat(long time) {
    return DATE_FORMAT.format(new Date(time));
  }

  /**
   * @return The hostname to use in the hostname field of the encoded
   *         LoggingEvents.
   */
  public static String getHostname() {
    try {
      return Util.getLocalHost().getHostName();
    } catch (Exception e) {
      return "unknown-host";
    }
  }

  /**
   * A helper class that only puts non-null values into the encoded LoggingEvent
   * map. This helps to shrink over-the-wire byte payloads for encoded
   * LoggingEvents.
   */
  @SuppressWarnings("serial")
  public static final class LoggingEventMap extends HashMap<String, Object> {
    public Object put(String key, Object value) {
      if (value == null) {
        return get(key);
      } else {
        return super.put(key, value);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



samza-log4j2/src/main/java/org/apache/samza/logging/log4j2/serializers/LoggingEventJsonSerde.java [160:190]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    throw new UnsupportedOperationException("Unable to decode LoggingEvents.");
  }

  public static String dateFormat(long time) {
    return DATE_FORMAT.format(new Date(time));
  }

  /**
   * @return The hostname to use in the hostname field of the encoded
   *         LoggingEvents.
   */
  public static String getHostname() {
    try {
      return Util.getLocalHost().getHostName();
    } catch (Exception e) {
      return "unknown-host";
    }
  }

  /**
   * A helper class that only puts non-null values into the encoded LoggingEvent
   * map. This helps to shrink over-the-wire byte payloads for encoded
   * LoggingEvents.
   */
  @SuppressWarnings("serial")
  public static final class LoggingEventMap extends HashMap<String, Object> {
    public Object put(String key, Object value) {
      if (value == null) {
        return get(key);
      } else {
        return super.put(key, value);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



