ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: [IGNITE-371]: fixed #usedSpaceSize()
Date Wed, 04 Mar 2015 16:55:11 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-371 [created] 780029367


[IGNITE-371]: fixed #usedSpaceSize()


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/78002936
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/78002936
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/78002936

Branch: refs/heads/ignite-371
Commit: 7800293678470ae2e257412d0e907cdd8c6e9487
Parents: 9b2a034
Author: iveselovskiy <iveselovskiy@gridgain.com>
Authored: Wed Mar 4 19:54:25 2015 +0300
Committer: iveselovskiy <iveselovskiy@gridgain.com>
Committed: Wed Mar 4 19:54:25 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/igfs/hadoop/IgfsHadoopFileSystemWrapper.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78002936/modules/hadoop/src/main/java/org/apache/ignite/igfs/hadoop/IgfsHadoopFileSystemWrapper.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/igfs/hadoop/IgfsHadoopFileSystemWrapper.java
b/modules/hadoop/src/main/java/org/apache/ignite/igfs/hadoop/IgfsHadoopFileSystemWrapper.java
index bdab61d..385f5ad 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/igfs/hadoop/IgfsHadoopFileSystemWrapper.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/igfs/hadoop/IgfsHadoopFileSystemWrapper.java
@@ -390,7 +390,11 @@ public class IgfsHadoopFileSystemWrapper implements Igfs, AutoCloseable
{
     /** {@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.
+            ContentSummary summary = fileSys.getContentSummary(new Path("/"));
+
+            return summary.getSpaceConsumed();
         }
         catch (IOException e) {
             throw handleSecondaryFsError(e, "Failed to get used space size of file system.");


Mime
View raw message