tpalfy commented on code in PR #6349:
URL: https://github.com/apache/nifi/pull/6349#discussion_r958603331
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java:
##########
@@ -294,6 +306,7 @@ public class TailFile extends AbstractProcessor {
private volatile ByteArrayOutputStream linesBuffer = new
ByteArrayOutputStream();
private volatile Pattern lineStartPattern;
private volatile long maxBufferBytes;
+ private volatile int bufferBytes;
Review Comment:
```suggestion
private volatile int preAllocatedBufferSize;
```
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java:
##########
@@ -281,6 +283,16 @@ public class TailFile extends AbstractProcessor {
.dependsOn(LINE_START_PATTERN)
.build();
+ static final PropertyDescriptor BUFFER_LENGTH = new Builder()
+ .name("Buffer Size")
+ .displayName("Buffer Size")
+ .description("Processor will allocate this amount of data for byte
buffer")
+ .required(true)
+ .addValidator(DATA_SIZE_VALIDATOR)
+ .expressionLanguageSupported(NONE)
+ .defaultValue("65536 B")
+ .build();
Review Comment:
```suggestion
static final PropertyDescriptor PRE_ALLOCATED_BUFFER_SIZE = new
Builder()
.name("pre-allocated-buffer-size")
.displayName("Pre-Allocated Buffer Size")
.description("Set the amount of memory that is pre-allocated for
each tailed file.")
.required(true)
.addValidator(DATA_SIZE_VALIDATOR)
.expressionLanguageSupported(NONE)
.defaultValue("65536 B")
.build();
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]