timeabarna commented on a change in pull request #4824:
URL: https://github.com/apache/nifi/pull/4824#discussion_r576800326
##########
File path:
nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/QuerySplunkIndexingStatus.java
##########
@@ -162,12 +164,13 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
for (final FlowFile flowFile : flowFiles) {
final Optional<Long> sentAt =
extractLong(flowFile.getAttribute(SplunkAPICall.RESPONDED_AT_ATTRIBUTE));
final Optional<Long> ackId =
extractLong(flowFile.getAttribute(SplunkAPICall.ACKNOWLEDGEMENT_ID_ATTRIBUTE));
+ final Optional<Boolean> ackChecked =
extractBoolean(flowFile.getAttribute(ACKCHECKED_ATTRIBUTE));
if (!sentAt.isPresent() || !ackId.isPresent()) {
getLogger().error("Flow file ({}) attributes {} and {} are
expected to be set using 64-bit integer values!",
new Object[]{flowFile.getId(),
SplunkAPICall.RESPONDED_AT_ATTRIBUTE,
SplunkAPICall.ACKNOWLEDGEMENT_ID_ATTRIBUTE});
session.transfer(flowFile, RELATIONSHIP_FAILURE);
- } else if (sentAt.get() + ttl < currentTime) {
+ } else if (ackChecked.orElse(Boolean.FALSE) && sentAt.get() + ttl
< currentTime) {
Review comment:
Thanks Bence, modified it to primitive in next commit
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]