You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2017/03/20 14:15:34 UTC
nifi git commit: NIFI-3579: Incorporated Review comments. This closes
#1602.
Repository: nifi
Updated Branches:
refs/heads/master 5daeba6e0 -> 552148e9e
NIFI-3579: Incorporated Review comments. This closes #1602.
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/552148e9
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/552148e9
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/552148e9
Branch: refs/heads/master
Commit: 552148e9e7d45be4d298ee48afd7471405a5bfad
Parents: 5daeba6
Author: Puspendu Banerjee <Pu...@gmail.com>
Authored: Fri Mar 17 13:54:40 2017 -0500
Committer: Mark Payne <ma...@hotmail.com>
Committed: Mon Mar 20 10:15:24 2017 -0400
----------------------------------------------------------------------
.../nifi/controller/repository/FileSystemRepository.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/552148e9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
index b899a36..eaa2cbc 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
@@ -387,7 +387,7 @@ public class FileSystemRepository implements ContentRepository {
}
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");
+ throw new IOException("System returned total space of the partition for " + containerName + " is zero byte. Nifi can not create a zero sized FileSystemRepository");
}
return capacity;
@@ -399,11 +399,7 @@ public class FileSystemRepository implements ContentRepository {
if (path == null) {
throw new IllegalArgumentException("No container exists with name " + containerName);
}
- long usableSpace=path.toFile().getUsableSpace();
- if(usableSpace==0) {
- throw new RuntimeException("System returned usable space of the partition for " + containerName + " is zero byte. Nifi can not create a zero sized FileSystemRepository");
- }
- return usableSpace;
+ return path.toFile().getUsableSpace();
}
@Override