ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [18/24] incubator-ignite git commit: IGNITE-52 - Fixed near reader add.
Date Sat, 14 Feb 2015 07:40:27 GMT
IGNITE-52 - Fixed near reader add.


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

Branch: refs/heads/sprint-1
Commit: e91f214f829b1615578e430d16a09c1a14ac68d9
Parents: 0c9c5b8
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Fri Feb 13 12:27:39 2015 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Fri Feb 13 12:27:39 2015 -0800

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheAdapter.java  | 15 ++++-----------
 .../internal/processors/cache/GridCacheEntryEx.java  |  1 -
 .../cache/distributed/dht/GridDhtGetFuture.java      |  2 +-
 .../dht/GridDhtTransactionalCacheAdapter.java        |  1 -
 .../distributed/dht/GridPartitionedGetFuture.java    |  1 -
 .../dht/GridCacheAtomicNearCacheSelfTest.java        |  2 --
 6 files changed, 5 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e91f214f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 876cad8..d7e92d0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -694,8 +694,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public Boolean applyx(IgniteInternalFuture<Map<K, V>> fut)
throws IgniteCheckedException {
                 Map<K, V> kvMap = fut.get();
 
-                Map<K, Boolean> res = U.newHashMap(kvMap.size());
-
                 for (Map.Entry<K, V> entry : kvMap.entrySet())
                     if (entry.getValue() == null)
                         return false;
@@ -713,7 +711,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         PeekModes modes = parsePeekModes(peekModes);
 
-        List<Iterator<Cache.Entry<K, V>>> its = new ArrayList<>();
+        Collection<Iterator<Cache.Entry<K, V>>> its = new ArrayList<>();
 
         if (ctx.isLocal()) {
             modes.primary = true;
@@ -2546,7 +2544,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
                     res = resMap.isEmpty() ? null : resMap.values().iterator().next();
                 }
 
-                return res != null ? res : new CacheInvokeResult<T>((T)null);
+                return res != null ? res : new CacheInvokeResult<>((T)null);
             }
         });
     }
@@ -4130,12 +4128,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         PeekModes modes = parsePeekModes(peekModes);
 
-        ClusterGroup grp;
-
-        if (modes.near)
-            grp = ctx.grid().forCacheNodes(name(), SIZE_NODES);
-        else
-            grp = ctx.grid().forDataNodes(name());
+        ClusterGroup grp = modes.near ? ctx.grid().forCacheNodes(name(), SIZE_NODES) : ctx.grid().forDataNodes(name());
 
         Collection<ClusterNode> nodes = grp.nodes();
 
@@ -4986,7 +4979,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
      * @param filter Filters to evaluate.
      * @return Key set.
      */
-    public Set<K> keySet(@Nullable IgnitePredicate<Cache.Entry<K, V>>...
filter) {
+    @Override public Set<K> keySet(@Nullable IgnitePredicate<Cache.Entry<K, V>>...
filter) {
         return map.keySet(filter);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e91f214f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index fae19ba..f044347 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -320,7 +320,6 @@ public interface GridCacheEntryEx<K, V> {
     /**
      * Reloads entry from underlying storage.
      *
-     * @param filter Filter for entries.
      * @return Reloaded value.
      * @throws IgniteCheckedException If reload failed.
      * @throws GridCacheEntryRemovedException If entry has been removed.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e91f214f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
index 14312c3..989cc5e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
@@ -323,7 +323,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
                     // TODO: To fix, check that reader is contained in the list of readers
once
                     // TODO: again after the returned future completes - if not, try again.
                     // TODO: Also, why is info read before transactions are complete, and
not after?
-                    IgniteInternalFuture<Boolean> f = (!e.deleted() && k.getValue()
&& skipVals) ?
+                    IgniteInternalFuture<Boolean> f = (!e.deleted() && k.getValue()
&& !skipVals) ?
                         e.addReader(reader, msgId, topVer) : null;
 
                     if (f != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e91f214f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 000f2e8..97f4126 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -41,7 +41,6 @@ import javax.cache.*;
 import java.io.*;
 import java.util.*;
 
-import static org.apache.ignite.internal.managers.communication.GridIoPolicy.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheUtils.*;
 import static org.apache.ignite.transactions.IgniteTxConcurrency.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e91f214f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index c29e673..79f6b4d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -32,7 +32,6 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
 
-import javax.cache.*;
 import java.io.*;
 import java.util.*;
 import java.util.concurrent.atomic.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e91f214f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
index 9e4adf7..1627a21 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
@@ -735,8 +735,6 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest
{
      * @return Key with properties specified by the given mode.
      */
     private Integer key(Ignite ignite, int mode) {
-        IgniteCache<Integer, Integer> cache = ignite.jcache(null);
-
         CacheAffinity<Integer> aff = ignite.affinity(null);
 
         Integer key = null;


Mime
View raw message