ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [13/50] [abbrv] incubator-ignite git commit: sp-1 fixing tests
Date Thu, 12 Feb 2015 23:23:54 GMT
sp-1 fixing tests


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

Branch: refs/heads/ignite-9655-merge
Commit: c443245b12e7e4272ab006c51851396374877ff8
Parents: fb38190
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Thu Feb 12 13:19:52 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Thu Feb 12 13:19:52 2015 +0300

----------------------------------------------------------------------
 .../processors/fs/GridGgfsDataManager.java      | 15 +++----
 .../cache/GridCacheAbstractMetricsSelfTest.java | 41 +++++++++++++++-----
 ...idCacheAtomicPartitionedMetricsSelfTest.java |  5 ---
 3 files changed, 36 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c443245b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java
index 90234ee..67bf31c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManager.java
@@ -392,16 +392,11 @@ public class GridGgfsDataManager extends GridGgfsManager {
         // Schedule block request BEFORE prefetch requests.
         final GridGgfsBlockKey key = blockKey(blockIdx, fileInfo);
 
-//        TODO ignite-96
-//        if (log.isDebugEnabled()) {
-//            Entry<GridGgfsBlockKey, byte[]> entry = dataCachePrj.entry(key);
-//
-//            assert entry != null;
-//
-//            if (!entry.primary() && !entry.backup())
-//                log.debug("Reading non-local data block [path=" + path + ", fileInfo="
+ fileInfo +
-//                    ", blockIdx=" + blockIdx + ']');
-//        }
+        if (log.isDebugEnabled() &&
+            dataCache.affinity().isPrimaryOrBackup(ggfsCtx.kernalContext().discovery().localNode(),
key)) {
+            log.debug("Reading non-local data block [path=" + path + ", fileInfo=" + fileInfo
+
+                ", blockIdx=" + blockIdx + ']');
+        }
 
         IgniteInternalFuture<byte[]> fut = dataCachePrj.getAsync(key);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c443245b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index e5ab63f..39c63aa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -697,7 +697,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
     }
 
     /**
-     * @param inTx
+     * @param inTx {@code true} for tx.
      * @throws Exception If failed.
      */
     private void checkTtl(boolean inTx) throws Exception {
@@ -711,7 +711,12 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         c.put(key, 1);
 
-        GridCacheEntryEx entry = ((IgniteKernal)grid(0)).internalCache().entryEx(key);
+        GridCacheAdapter<Object, Object> c0 = ((IgniteKernal)grid(0)).internalCache();
+
+        if (c0.isNear())
+            c0 = c0.context().near().dht();
+
+        GridCacheEntryEx entry = c0.entryEx(key);
 
         assert entry != null;
 
@@ -752,8 +757,12 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         for (int i = 0; i < gridCount(); i++) {
             if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key)) {
-                GridCacheEntryEx<Object, Object> curEntry =
-                    ((IgniteKernal)grid(0)).internalCache().entryEx(key);
+                c0 = ((IgniteKernal)grid(i)).internalCache();
+
+                if (c0.isNear())
+                    c0 = c0.context().near().dht();
+
+                GridCacheEntryEx<Object, Object> curEntry = c0.peekEx(key);
 
                 assertEquals(ttl, curEntry.ttl());
 
@@ -778,8 +787,12 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         for (int i = 0; i < gridCount(); i++) {
             if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key)) {
-                GridCacheEntryEx<Object, Object> curEntry =
-                    ((IgniteKernal)grid(0)).internalCache().entryEx(key);
+                c0 = ((IgniteKernal)grid(i)).internalCache();
+
+                if (c0.isNear())
+                    c0 = c0.context().near().dht();
+
+                GridCacheEntryEx<Object, Object> curEntry = c0.peekEx(key);
 
                 assertEquals(ttl, curEntry.ttl());
 
@@ -804,8 +817,12 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         for (int i = 0; i < gridCount(); i++) {
             if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key)) {
-                GridCacheEntryEx<Object, Object> curEntry =
-                    ((IgniteKernal)grid(0)).internalCache().entryEx(key);
+                c0 = ((IgniteKernal)grid(i)).internalCache();
+
+                if (c0.isNear())
+                    c0 = c0.context().near().dht();
+
+                GridCacheEntryEx<Object, Object> curEntry = c0.peekEx(key);
 
                 assertEquals(ttl, curEntry.ttl());
 
@@ -834,8 +851,12 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         for (int i = 0; i < gridCount(); i++) {
             if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key)) {
-                GridCacheEntryEx<Object, Object> curEntry =
-                    ((IgniteKernal)grid(0)).internalCache().entryEx(key);
+                c0 = ((IgniteKernal)grid(i)).internalCache();
+
+                if (c0.isNear())
+                    c0 = c0.context().near().dht();
+
+                GridCacheEntryEx<Object, Object> curEntry = c0.peekEx(key);
 
                 assertEquals(ttl, curEntry.ttl());
                 assertEquals(expireTimes[i], curEntry.expireTime());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c443245b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedMetricsSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedMetricsSelfTest.java
index 77ab65c..b61ff36 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedMetricsSelfTest.java
@@ -61,9 +61,4 @@ public class GridCacheAtomicPartitionedMetricsSelfTest extends GridCacheAbstract
     @Override protected int expectedMissesPerPut(boolean isPrimary) {
         return 1;
     }
-
-    /** {@inheritDoc} */
-    @Override public void testNonTxEvictions() throws Exception {
-        //TODO: IGNITE-96 eviction.
-    }
 }


Mime
View raw message