NIFI-2751 - Pull batch in round-robin manner - fix for / by 0

This commit is contained in:
Pierre Villard 2016-11-12 12:10:43 +01:00 committed by Mark Payne
parent 76b859c4ef
commit 45bc3e054d
1 changed files with 4 additions and 0 deletions

View File

@ -1443,6 +1443,10 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
// get batch of flow files in a round-robin manner
final List<Connection> connections = context.getPollableConnections();
if(connections.isEmpty()) {
return Collections.emptyList();
}
final Connection connection = connections.get(context.getNextIncomingConnectionIndex() % connections.size());
return get(connection, new QueuePoller() {