mirror of https://github.com/apache/nifi.git
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:
parent
a2fb5fc22a
commit
bc75dd3c17
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue