ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [01/16] ignite git commit: Implemented alternative listing.
Date Tue, 15 Mar 2016 13:35:10 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2813 [created] 0bdd7f266


Implemented alternative listing.


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

Branch: refs/heads/ignite-2813
Commit: ee08e00a77a7fc477f53a0bd59d89fa3d7dbc3fb
Parents: 18de768
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Mar 15 15:09:42 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Mar 15 15:09:42 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/igfs/IgfsFileInfo.java  | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ee08e00a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfo.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfo.java
index 0a85657..09c529f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfo.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.igfs.IgfsPath;
@@ -74,6 +75,9 @@ public final class IgfsFileInfo implements Externalizable {
     @GridToStringInclude
     private Map<String, IgfsListingEntry> listing;
 
+    /** Directory listing. */
+    private Map<String, IgniteUuid> listing2;
+
     /** Whether data blocks of this entry should never be excluded. */
     private boolean evictExclude;
 
@@ -300,6 +304,13 @@ public final class IgfsFileInfo implements Externalizable {
         if (listing == null && isDir)
             this.listing = Collections.emptyMap();
 
+        if (this.listing != null) {
+            this.listing2 = new HashMap<>(this.listing.size());
+
+            for (Map.Entry<String, IgfsListingEntry> entry : this.listing.entrySet())
+                this.listing2.put(entry.getKey(), entry.getValue().fileId());
+        }
+
         this.lockId = lockId;
         this.evictExclude = evictExclude;
     }
@@ -420,6 +431,13 @@ public final class IgfsFileInfo implements Externalizable {
     }
 
     /**
+     * @return Directory listing.
+     */
+    public Map<String, IgniteUuid> listing2() {
+        return listing2 != null ? listing2 : Collections.<String, IgniteUuid>emptyMap();
+    }
+
+    /**
      * @return Affinity key used for single-node file collocation. If {@code null}, usual
      *      mapper procedure is used for block affinity detection.
      */
@@ -514,6 +532,13 @@ public final class IgfsFileInfo implements Externalizable {
         modificationTime = in.readLong();
         evictExclude = in.readBoolean();
         path = (IgfsPath)in.readObject();
+
+        if (listing != null) {
+            listing2 = new HashMap<>(listing.size());
+
+            for (Map.Entry<String, IgfsListingEntry> entry : listing.entrySet())
+                listing2.put(entry.getKey(), entry.getValue().fileId());
+        }
     }
 
     /** {@inheritDoc} */


Mime
View raw message