adarmiento commented on a change in pull request #3700: NIFI-6638: Empty
multiple queues at once at different flow levels
URL: https://github.com/apache/nifi/pull/3700#discussion_r333203356
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/AbstractFlowFileQueue.java
##########
@@ -295,6 +300,65 @@ public void run() {
return dropRequest;
}
+ public static Set<DropFlowFileStatus> dropFlowFiles(final
Set<FlowFileQueue> flowFileQueues, final String requestIdentifier, final String
requestor) {
+ // purge any old requests from the map just to keep it clean. But if
there are very requests, which is usually the case, then don't bother
+ if (multiQueueDropRequestMap.size() > 50) {
+ final Set<String> toDrop = new HashSet<>();
+
+ for (final Map.Entry<String, Set<DropFlowFileRequest>> entry :
multiQueueDropRequestMap.entrySet()) {
Review comment:
This part looks very complex. Could you please add a little comment?
----------------------------------------------------------------
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]
With regards,
Apache Git Services