ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [01/50] ignite git commit: IGNITE-1786: Fix for CacheQueryExample.
Date Mon, 25 Jan 2016 11:55:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1786 [created] 1138cf8c7


IGNITE-1786: Fix for CacheQueryExample.


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

Branch: refs/heads/ignite-1786
Commit: 15a5834e0f9cf81abfc02b66af7153319696ccfd
Parents: 7cd80c5
Author: isapego <isapego@gridgain.com>
Authored: Wed Dec 30 16:56:33 2015 +0300
Committer: isapego <isapego@gridgain.com>
Committed: Wed Dec 30 16:56:33 2015 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheQueryExample.java    | 24 +++++---------------
 1 file changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/15a5834e/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
index 95d661b..98af93c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
@@ -63,10 +63,10 @@ import org.apache.ignite.lang.IgniteBiPredicate;
  */
 public class CacheQueryExample {
     /** Organizations cache name. */
-    private static final String ORG_CACHE = "Organizations";
+    private static final String ORG_CACHE = CacheQueryExample.class.getSimpleName() + "Organizations";
 
     /** Persons cache name. */
-    private static final String PERSON_CACHE = "Persons";
+    private static final String PERSON_CACHE = CacheQueryExample.class.getSimpleName() +
"Persons";
 
     /**
      * Executes example.
@@ -117,10 +117,6 @@ public class CacheQueryExample {
 
                 // Example for SQL-based fields queries that uses joins.
                 sqlFieldsQueryWithJoin();
-
-                synchronized (CacheQueryExample.class) {
-                    CacheQueryExample.class.wait();
-                }
             }
 
             print("Cache query example finished.");
@@ -286,14 +282,10 @@ public class CacheQueryExample {
         personCache.clear();
 
         // People.
-        Person p1 = new Person(org1, "John", "Doe", 2000, "Master Degree.");
-        Person p2 = new Person(org1, "Jane", "Doe", 1000, "Bachelor Degree.");
-        Person p3 = new Person(org2, "John", "Smith", 1000, "Bachelor Degree.");
-        Person p4 = new Person(org2, "Jane", "Smith", 2000, "Master Degree.");
-        Person p5 = new Person(org2, "John", "Roe", 1500, "Bachelor Degree.");
-        Person p6 = new Person(org2, "Jane", "Roe", 1000, "Bachelor Degree.");
-        Person p7 = new Person(org1, "Richard", "Miles", 2500, "Master Degree.");
-        Person p8 = new Person(org2, "Mary", "Major", 900, "Bachelor Degree.");
+        Person p1 = new Person(org1, "John", "Doe", 2000, "John Doe has Master Degree.");
+        Person p2 = new Person(org1, "Jane", "Doe", 1000, "Jane Doe has Bachelor Degree.");
+        Person p3 = new Person(org2, "John", "Smith", 1000, "John Smith has Bachelor Degree.");
+        Person p4 = new Person(org2, "Jane", "Smith", 2000, "Jane Smith has Master Degree.");
 
         // Note that in this example we use custom affinity key for Person objects
         // to ensure that all persons are collocated with their organizations.
@@ -301,10 +293,6 @@ public class CacheQueryExample {
         personCache.put(p2.key(), p2);
         personCache.put(p3.key(), p3);
         personCache.put(p4.key(), p4);
-        personCache.put(p5.key(), p5);
-        personCache.put(p6.key(), p6);
-        personCache.put(p7.key(), p7);
-        personCache.put(p8.key(), p8);
     }
 
     /**


Mime
View raw message