Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2010#discussion_r128609849
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
---
@@ -149,6 +154,10 @@ public FileSystemRepository(final NiFiProperties
nifiProperties) throws IOExcept
for (final Path path : fileRespositoryPaths.values()) {
Files.createDirectories(path);
}
+ this.maxFlowFilesPerClaim =
nifiProperties.getMaxFlowFilesPerClaim();
+ this.writableClaimQueue = new
LinkedBlockingQueue<>(maxFlowFilesPerClaim);
+ final String maxAppendableClaimSize =
nifiProperties.getMaxAppendableClaimSize();
+ this.maxAppendableClaimLength =
DataUnit.parseDataSize(maxAppendableClaimSize, DataUnit.B).intValue();
--- End diff --
If this value gets set to something like "10 GB" this could cause some
really problematic (and difficult to track down) problems because the value
would overflow to a negative value. Probably is best to use a longValue() and
then perhaps even cap it at something like 100 MB or 10 MB and if the value is
larger than that, just emit a WARN log event and use the max value.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---