private void traceLogging(Set<ObjectId> ids, Set<ObjectId> existence, ViewFieldChange fieldChange) { if (LOG.isTraceEnabled()) { StringBuilder msg = new StringBuilder().append(" existence:"); String sep = ""; for (ObjectId id : ids) { msg.append(sep); msg.append(id).append(existence.contains(id) ? " exists" : " does not exist"); sep = ","; } msg.append(" change:").append(fieldChange); if (LOG.isTraceEnabled()) { LOG.trace("WRITE BLOCKED DUE TO LACK OF EXISTANCE:" + msg.toString()); } } } }
@Override public Set<ObjectId> getExistence(TenantIdAndCentricId tenantId, Set<ObjectId> objectIds) { List<ObjectId> orderObjectIds = new ArrayList<>(objectIds); List<Long> multiRowGet = updatedStore.multiRowGet(tenantId, orderObjectIds, EXISTS, null, null); Set<ObjectId> existence = new HashSet<>(); for (int i = 0; i < orderObjectIds.size(); i++) { if (multiRowGet.get(i) != null) { existence.add(orderObjectIds.get(i)); if (LOG.isTraceEnabled()) { LOG.trace("Check existence {} TRUE", new Object[]{orderObjectIds.get(i)}); } } else { if (LOG.isTraceEnabled()) { LOG.trace("Check existence {} FALSE", new Object[]{orderObjectIds.get(i)}); } } } return existence; }
@Override public void removeObjectId(List<ExistenceUpdate> existenceUpdates) { List<TenantRowColumnTimestampRemove<TenantIdAndCentricId, ObjectId, String>> batch = new ArrayList<>(); for (ExistenceUpdate existenceUpdate : existenceUpdates) { batch.add(new TenantRowColumnTimestampRemove<>(existenceUpdate.tenantId, existenceUpdate.objectId, EXISTS, new ConstantTimestamper(existenceUpdate.timestamp))); if (LOG.isTraceEnabled()) { LOG.trace("Object REMOVED:{} time:{}", new Object[]{existenceUpdate.objectId, existenceUpdate.timestamp}); } } updatedStore.multiRowsMultiRemove(batch); }
@Override public void addObjectId(List<ExistenceUpdate> existenceUpdates) { List<TenantRowColumValueTimestampAdd<TenantIdAndCentricId, ObjectId, String, Long>> batch = new ArrayList<>(); for (ExistenceUpdate existenceUpdate : existenceUpdates) { batch.add(new TenantRowColumValueTimestampAdd<>(existenceUpdate.tenantId, existenceUpdate.objectId, EXISTS, existenceUpdate.timestamp, new ConstantTimestamper(existenceUpdate.timestamp))); if (LOG.isTraceEnabled()) { LOG.trace("Object EXISTS:{} time:{}", new Object[]{existenceUpdate.objectId, existenceUpdate.timestamp}); } } updatedStore.multiRowsMultiAdd(batch); }
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 ColumnValueAndTimestamp<ObjectId, byte[], Long> callback(ColumnValueAndTimestamp<ObjectId, byte[], Long> backRef) throws Exception { if (backRef != null) { ReferenceWithTimestamp reference = new ReferenceWithTimestamp(backRef.getColumn(), fieldName, backRef.getTimestamp()); if (LOG.isTraceEnabled()) { LOG.trace(System.currentTimeMillis() + " |--> {} Got aIds Tenant={} b={} a={} Timestamp={}", new Object[]{ threadTimestamp, tenantIdAndCentricId, aClassAndField_bId, backRef.getColumn(), backRef.getTimestamp()}); } refs.add(reference); if (refs.size() > MAX_FAN_OUT_BEFORE_WARN) { LOG.warn("TODO: streamBackRefs reference fan-out is exceeding comfort level. We need break scans into batched scans."); } } return backRef; } }));
throw new IllegalArgumentException("you have already created this binding:" + factoryKey); if (LOG.isTraceEnabled()) { LOG.trace("MODELPATH " + modelPath); PathTraversersFactory fieldProcessorFactory = new PathTraversersFactory(viewClassName, modelPathHashcode, modelPath); if (LOG.isTraceEnabled()) { LOG.trace("Bind:{}", factoryKey);
LOG.startTimer("processed"); if (LOG.isTraceEnabled()) { LOG.trace("PROCESSING TIME:{} {} EVENT-ID:{} EVENT:{}", new Object[]{