Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1580#discussion_r106408789
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
 ---
    @@ -199,13 +199,16 @@ public FileSystemRepository(final NiFiProperties 
nifiProperties) throws IOExcept
                 for (final Map.Entry<String, Path> container : 
containers.entrySet()) {
                     final String containerName = container.getKey();
     
    -                final long capacity = 
Files.getFileStore(container.getValue()).getTotalSpace();
    +                final long capacity = 
container.getValue().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 --
    
    @PuspenduBanerjee the issue that @mosermw brought up is a valid point, I 
believe. The idea here was to ensure that things are backward compatible. 
However, this is essentially converting an IOException to a RuntimeException, 
which is certainly not backward compatible, because the code that calls this 
method would have been forced to catch IOException but likely is not catching 
RuntimeException. I believe this needs to remain an IOException or not be 
thrown at all.


---
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.
---

Reply via email to