NIFI-1406 Collecting the number of bytes sent regardless if one or multiple FlowFiles are sent.

Reviewed by Tony Kurc (tkurc@apache.org). This closes #176
This commit is contained in:
Aldrin Piri 2016-01-17 22:14:17 -05:00 committed by Tony Kurc
parent a2fb5fc22a
commit bc75dd3c17
1 changed files with 5 additions and 5 deletions

View File

@ -549,14 +549,14 @@ public class PostHTTP extends AbstractProcessor {
} }
} }
// if we are not sending as flowfile, or if the destination doesn't accept V3 or V2 (streaming) format, bytesToSend += flowFile.getSize();
// then only use a single FlowFile if (bytesToSend > maxBatchBytes.longValue()) {
if (!sendAsFlowFile || !destinationAccepts.isFlowFileV3Accepted() && !destinationAccepts.isFlowFileV2Accepted()) {
break; break;
} }
bytesToSend += flowFile.getSize(); // if we are not sending as flowfile, or if the destination doesn't accept V3 or V2 (streaming) format,
if (bytesToSend > maxBatchBytes.longValue()) { // then only use a single FlowFile
if (!sendAsFlowFile || !destinationAccepts.isFlowFileV3Accepted() && !destinationAccepts.isFlowFileV2Accepted()) {
break; break;
} }
} }