ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [25/38] incubator-ignite git commit: # IGNITE-498: Applied patch from Ivan V..
Date Wed, 01 Apr 2015 20:27:28 GMT
# IGNITE-498: Applied patch from Ivan V..


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

Branch: refs/heads/ignite-645
Commit: dc628223a3000dcd19cab144f755449787d8a373
Parents: f097a5b
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Apr 1 15:42:30 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Apr 1 15:42:30 2015 +0300

----------------------------------------------------------------------
 .../configuration/FileSystemConfiguration.java  |  6 +++++
 .../processors/igfs/IgfsDataManager.java        | 11 +---------
 .../processors/igfs/IgfsFileAffinityRange.java  | 23 ++++----------------
 3 files changed, 11 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc628223/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
index 5793df1..d589cf7 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java
@@ -609,7 +609,10 @@ public class FileSystemConfiguration {
      * Default value is {@link #DFLT_FRAGMENTIZER_LOCAL_WRITES_RATIO}.
      *
      * @return Ratio for local writes space.
+     *
+     * @deprecated Parameter is no longer used.
      */
+    @Deprecated
     public float getFragmentizerLocalWritesRatio() {
         return fragmentizerLocWritesRatio;
     }
@@ -619,7 +622,10 @@ public class FileSystemConfiguration {
      *
      * @param fragmentizerLocWritesRatio Ratio for local file writes.
      * @see #getFragmentizerLocalWritesRatio()
+     *
+     * @deprecated Parameter is no longer used.
      */
+    @Deprecated
     public void setFragmentizerLocalWritesRatio(float fragmentizerLocWritesRatio) {
         this.fragmentizerLocWritesRatio = fragmentizerLocWritesRatio;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc628223/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
index 27a69f1..4b09375 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDataManager.java
@@ -1350,7 +1350,7 @@ public class IgfsDataManager extends IgfsManager {
             return new IgfsBlockKey(fileInfo.id(), fileInfo.affinityKey(), fileInfo.evictExclude(),
block);
 
         // If range is done, no colocated writes are attempted.
-        if (locRange == null || locRange.done())
+        if (locRange == null)
             return new IgfsBlockKey(fileInfo.id(), null, fileInfo.evictExclude(), block);
 
         long blockStart = block * fileInfo.blockSize();
@@ -1362,15 +1362,6 @@ public class IgfsDataManager extends IgfsManager {
             return new IgfsBlockKey(fileInfo.id(), affKey, fileInfo.evictExclude(), block);
         }
 
-        // Check if we have enough free space to do colocated writes.
-        if (dataCachePrj.igfsDataSpaceUsed() > dataCachePrj.igfsDataSpaceMax() *
-            igfsCtx.configuration().getFragmentizerLocalWritesRatio()) {
-            // Forbid further co-location.
-            locRange.markDone();
-
-            return new IgfsBlockKey(fileInfo.id(), null, fileInfo.evictExclude(), block);
-        }
-
         if (!locRange.belongs(blockStart))
             locRange.expand(blockStart, fileInfo.blockSize());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc628223/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
index 439f647..9736f10 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java
@@ -56,9 +56,6 @@ public class IgfsFileAffinityRange implements Message, Externalizable {
     /** Range end offset (endOff + 1 divisible by block size). */
     private long endOff;
 
-    /** Transient flag indicating no further writes should be made to this range. */
-    private boolean done;
-
     /**
      * Empty constructor required by {@link Externalizable}.
      */
@@ -219,20 +216,6 @@ public class IgfsFileAffinityRange implements Message, Externalizable
{
     }
 
     /**
-     * Marks this range as done.
-     */
-    public void markDone() {
-        done = true;
-    }
-
-    /**
-     * @return Done flag.
-     */
-    public boolean done() {
-        return done;
-    }
-
-    /**
      * Checks if range regions are equal.
      *
      * @param other Other range to check against.
@@ -281,7 +264,8 @@ public class IgfsFileAffinityRange implements Message, Externalizable
{
                 writer.incrementState();
 
             case 1:
-                if (!writer.writeBoolean("done", done))
+                // The field 'done' was removed, but its writing preserved for compatibility
reasons.
+                if (!writer.writeBoolean("done", false))
                     return false;
 
                 writer.incrementState();
@@ -326,7 +310,8 @@ public class IgfsFileAffinityRange implements Message, Externalizable
{
                 reader.incrementState();
 
             case 1:
-                done = reader.readBoolean("done");
+                // field 'done' was removed, but reading preserved for compatibility reasons.
+                reader.readBoolean("done");
 
                 if (!reader.isLastRead())
                     return false;


Mime
View raw message