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,
// then only use a single FlowFile
if (!sendAsFlowFile || !destinationAccepts.isFlowFileV3Accepted() && !destinationAccepts.isFlowFileV2Accepted()) {
bytesToSend += flowFile.getSize();
if (bytesToSend > maxBatchBytes.longValue()) {
break;
}
bytesToSend += flowFile.getSize();
if (bytesToSend > maxBatchBytes.longValue()) {
// if we are not sending as flowfile, or if the destination doesn't accept V3 or V2 (streaming) format,
// then only use a single FlowFile
if (!sendAsFlowFile || !destinationAccepts.isFlowFileV3Accepted() && !destinationAccepts.isFlowFileV2Accepted()) {
break;
}
}