ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [22/46] incubator-ignite git commit: #gg-9887: Change GridDrDataStreamerFailoverSelfTest.
Date Tue, 17 Mar 2015 16:08:30 GMT
#gg-9887: Change GridDrDataStreamerFailoverSelfTest.


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

Branch: refs/heads/ignite-sql-tests
Commit: 9d7bf978a5299cff179054cef6fc91bde844a52a
Parents: fb11bcf
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Mar 16 13:07:08 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Mar 16 13:07:08 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/gridify/AbstractAopTest.java  |  2 +-
 .../IgniteCacheObjectProcessorImpl.java         | 80 ++++++++++++--------
 .../dr/IgniteDrDataStreamerCacheUpdater.java    |  1 +
 3 files changed, 52 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d7bf978/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java
----------------------------------------------------------------------
diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java b/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java
index 8a5114a..5a03dfd 100644
--- a/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java
+++ b/modules/aop/src/test/java/org/apache/ignite/gridify/AbstractAopTest.java
@@ -419,7 +419,7 @@ public abstract class AbstractAopTest extends GridCommonAbstractTest {
 
             assert res == 1 : "Method gridifyDefault returned wrong value [result=" + res
+ ", expected=1]";
 
-`            assert locDepCnt.get() == 1 : "Invalid local deployment count [expected=1, got="
+ locDepCnt.get() + ']';
+            assert locDepCnt.get() == 1 : "Invalid local deployment count [expected=1, got="
+ locDepCnt.get() + ']';
             assert rmtDepCnt.get() == 1 : "Invalid remote deployment count [expected=1, got="
+ rmtDepCnt.get() + ']';
         }
         finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d7bf978/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index fb89500..bb06018 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -223,36 +223,7 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter
impleme
         if (!userObj)
             new CacheObjectImpl(obj, null);
 
-        return new CacheObjectImpl(obj, null) {
-            @Nullable @Override public <T> T value(CacheObjectContext ctx, boolean
cpy) {
-                return super.value(ctx, false); // Do not need copy since user value is not
in cache.
-            }
-
-            @Override public CacheObject prepareForCache(CacheObjectContext ctx) {
-                if (!ctx.processor().immutable(val)) {
-                    try {
-                        if (valBytes == null)
-                            valBytes = ctx.processor().marshal(ctx, val);
-
-                        if (ctx.unmarshalValues()) {
-                            ClassLoader ldr = ctx.p2pEnabled() ?
-                                IgniteUtils.detectClass(this.val).getClassLoader() : val.getClass().getClassLoader();
-
-                            Object val = ctx.processor().unmarshal(ctx, valBytes, ldr);
-
-                            return new CacheObjectImpl(val, valBytes);
-                        }
-
-                        return new CacheObjectImpl(null, valBytes);
-                    }
-                    catch (IgniteCheckedException e) {
-                        throw new IgniteException("Failed to marshal object: " + val, e);
-                    }
-                }
-                else
-                    return new CacheObjectImpl(val, valBytes);
-            }
-        };
+        return new IgniteCacheObjectImpl(obj, null);
     }
 
     /** {@inheritDoc} */
@@ -344,4 +315,53 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter
impleme
     @Override public boolean hasField(Object obj, String fieldName) {
         return false;
     }
+
+    /**
+     *
+     */
+    private class IgniteCacheObjectImpl extends CacheObjectImpl {
+        /**
+         *
+         */
+        public IgniteCacheObjectImpl() {
+            //No-op.
+        }
+
+        /**
+         *
+         */
+        public IgniteCacheObjectImpl(Object val, byte[] valBytes) {
+            super(val, valBytes);
+        }
+
+        /** {@inheritDoc} */
+        @Nullable @Override public <T> T value(CacheObjectContext ctx, boolean cpy)
{
+            return super.value(ctx, false); // Do not need copy since user value is not in
cache.
+        }
+
+        /** {@inheritDoc} */
+        @Override public CacheObject prepareForCache(CacheObjectContext ctx) {
+            if (!ctx.processor().immutable(val)) {
+                try {
+                    if (valBytes == null)
+                        valBytes = ctx.processor().marshal(ctx, val);
+
+                    if (ctx.unmarshalValues()) {
+                        ClassLoader ldr = ctx.p2pEnabled() ?
+                            IgniteUtils.detectClass(this.val).getClassLoader() : val.getClass().getClassLoader();
+
+                        Object val = ctx.processor().unmarshal(ctx, valBytes, ldr);
+
+                        return new CacheObjectImpl(val, valBytes);
+                    }
+
+                    return new CacheObjectImpl(null, valBytes);
+                }
+                catch (IgniteCheckedException e) {
+                    throw new IgniteException("Failed to marshal object: " + val, e);
+                }
+            } else
+                return new CacheObjectImpl(val, valBytes);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9d7bf978/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/IgniteDrDataStreamerCacheUpdater.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/IgniteDrDataStreamerCacheUpdater.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/IgniteDrDataStreamerCacheUpdater.java
index af8b088..c6b21b2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/IgniteDrDataStreamerCacheUpdater.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/dr/IgniteDrDataStreamerCacheUpdater.java
@@ -60,6 +60,7 @@ public class IgniteDrDataStreamerCacheUpdater implements IgniteDataStreamer.Upda
             CacheObjectContext cacheObjCtx = cache.context().cacheObjectContext();
 
             for (Map.Entry<KeyCacheObject, CacheObject> entry0 : col) {
+                System.out.println("!!!!!!!!!!!!!!!!!!!!!! GridCacheRawVersionedEntry TEST!!!!!!!!!!!!!!!
");
                 GridCacheRawVersionedEntry entry = (GridCacheRawVersionedEntry)entry0;
 
                 entry.unmarshal(cacheObjCtx, ctx.config().getMarshaller());


Mime
View raw message