private Object convertValue(String field, String value) {
    if (value == null) return EMTPY_VALUE;
    if (METADATA_DURATION.equals(field)) {
      return convertDuration(TimeUnit.MILLISECONDS.toNanos(Long.parseLong(value)));
    }
    else {
      Double doubleValue = Doubles.tryParse(value);
      return (doubleValue == null) ? value : doubleValue;
    }
  }
private Object convertValue ( String field , String value ) { if ( value == null ) return EMTPY_VALUE ; if ( METADATA_DURATION . equals ( field ) ) { return convertDuration ( TimeUnit . MILLISECONDS . toNanos ( Long . parseLong ( value ) ) ) ; } else { Double doubleValue = Doubles . tryParse ( value ) ; return ( doubleValue == null ) ? value : doubleValue ; } }
Convert the event value taken from the metadata to double (default type).
It falls back to string type if the value is missing or it is non-numeric
is of string or missing
Metadata entries are emitted as distinct events (see {@link MultiPartEvent})

@param field {@link GobblinTrackingEvent} metadata key
@param value {@link GobblinTrackingEvent} metadata value
@return The converted event value