@Override public InternalEvent perform(InternalEvent ievent) { String field; try { field = ievent.getEventObj().getFieldAsString(timeField); } catch (FieldNotFoundException e) { throw new OperationException( "time field " + timeField + " does not exist in " + ievent.getEventString()); } ievent.setEventTime(getTimestamp(field, timeFieldType)); return ievent; } }
@Override public InternalEvent perform(InternalEvent ievent) { String field; try { field = ievent.getEventObj().getFieldAsString(timeField); } catch (FieldNotFoundException e) { throw new OperationException( "time field " + timeField + " does not exist in " + ievent.getEventString()); } ievent.setEventTime(getTimestamp(field, timeFieldType)); return ievent; } }
/** * Makes a new event by copying properties from another event. * * @param other event to copy */ private InternalEvent(InternalEvent other) { this.eventString = new String(other.getEventString()); this.context = other.context; this.eventSha1Hash = other.getEventSha1Hash(); this.arrivalTime = other.getArrivalTime(); this.eventTime = other.getEventTime(); this.serialized = other.getSerialized(); if (other.getPartitions() == null) { this.partitions = null; } else { this.partitions = new LinkedHashMap<String, String>(other.getPartitions()); } /* * We rely on the implementation to provide a deep copy here. */ if (other.getEventObj() != null) { this.eventObj = other.getEventObj().copy(); } /* * Note that this is a shallow copy of the metadata. Some metadata elements are reused across * multiple events within a function invocation. */ this.metadata.putAll(other.metadata); }
/** * Makes a new event by copying properties from another event. * * @param other event to copy */ private InternalEvent(InternalEvent other) { this.eventString = new String(other.getEventString()); this.context = other.context; this.eventSha1Hash = other.getEventSha1Hash(); this.arrivalTime = other.getArrivalTime(); this.eventTime = other.getEventTime(); this.serialized = other.getSerialized(); if (other.getPartitions() == null) { this.partitions = null; } else { this.partitions = new LinkedHashMap<String, String>(other.getPartitions()); } /* * We rely on the implementation to provide a deep copy here. */ if (other.getEventObj() != null) { this.eventObj = other.getEventObj().copy(); } /* * Note that this is a shallow copy of the metadata. Some metadata elements are reused across * multiple events within a function invocation. */ this.metadata.putAll(other.metadata); }
String eventStr = ievent.getEventString(); DeserializedEvent data = deser.deserialize(ievent.getEventString()); logger.warn("Failed to deserialize: " + ievent.getEventString()); return null;
String eventStr = ievent.getEventString(); DeserializedEvent data = deser.deserialize(ievent.getEventString()); logger.warn("Failed to deserialize: " + ievent.getEventString()); return null;