You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2015/03/05 10:05:56 UTC
[56/58] [abbrv] incubator-ignite git commit: # IGNITE-371: Applied
Ivan V. patch for fixing "usedSpace" secondary file system issue.
# IGNITE-371: Applied Ivan V. patch for fixing "usedSpace" secondary file system issue.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ae413fb5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ae413fb5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ae413fb5
Branch: refs/heads/ignite-313
Commit: ae413fb5871436f7d57761d0dca85a5aa68b2a37
Parents: 49af1cf
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Mar 5 11:57:43 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Mar 5 11:57:43 2015 +0300
----------------------------------------------------------------------
.../ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae413fb5/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
index 98f2e46..f5d7055 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
@@ -390,7 +390,9 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys
/** {@inheritDoc} */
@Override public long usedSpaceSize() {
try {
- return fileSys.getContentSummary(new Path(fileSys.getUri())).getSpaceConsumed();
+ // We don't use FileSystem#getUsed() since it counts only the files
+ // in the filesystem root, not all the files recursively.
+ return fileSys.getContentSummary(new Path("/")).getSpaceConsumed();
}
catch (IOException e) {
throw handleSecondaryFsError(e, "Failed to get used space size of file system.");