final String row = metadata.getRow(); final String dataType = metadata.getDataType(); final String internalId = metadata.getInternalId();
@Override public EventBase transform(Entry<Key,Value> input) { EventBase event = super.transform(input); Metadata md = event.getMetadata(); byte[] id = md.getInternalId().getBytes(); ByteSequence parentIdBytes = TLD.parseParentPointerFromId(new ArrayByteSequence(id)); String parentId = new String(parentIdBytes.getBackingArray(), parentIdBytes.offset(), parentIdBytes.length()); md.setInternalId(parentId); return event; } }
@Override public List<CacheableQueryRow> writeToCache(Object o) throws QueryException { List<CacheableQueryRow> cqoList = new ArrayList<>(); EventBase event = (EventBase) o; CacheableQueryRow cqo = new CacheableQueryRowImpl(); Metadata metadata = event.getMetadata(); cqo.setColFam(metadata.getDataType() + ":" + cqo.getEventId()); cqo.setDataType(metadata.getDataType()); cqo.setEventId(metadata.getInternalId()); cqo.setRow(metadata.getRow()); List<FieldBase> fields = event.getFields(); for (FieldBase f : fields) { cqo.addColumn(f.getName(), f.getTypedValue(), f.getMarkings(), f.getColumnVisibility(), f.getTimestamp()); } cqoList.add(cqo); return cqoList; }
@Override public List<CacheableQueryRow> writeToCache(Object o) throws QueryException { List<CacheableQueryRow> cqoList = new ArrayList<>(); EventBase<?,?> event = (EventBase<?,?>) o; CacheableQueryRow cqo = this.responseObjectFactory.getCacheableQueryRow(); Metadata metadata = event.getMetadata(); cqo.setColFam(metadata.getDataType() + ":" + cqo.getEventId()); cqo.setDataType(metadata.getDataType()); cqo.setEventId(metadata.getInternalId()); cqo.setRow(metadata.getRow()); List<? extends FieldBase<?>> fields = event.getFields(); for (FieldBase<?> f : fields) { cqo.addColumn(f.getName(), f.getTypedValue(), f.getMarkings(), f.getColumnVisibility(), f.getTimestamp()); } cqoList.add(cqo); return cqoList; }
@Override public List<CacheableQueryRow> writeToCache(Object o) throws QueryException { List<CacheableQueryRow> cqoList = new ArrayList<>(); EventBase event = (EventBase) o; CacheableQueryRow cqo = responseObjectFactory.getCacheableQueryRow(); Metadata metadata = event.getMetadata(); cqo.setColFam(metadata.getDataType() + ":" + cqo.getEventId()); cqo.setDataType(metadata.getDataType()); cqo.setEventId(metadata.getInternalId()); cqo.setRow(metadata.getRow()); List<? extends FieldBase> fields = event.getFields(); for (FieldBase f : fields) { cqo.addColumn(f.getName(), f.getTypedValue(), f.getMarkings(), f.getColumnVisibility(), f.getTimestamp()); } // set the size in bytes using the initial event size as an approximation cqo.setSizeInBytes(event.getSizeInBytes()); cqoList.add(cqo); return cqoList; }
@Override public List<CacheableQueryRow> writeToCache(Object o) throws QueryException { List<CacheableQueryRow> cqoList = new ArrayList<>(); EventBase event = (EventBase) o; CacheableQueryRowImpl cqo = new CacheableQueryRowImpl(); Metadata metadata = event.getMetadata(); cqo.setColFam(metadata.getDataType() + ":" + cqo.getEventId()); cqo.setDataType(metadata.getDataType()); cqo.setEventId(metadata.getInternalId()); cqo.setRow(metadata.getRow()); List<FieldBase> fields = event.getFields(); for (FieldBase f : fields) { cqo.addColumn(f.getName(), f.getTypedValue(), f.getMarkings(), f.getColumnVisibility(), f.getTimestamp()); } // set the size in bytes using the initial event size as an approximation cqo.setSizeInBytes(event.getSizeInBytes()); cqoList.add(cqo); return cqoList; }
@Override public List<CacheableQueryRow> writeToCache(Object o) throws QueryException { List<CacheableQueryRow> cqoList = new ArrayList<>(); EventBase event = (EventBase) o; CacheableQueryRowImpl cqo = new CacheableQueryRowImpl(); Metadata metadata = event.getMetadata(); cqo.setColFam(metadata.getDataType() + ":" + cqo.getEventId()); cqo.setDataType(metadata.getDataType()); cqo.setEventId(metadata.getInternalId()); cqo.setRow(metadata.getRow()); List<FieldBase> fields = event.getFields(); for (FieldBase f : fields) { cqo.addColumn(f.getName(), f.getTypedValue(), f.getMarkings(), f.getColumnVisibility(), f.getTimestamp()); } // set the size in bytes using the initial event size as an approximation cqo.setSizeInBytes(event.getSizeInBytes()); cqoList.add(cqo); return cqoList; }
for (Iterator<Set<String>> it = expected.iterator(); it.hasNext();) { Set<String> expectedSet = it.next(); if (expectedSet.contains(event.getMetadata().getInternalId())) { it.remove(); found = true;
ei.setDatatype(idEvent.getMetadata().getDataType()); ei.setShardId(idEvent.getMetadata().getRow()); ei.setEventUid(idEvent.getMetadata().getInternalId()); List<EventIdentifier> thisEvent = Collections.singletonList(ei); if (log != null)