private void requireFlowFileQueue(final StandardRepositoryRecord repoRecord, final String queueId) { if (queueId == null || queueId.trim().isEmpty()) { logger.warn("{} does not have a Queue associated with it; this record will be discarded", repoRecord.getCurrent()); repoRecord.markForAbort(); } else if (repoRecord.getOriginalQueue() == null) { logger.warn("{} maps to unknown Queue {}; this record will be discarded", repoRecord.getCurrent(), queueId); repoRecord.markForAbort(); } }
details.append(", "); if (repoRecord.getOriginalQueue() != null && repoRecord.getOriginalQueue().getIdentifier() != null) { details.append("queue=") .append(repoRecord.getOriginalQueue().getIdentifier()) .append("/");
@Override public void transfer(FlowFile flowFile) { verifyTaskActive(); flowFile = validateRecordState(flowFile); final StandardRepositoryRecord record = getRecord(flowFile); if (record.getOriginalQueue() == null) { throw new IllegalArgumentException("Cannot transfer FlowFiles that are created in this Session back to self"); } record.setTransferRelationship(Relationship.SELF); updateLastQueuedDate(record); }
final FlowFileRecord flowFileRecord = repoRecord.getCurrent(); if (event.getFlowFileUuid().equals(flowFileRecord.getAttribute(CoreAttributes.UUID.key()))) { if (repoRecord.getOriginalQueue() == null) { return false; final String originalQueueId = repoRecord.getOriginalQueue().getIdentifier(); final Connection destinationConnection = connectionsForRelationship.iterator().next(); final String destinationQueueId = destinationConnection.getFlowFileQueue().getIdentifier();
final FlowFileQueue inputQueue = repoRecord.getOriginalQueue(); if (inputQueue != null) { final String connectionId = inputQueue.getIdentifier();
final FlowFileQueue originalQueue = record.getOriginalQueue(); if (originalQueue != null) { if (penalize) {
@Override public void remove(FlowFile flowFile) { verifyTaskActive(); flowFile = validateRecordState(flowFile); final StandardRepositoryRecord record = getRecord(flowFile); record.markForDelete(); removedFlowFiles.add(flowFile.getAttribute(CoreAttributes.UUID.key())); // if original connection is null, the FlowFile was created in this session, so we // do not want to count it toward the removed count. if (record.getOriginalQueue() == null) { // if we've generated any Fork events, remove them because the FlowFile was created // and then removed in this session. generatedProvenanceEvents.remove(flowFile); removeForkEvents(flowFile); } else { removedCount++; removedBytes += flowFile.getSize(); provenanceReporter.drop(flowFile, flowFile.getAttribute(CoreAttributes.DISCARD_REASON.key())); } }
@Override public void remove(Collection<FlowFile> flowFiles) { verifyTaskActive(); flowFiles = validateRecordState(flowFiles); for (final FlowFile flowFile : flowFiles) { final StandardRepositoryRecord record = getRecord(flowFile); record.markForDelete(); removedFlowFiles.add(flowFile.getAttribute(CoreAttributes.UUID.key())); // if original connection is null, the FlowFile was created in this session, so we // do not want to count it toward the removed count. if (record.getOriginalQueue() == null) { generatedProvenanceEvents.remove(flowFile); removeForkEvents(flowFile); } else { removedCount++; removedBytes += flowFile.getSize(); provenanceReporter.drop(flowFile, flowFile.getAttribute(CoreAttributes.DISCARD_REASON.key())); } } }
record.setDestination(record.getOriginalQueue()); } else if (destinations.isEmpty()) { record.markForDelete();
final FlowFileQueue originalQueue = repoRecord.getOriginalQueue(); if (originalQueue != null) { recordBuilder.setSourceQueueIdentifier(originalQueue.getIdentifier());
final FlowFileQueue originalQueue = repoRecord.getOriginalQueue(); if (originalQueue != null) { recordBuilder.setSourceQueueIdentifier(originalQueue.getIdentifier());
private void requireFlowFileQueue(final StandardRepositoryRecord repoRecord, final String queueId) { if (queueId == null || queueId.trim().isEmpty()) { logger.warn("{} does not have a Queue associated with it; this record will be discarded", repoRecord.getCurrent()); repoRecord.markForAbort(); } else if (repoRecord.getOriginalQueue() == null) { logger.warn("{} maps to unknown Queue {}; this record will be discarded", repoRecord.getCurrent(), queueId); repoRecord.markForAbort(); } }