ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [1/2] incubator-ignite git commit: ignite-96 wip (entire project compilable)
Date Sat, 07 Feb 2015 13:44:18 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-96 08db7f3c5 -> ca6caeed1


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca6caeed/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
index 095cc5d..9089fe0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
@@ -33,6 +33,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import javax.cache.configuration.*;
 import java.util.*;
 
@@ -333,8 +334,8 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
         assert cache.isEmpty();
         assertEquals(0, cache.size());
 
-        cache.projection(new P1<CacheEntry<Integer, ValueObject>>() {
-            @Override public boolean apply(CacheEntry<Integer, ValueObject> e) {
+        cache.projection(new P1<Cache.Entry<Integer, ValueObject>>() {
+            @Override public boolean apply(Cache.Entry<Integer, ValueObject> e) {
                 return e.getKey() >= 5;
             }
         }).reloadAll(Arrays.asList(keys));
@@ -370,8 +371,8 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
         assert cache.isEmpty();
         assertEquals(0, cache.size());
 
-        cache.projection(new P1<CacheEntry<Integer, ValueObject>>() {
-            @Override public boolean apply(CacheEntry<Integer, ValueObject> e) {
+        cache.projection(new P1<Cache.Entry<Integer, ValueObject>>() {
+            @Override public boolean apply(Cache.Entry<Integer, ValueObject> e) {
                 return e.getKey() >= 5;
             }
         }).reloadAllAsync(Arrays.asList(keys)).get();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca6caeed/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
index 9f58faa..e953c7b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.spi.swapspace.*;
 import org.apache.ignite.spi.swapspace.noop.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -427,11 +428,12 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
             assert val != null;
             assert val.value() == i;
 
-            CacheEntry<Integer, CacheValue> entry = cache.entry(i);
+            Cache.Entry<Integer, CacheValue> entry = cache.entry(i);
 
             assert entry != null;
 
-            versions.put(i, entry.version());
+            assert false : "ignite-96";
+            // versions.put(i, entry.version());
         }
 
         assert swapCnt.get() == 0;
@@ -637,7 +639,7 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
     private void checkEntries(CacheProjection<Integer, CacheValue> cache,
         int lowerBound, int upperBound) throws Exception {
         for (int i = lowerBound; i < upperBound; i++) {
-            CacheEntry<Integer, CacheValue> entry = cache.entry(i);
+            Cache.Entry<Integer, CacheValue> entry = cache.entry(i);
 
             assert entry != null;
             assert entry.getKey() != null;
@@ -646,7 +648,8 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
 
             assert val != null;
             assert entry.getKey() == val.value();
-            assert entry.version().equals(versions.get(i));
+            assert false : "ignite-96";
+//            assert entry.version().equals(versions.get(i));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca6caeed/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
index 01debfc..568987f 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
@@ -168,22 +168,24 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
 
         checkResult(entries, p1, p3, p4);
 
-        // Now do the same filtering but using projection.
-        qry = cache0.projection(F.<UUID, Person>cachePrimary()).queries().createSqlQuery(Person.class,
-            "salary < 2000");
-
-        qry.keepAll(true);
-
-        entries = qry.execute().get();
-
-        assert entries != null;
-
-        info("Queried persons: " + F.viewReadOnly(entries, F.<Person>mapEntry2Value()));
-
-        // Expect result including backup persons.
-        assertEquals(3, entries.size());
-
-        checkResult(entries, p1, p3, p4);
+        assert false : "ignite-96";
+
+//        // Now do the same filtering but using projection.
+//        qry = cache0.projection(F.<UUID, Person>cachePrimary()).queries().createSqlQuery(Person.class,
+//            "salary < 2000");
+//
+//        qry.keepAll(true);
+//
+//        entries = qry.execute().get();
+//
+//        assert entries != null;
+//
+//        info("Queried persons: " + F.viewReadOnly(entries, F.<Person>mapEntry2Value()));
+//
+//        // Expect result including backup persons.
+//        assertEquals(3, entries.size());
+//
+//        checkResult(entries, p1, p3, p4);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca6caeed/modules/scalar/src/main/scala/org/apache/ignite/scalar/ScalarConversions.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/main/scala/org/apache/ignite/scalar/ScalarConversions.scala
b/modules/scalar/src/main/scala/org/apache/ignite/scalar/ScalarConversions.scala
index f354054..452793a 100644
--- a/modules/scalar/src/main/scala/org/apache/ignite/scalar/ScalarConversions.scala
+++ b/modules/scalar/src/main/scala/org/apache/ignite/scalar/ScalarConversions.scala
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.scalar
 
+import javax.cache.Cache
+
 import org.apache.ignite.Ignite
 import org.apache.ignite.cache._
 import org.apache.ignite.cluster.ClusterGroup
@@ -270,8 +272,8 @@ trait ScalarConversions {
      *
      * @param p Cache KV-pair predicate to convert.
      */
-    implicit def toEntryPred[K, V](p: (K, V) => Boolean): (_ >: CacheEntry[K, V]) =>
Boolean =
-        (e: CacheEntry[K, V]) =>
+    implicit def toEntryPred[K, V](p: (K, V) => Boolean): (_ >: Cache.Entry[K, V])
=> Boolean =
+        (e: Cache.Entry[K, V]) =>
             p(e.getKey, e.getValue)
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca6caeed/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCacheProjectionPimp.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCacheProjectionPimp.scala
b/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCacheProjectionPimp.scala
index 50cdb92..e9308f8 100644
--- a/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCacheProjectionPimp.scala
+++ b/modules/scalar/src/main/scala/org/apache/ignite/scalar/pimps/ScalarCacheProjectionPimp.scala
@@ -17,8 +17,10 @@
 
 package org.apache.ignite.scalar.pimps
 
+import javax.cache.Cache
+
 import org.apache.ignite._
-import org.apache.ignite.cache.{CacheEntry, CacheProjection}
+import org.apache.ignite.cache.CacheProjection
 import org.apache.ignite.cluster.ClusterGroup
 import org.apache.ignite.internal.util.scala.impl
 import org.apache.ignite.lang.{IgniteBiTuple, IgniteClosure, IgnitePredicate, IgniteReducer}
@@ -69,7 +71,7 @@ object ScalarCacheProjectionPimp {
  * Scala's side method with `$` suffix.
  */
 class ScalarCacheProjectionPimp[@specialized K, @specialized V] extends PimpedType[CacheProjection[K,
V]]
-    with Iterable[CacheEntry[K, V]] {
+    with Iterable[Cache.Entry[K, V]] {
     /** */
     lazy val value: CacheProjection[K, V] = impl
 
@@ -77,7 +79,7 @@ class ScalarCacheProjectionPimp[@specialized K, @specialized V] extends
PimpedTy
     protected var impl: CacheProjection[K, V] = _
 
     /** Type alias. */
-    protected type EntryPred = (CacheEntry[K, V]) => Boolean
+    protected type EntryPred = (Cache.Entry[K, V]) => Boolean
 
     /** Type alias. */
     protected type KvPred = (K, V) => Boolean
@@ -91,7 +93,7 @@ class ScalarCacheProjectionPimp[@specialized K, @specialized V] extends
PimpedTy
     /**
      * Unwraps sequence of functions to sequence of Ignite predicates.
      */
-    private def unwrap(@Nullable p: Seq[EntryPred]): Seq[IgnitePredicate[CacheEntry[K, V]]]
=
+    private def unwrap(@Nullable p: Seq[EntryPred]): Seq[IgnitePredicate[Cache.Entry[K, V]]]
=
         if (p == null)
             null
         else

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ca6caeed/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
index a2f572b..9ffe0b5 100644
--- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
+++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.springframework.cache.annotation.*;
 
+import javax.cache.*;
 import java.io.*;
 import java.util.*;
 
@@ -148,12 +149,16 @@ public class SpringDynamicCacheManager extends SpringCacheManager {
             }
         });
 
-        return F.concat(false, names, F.transform(metaCache.entrySetx(),
-            new IgniteClosure<Map.Entry<MetaKey, org.springframework.cache.Cache>,
String>() {
-                @Override public String apply(Map.Entry<MetaKey, org.springframework.cache.Cache>
e) {
-                    return e.getKey().name;
-                }
-            }));
+        return F.concat(
+            false,
+            names,
+            F.transform(
+                metaCache.entrySetx(),
+                new IgniteClosure<Cache.Entry<MetaKey, org.springframework.cache.Cache>,
String>() {
+                    @Override public String apply(Cache.Entry<MetaKey, org.springframework.cache.Cache>
e) {
+                        return e.getKey().name;
+                    }
+                }));
     }
 
     /**


Mime
View raw message