ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [57/61] [abbrv] incubator-ignite git commit: # IGNITE-371: Applied Ivan V. patch for fixing "usedSpace" secondary file system issue.
Date Thu, 05 Mar 2015 10:49:28 GMT
# 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-143
Commit: ae413fb5871436f7d57761d0dca85a5aa68b2a37
Parents: 49af1cf
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Mar 5 11:57:43 2015 +0300
Committer: vozerov-gridgain <vozerov@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.");


Mime
View raw message