JonathanKessler commented on a change in pull request #4780:
URL: https://github.com/apache/nifi/pull/4780#discussion_r583115768
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
##########
@@ -920,7 +921,14 @@ public SwapSummary recoverSwappedFlowFiles() {
return new StandardSwapSummary(new QueueSize(swapFlowFileCount,
swapByteCount), maxId, resourceClaims);
}
+ public long getMaxActiveQueuedDuration(long fromTimestamp) {
+ // We want the oldest timestamp, which will be the min
+ return fromTimestamp -
activeQueue.parallelStream().map(FlowFile::getLastQueueDate).filter(Objects::nonNull).min(Long::compareTo).orElse(fromTimestamp);
Review comment:
@markap14 Do you have a recommendation as to how to persist & retrieve
the map of swapped queueDates or how to recreate it on startup?
----------------------------------------------------------------
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]