Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1580#discussion_r106409449
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
---
@@ -382,8 +385,12 @@ public long getContainerCapacity(final String
containerName) throws IOException
if (path == null) {
throw new IllegalArgumentException("No container exists with
name " + containerName);
}
+ long capacity = path.toFile().getTotalSpace();
+ if(capacity==0) {
+ throw new RuntimeException("System returned total space of the
partition for " + containerName + " is zero byte. Nifi can not create a zero
sized FileSystemRepository");
--- End diff --
I have the same concern here as above. In the constructor above, it is
likely not a huge deal since it's the constructor and if any Exception gets
thrown, NiFi will fail to startup. However, here it is a much bigger concern,
as this is called from a few different places where IOException is caught.
---
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.
---