/** * @param eventString the raw string data of the event. * @param context lambda context of the function. * @param arrivalTime epoch time in MS when the event arrived. */ public InternalEvent(String eventString, LambdaContext context, long arrivalTime) { this.eventString = eventString; this.context = context; this.eventSha1Hash = DigestUtils.sha1Hex(this.eventString); this.arrivalTime = arrivalTime; this.eventTime = arrivalTime; this.metadata.put("arrivalEpochMs", new Long(this.arrivalTime)); this.metadata.put("eventSha1Hash", this.getEventSha1Hash()); }
/** * @param eventString the raw string data of the event. * @param context lambda context of the function. * @param arrivalTime epoch time in MS when the event arrived. */ public InternalEvent(String eventString, LambdaContext context, long arrivalTime) { this.eventString = eventString; this.context = context; this.eventSha1Hash = DigestUtils.sha1Hex(this.eventString); this.arrivalTime = arrivalTime; this.eventTime = arrivalTime; this.metadata.put("arrivalEpochMs", new Long(this.arrivalTime)); this.metadata.put("eventSha1Hash", this.getEventSha1Hash()); }
payload.append("\"_id\":"); payload.append("\""); payload.append(ievent.getEventSha1Hash()); payload.append("\",");
payload.append("\"_id\":"); payload.append("\""); payload.append(ievent.getEventSha1Hash()); payload.append("\",");
private BasicWrapper(final InternalEvent internal) { this.sha1Hash = internal.getEventSha1Hash(); this.timestamp = internal.getEventTime(); if (internal.getEventObj() != null) { this.payload = internal.getEventObj().getPayload(); } else { this.payload = null; } }
private BasicWrapper(final InternalEvent internal) { this.sha1Hash = internal.getEventSha1Hash(); this.timestamp = internal.getEventTime(); if (internal.getEventObj() != null) { this.payload = internal.getEventObj().getPayload(); } else { this.payload = null; } }
/** * 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); }
private S3Wrapper(final InternalEvent internal) { S3InternalEvent s3Event = ((S3InternalEvent) internal); this.s3Key = s3Event.getS3Key(); this.s3Bucket = s3Event.getS3Bucket(); this.s3KeyVersion = s3Event.getS3KeyVersion(); this.functionName = internal.getCtx().getContext().getFunctionName(); this.functionVersion = internal.getCtx().getContext().getFunctionVersion(); this.processingTime = System.currentTimeMillis(); this.timestamp = internal.getEventTime(); this.processingDelay = processingTime - timestamp; this.sha1Hash = internal.getEventSha1Hash(); if (internal.getEventObj() != null) { this.payload = internal.getEventObj().getPayload(); } else { this.payload = null; } }
private S3Wrapper(final InternalEvent internal) { S3InternalEvent s3Event = ((S3InternalEvent) internal); this.s3Key = s3Event.getS3Key(); this.s3Bucket = s3Event.getS3Bucket(); this.s3KeyVersion = s3Event.getS3KeyVersion(); this.functionName = internal.getCtx().getContext().getFunctionName(); this.functionVersion = internal.getCtx().getContext().getFunctionVersion(); this.processingTime = System.currentTimeMillis(); this.timestamp = internal.getEventTime(); this.processingDelay = processingTime - timestamp; this.sha1Hash = internal.getEventSha1Hash(); if (internal.getEventObj() != null) { this.payload = internal.getEventObj().getPayload(); } else { this.payload = null; } }