final String row = metadata.getRow(); final String dataType = metadata.getDataType(); final String internalId = metadata.getInternalId();
@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; }
ei.setShardId(idEvent.getMetadata().getRow()); ei.setEventUid(idEvent.getMetadata().getInternalId()); List<EventIdentifier> thisEvent = Collections.singletonList(ei);