builder.setUuid(proto.getUuidString());
builder.setUuid(uuid); return builder.build().encode();
public Value getStatsActivityValue(boolean forwardEdge, EdgeKey.DATE_TYPE date_type) { EdgeValueBuilder builder = datawave.edge.util.EdgeValue.newBuilder(); int hour = -1; if (date_type == EdgeKey.DATE_TYPE.ACTIVITY_ONLY || date_type == EdgeKey.DATE_TYPE.ACTIVITY_AND_EVENT) { hour = getHour(activityDate); } else { hour = getHour(eventDate); } if (date_type == EdgeKey.DATE_TYPE.EVENT_ONLY) { if (validActivityDate) { builder.setBadActivityDate(false); } else { builder.setBadActivityDate(true); } } List<Long> hours = EdgeValueHelper.getLongListForHour(hour, this.isDeleting()); builder.setHours(hours); if (forwardEdge == true) { builder.setSourceValue(source.getValue(ValueType.EVENT)); } else { builder.setSourceValue(sink.getValue(ValueType.EVENT)); } builder.setLoadDate(loadDate); builder.setUuid(uuid); return builder.build().encode(); }
private void useEarliestUuid(EdgeValueBuilder builder, EdgeData.EdgeValue protoEdgeValue) { // Keeps overriding value of 'uuid' so the last(earliest) one will always be used // the value corresponding to the key with the most recent timestamp will come first // the value corresponding to the key with the oldest timestamp will come last if (protoEdgeValue.hasUuid()) { // previously, we took uuid from proto.EdgeValue, converted it to UUID, then to String // then when encoding we converted it back to a UUID and then into a UUID builder builder.setUuidObj(protoEdgeValue.getUuid()); builder.setOnlyUuidString(false); } else if (protoEdgeValue.hasUuidString()) { builder.setOnlyUuidString(true); builder.setUuid(protoEdgeValue.getUuidString()); } }
public Value getDurationAsValue(boolean forwardEdge) { EdgeValueBuilder builder = datawave.edge.util.EdgeValue.newBuilder(); List<Long> duration = EdgeValueHelper.getLongListForDuration(this.getDuration(), this.isDeleting()); builder.setDuration(duration); if (forwardEdge == true) { builder.setSourceValue(source.getValue(ValueType.EVENT)); } else { builder.setSourceValue(sink.getValue(ValueType.EVENT)); } builder.setLoadDate(loadDate); builder.setUuid(uuid); return builder.build().encode(); }