final EventModel ingressEvent = EventModel.builder(eventNode, false).build(); Validated.ValidatedBuilder builder = Validated.build(); LOG.inc("validated_events"); if (eventsModel == null || eventsModel.getEventsModel() == null) { LOG.inc("no_model"); builder.addMessage(failInvalidEvents, "There is no event model to validate against. Please call loadModel()"); } else { LOG.inc("unknown_event>" + ingressEvent.getEventClass()); LOG.inc("unknown_event"); builder.addMessage(failInvalidEvents, "'" + ingressEvent.getEventClass() + "' is not declared in the current event model. Do you need to reload the model?"); ValueType modelFieldType = modelFields.get(ingressFieldName); if (modelFieldType == null) { LOG.inc("unexpected_field>" + ingressFieldName); LOG.inc("unexpected_field"); builder.addMessage(failInvalidEvents, "unexpected field: '" + ingressFieldName + "'"); LOG.inc("unexpected_type>" + ingressFieldName + ">" + ingressFieldType); LOG.inc("unexpected_type"); builder.addMessage(failInvalidEvents, "expected: '" + ingressFieldName + "' of type '" + modelFieldType
final CallbackStream<ReferenceWithTimestamp> backRefs) throws Exception { LOG.inc("get_aIds"); final List<ReferenceWithTimestamp> refs = new ArrayList<>(); List<KeyedColumnValueCallbackStream<ClassAndField_IdKey, ObjectId, byte[], Long>> callbacks = new ArrayList<>(classNames.size());
public void commit(Transaction transaction) throws IOException { TenantIdAndCentricId tenantId = transaction.tenantIdAndCentricId; List<ViewWriteFieldChange> adds = transaction.takeAdds(); if (!adds.isEmpty()) { LOG.inc("added view paths", adds.size()); viewValueStore.add(tenantId, adds); if (LOG.isTraceEnabled()) { for (ViewWriteFieldChange add : adds) { LOG.trace(add.toString()); } } } List<ViewWriteFieldChange> removes = transaction.takeRemoves(); if (!removes.isEmpty()) { LOG.inc("removed view paths", adds.size()); viewValueStore.remove(tenantId, removes); if (LOG.isTraceEnabled()) { for (ViewWriteFieldChange remove : removes) { LOG.trace(remove.toString()); } } } }
@Override public List<V> readViews(List<ViewDescriptor> request) throws IOException { LOG.inc(VIEW_READ_CALL_COUNT); Preconditions.checkArgument(request != null); Map<TenantAndActor, Set<Id>> permisionCheckTheseIds = new HashMap<>(); try { List<V> views = collectViewObject(viewCollectors, canViewTheseIds); LOG.inc(VIEW_READ_VIEW_COUNT, views.size()); return views; } catch (Exception ex) {
long timestamp, List<LinkTo> batchLinks) throws Exception { LOG.inc("batchLink"); LOG.startTimer("batchLink");
List<ViewFieldChange> changes = changeSets.getValue(); TenantIdAndCentricId tenantIdAndCentricId = viewDescriptor.getTenantIdAndCentricId(); LOG.inc("commitChanges", changes.size()); LOG.startTimer("commitChanges"); LOG.inc("commitedChanges", changes.size()); LOG.trace("Committed changes to hbase: {}", changes);