You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/04 09:48:10 UTC
[01/17] ignite git commit: ignite-1344: Fixed imports at
java8-examples
Repository: ignite
Updated Branches:
refs/heads/ignite-1364-1 1fc06e013 -> 2ca66975c
ignite-1344: Fixed imports at java8-examples
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0cba13cc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0cba13cc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0cba13cc
Branch: refs/heads/ignite-1364-1
Commit: 0cba13cc0bfcada072925a15e7cdf79752c6b783
Parents: 27cd615
Author: ashutak <as...@gridgain.com>
Authored: Thu Sep 3 13:54:22 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Thu Sep 3 13:54:22 2015 +0300
----------------------------------------------------------------------
.../java8/datagrid/CacheAffinityExample.java | 15 +++++++++++++++
.../examples/java8/messaging/MessagingExample.java | 11 ++++++++++-
.../ignite/java8/examples/BasicExamplesSelfTest.java | 10 +++++++---
.../ignite/java8/examples/CacheExamplesSelfTest.java | 8 +++++---
.../java8/examples/CheckpointExamplesSelfTest.java | 8 ++++----
.../java8/examples/ClusterGroupExampleSelfTest.java | 4 +++-
.../java8/examples/ContinuationExamplesSelfTest.java | 8 +++++---
.../examples/ContinuousMapperExamplesSelfTest.java | 8 +++++---
.../java8/examples/DeploymentExamplesSelfTest.java | 6 ++++--
.../java8/examples/EventsExamplesSelfTest.java | 5 +++--
.../examples/HibernateL2CacheExampleSelfTest.java | 8 +++++---
.../ignite/java8/examples/IgfsExamplesSelfTest.java | 6 ++++--
.../java8/examples/LifecycleExamplesSelfTest.java | 8 +++++---
.../java8/examples/MemcacheRestExamplesSelfTest.java | 4 +++-
.../java8/examples/MessagingExamplesSelfTest.java | 6 ++++--
.../java8/examples/MonteCarloExamplesSelfTest.java | 8 +++++---
.../java8/examples/SpringBeanExamplesSelfTest.java | 8 +++++---
.../ignite/java8/examples/TaskExamplesSelfTest.java | 4 +++-
.../testsuites/IgniteExamplesJ8SelfTestSuite.java | 12 ++++++++++--
19 files changed, 105 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java b/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
index 6635e7f..9d9bacc 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/java8/datagrid/CacheAffinityExample.java
@@ -17,6 +17,21 @@
package org.apache.ignite.examples.java8.datagrid;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteCluster;
+import org.apache.ignite.IgniteCompute;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.examples.ExampleNodeStartup;
+import org.apache.ignite.lang.IgniteRunnable;
+
/**
* This example demonstrates the simplest code that populates the distributed cache
* and co-locates simple closure execution with each key. The goal of this particular
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java b/examples/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java
index f8f9242..97ec58e 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/java8/messaging/MessagingExample.java
@@ -17,6 +17,15 @@
package org.apache.ignite.examples.java8.messaging;
+import java.util.concurrent.CountDownLatch;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteMessaging;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cluster.ClusterGroup;
+import org.apache.ignite.examples.ExampleNodeStartup;
+import org.apache.ignite.examples.ExamplesUtils;
+
/**
* Example that demonstrates how to exchange messages between nodes. Use such
* functionality for cases when you need to communicate to other nodes outside
@@ -154,4 +163,4 @@ public final class MessagingExample {
return unorderedLatch.getCount() > 0;
});
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/BasicExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/BasicExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/BasicExamplesSelfTest.java
index a6bd7c9..cc74cef 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/BasicExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/BasicExamplesSelfTest.java
@@ -17,8 +17,12 @@
package org.apache.ignite.java8.examples;
-import org.apache.ignite.examples.java8.computegrid.*;
-import org.apache.ignite.examples.java8.datastructures.*;
+import org.apache.ignite.examples.java8.computegrid.ComputeBroadcastExample;
+import org.apache.ignite.examples.java8.computegrid.ComputeCallableExample;
+import org.apache.ignite.examples.java8.computegrid.ComputeClosureExample;
+import org.apache.ignite.examples.java8.computegrid.ComputeRunnableExample;
+import org.apache.ignite.examples.java8.datastructures.IgniteExecutorServiceExample;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
/**
* Closure examples self test.
@@ -82,4 +86,4 @@ public class BasicExamplesSelfTest extends GridAbstractExamplesTest {
// public void testTaskSplitExample() throws Exception {
// ComputeTaskSplitExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/CacheExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/CacheExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/CacheExamplesSelfTest.java
index 823210b..4446521 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/CacheExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/CacheExamplesSelfTest.java
@@ -17,7 +17,9 @@
package org.apache.ignite.java8.examples;
-import org.apache.ignite.examples.java8.datagrid.*;
+import org.apache.ignite.examples.java8.datagrid.CacheAffinityExample;
+import org.apache.ignite.examples.java8.datagrid.CacheApiExample;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
//import org.apache.ignite.examples.java8.datagrid.starschema.*;
//import org.apache.ignite.examples.java8.datagrid.store.dummy.*;
@@ -34,7 +36,7 @@ public class CacheExamplesSelfTest extends GridAbstractExamplesTest {
CacheAffinityExample.main(EMPTY_ARGS);
}
-// TODO: IGNITE-711 next example(s) should be implemented for java 8
+// TODO: IGNITE-711 next example(s) should be implemented for java 8
// or testing method(s) should be removed if example(s) does not applicable for java 8.
// /**
// * @throws Exception If failed.
@@ -142,4 +144,4 @@ public class CacheExamplesSelfTest extends GridAbstractExamplesTest {
// public void testCacheContinuousQueryExample() throws Exception {
// CacheContinuousQueryExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/CheckpointExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/CheckpointExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/CheckpointExamplesSelfTest.java
index d1c5f16..b39fe7f 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/CheckpointExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/CheckpointExamplesSelfTest.java
@@ -17,16 +17,16 @@
package org.apache.ignite.java8.examples;
-//import org.apache.ignite.examples.java8.computegrid.failover.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
/**
* Checkpoint examples self test.
*/
public class CheckpointExamplesSelfTest extends GridAbstractExamplesTest {
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
- *
+ *
* Starts remote nodes before each test.
*
* Note: using beforeTestsStarted() to start nodes only once won't work.
@@ -44,4 +44,4 @@ public class CheckpointExamplesSelfTest extends GridAbstractExamplesTest {
// public void testCheckpointExample() throws Exception {
// ComputeFailoverExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/ClusterGroupExampleSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/ClusterGroupExampleSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/ClusterGroupExampleSelfTest.java
index 3dea6ca..34ef68d 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/ClusterGroupExampleSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/ClusterGroupExampleSelfTest.java
@@ -17,6 +17,8 @@
package org.apache.ignite.java8.examples;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
*
*/
@@ -35,4 +37,4 @@ public class ClusterGroupExampleSelfTest extends GridAbstractExamplesTest {
// public void testComputeClusterGroupsExample() throws Exception {
// ClusterGroupExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuationExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuationExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuationExamplesSelfTest.java
index 4b4387c..bea6bb6 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuationExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuationExamplesSelfTest.java
@@ -19,17 +19,19 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.computegrid.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* Continuation example self test.
*/
public class ContinuationExamplesSelfTest extends GridAbstractExamplesTest {
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
- *
+ *
* @throws Exception If failed.
*/
// public void testContinuationExample() throws Exception {
// ComputeFibonacciContinuationExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuousMapperExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuousMapperExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuousMapperExamplesSelfTest.java
index afa1262..f23b6fa 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuousMapperExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/ContinuousMapperExamplesSelfTest.java
@@ -17,17 +17,19 @@
package org.apache.ignite.java8.examples;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* ContinuousMapperExample self test.
*/
public class ContinuousMapperExamplesSelfTest extends GridAbstractExamplesTest {
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
- *
+ *
* @throws Exception If failed.
*/
// public void testContinuousMapperExample() throws Exception {
// ComputeContinuousMapperExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/DeploymentExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/DeploymentExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/DeploymentExamplesSelfTest.java
index f56630d..70bddd5 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/DeploymentExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/DeploymentExamplesSelfTest.java
@@ -19,11 +19,13 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.misc.deployment.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* Deployment examples self test.
*/
public class DeploymentExamplesSelfTest extends GridAbstractExamplesTest {
- // TODO: IGNITE-711 next example(s) should be implemented for java 8
+ // TODO: IGNITE-711 next example(s) should be implemented for java 8
// or testing method(s) should be removed if example(s) does not applicable for java 8.
/**
* @throws Exception If failed.
@@ -31,4 +33,4 @@ public class DeploymentExamplesSelfTest extends GridAbstractExamplesTest {
// public void testDeploymentExample() throws Exception {
// DeploymentExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/EventsExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/EventsExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/EventsExamplesSelfTest.java
index e7b45a1..09784fe 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/EventsExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/EventsExamplesSelfTest.java
@@ -17,7 +17,8 @@
package org.apache.ignite.java8.examples;
-import org.apache.ignite.examples.java8.events.*;
+import org.apache.ignite.examples.java8.events.EventsExample;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
/**
* Events examples self test.
@@ -29,4 +30,4 @@ public class EventsExamplesSelfTest extends GridAbstractExamplesTest {
public void testEventsExample() throws Exception {
EventsExample.main(EMPTY_ARGS);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/HibernateL2CacheExampleSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/HibernateL2CacheExampleSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/HibernateL2CacheExampleSelfTest.java
index f3c36ab..8c7a2de 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/HibernateL2CacheExampleSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/HibernateL2CacheExampleSelfTest.java
@@ -19,17 +19,19 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.datagrid.hibernate.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* Tests the {@link org.apache.ignite.examples.java8.datagrid.hibernate.HibernateL2CacheExample}.
*/
public class HibernateL2CacheExampleSelfTest extends GridAbstractExamplesTest {
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
- *
+ *
* @throws Exception If failed.
*/
// public void testHibernateL2CacheExample() throws Exception {
// HibernateL2CacheExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/IgfsExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/IgfsExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/IgfsExamplesSelfTest.java
index 424c197..aed11b3 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/IgfsExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/IgfsExamplesSelfTest.java
@@ -20,6 +20,8 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.igfs.*;
//import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* IGFS examples self test.
*/
@@ -31,7 +33,7 @@ public class IgfsExamplesSelfTest extends GridAbstractExamplesTest {
private static final String IGFS_LOOPBACK_CFG = "modules/core/src/test/config/igfs-loopback.xml";
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
*
* @throws Exception If failed.
@@ -50,4 +52,4 @@ public class IgfsExamplesSelfTest extends GridAbstractExamplesTest {
// stopAllGrids();
// }
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/LifecycleExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/LifecycleExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/LifecycleExamplesSelfTest.java
index f132e64..ac60659 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/LifecycleExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/LifecycleExamplesSelfTest.java
@@ -19,17 +19,19 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.misc.lifecycle.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* LifecycleExample self test.
*/
public class LifecycleExamplesSelfTest extends GridAbstractExamplesTest {
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
- *
+ *
* @throws Exception If failed.
*/
// public void testLifecycleExample() throws Exception {
// LifecycleExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/MemcacheRestExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/MemcacheRestExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/MemcacheRestExamplesSelfTest.java
index 398451e..80caf1f 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/MemcacheRestExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/MemcacheRestExamplesSelfTest.java
@@ -19,6 +19,8 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.misc.client.memcache.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* MemcacheRestExample self test.
*/
@@ -39,4 +41,4 @@ public class MemcacheRestExamplesSelfTest extends GridAbstractExamplesTest {
// public void testMemcacheRestExample() throws Exception {
// MemcacheRestExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/MessagingExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/MessagingExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/MessagingExamplesSelfTest.java
index 92b2190..0948a2a 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/MessagingExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/MessagingExamplesSelfTest.java
@@ -17,7 +17,9 @@
package org.apache.ignite.java8.examples;
-import org.apache.ignite.examples.java8.messaging.*;
+import org.apache.ignite.examples.java8.messaging.MessagingExample;
+import org.apache.ignite.examples.java8.messaging.MessagingPingPongExample;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
/**
* Messaging examples self test.
@@ -51,4 +53,4 @@ public class MessagingExamplesSelfTest extends GridAbstractExamplesTest {
// public void testMessagingPingPongListenActorExample() throws Exception {
// MessagingPingPongListenActorExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/MonteCarloExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/MonteCarloExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/MonteCarloExamplesSelfTest.java
index 2173bd6..c6161de 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/MonteCarloExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/MonteCarloExamplesSelfTest.java
@@ -19,6 +19,8 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.computegrid.montecarlo.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* Ignite examples self test. Excludes Ignite Spring tests.
*
@@ -65,12 +67,12 @@ package org.apache.ignite.java8.examples;
*/
public class MonteCarloExamplesSelfTest extends GridAbstractExamplesTest {
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
- *
+ *
* @throws Exception If failed.
*/
// public void testCreditRiskExample() throws Exception {
// CreditRiskExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/SpringBeanExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/SpringBeanExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/SpringBeanExamplesSelfTest.java
index 859eb0a..1ea2e22 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/SpringBeanExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/SpringBeanExamplesSelfTest.java
@@ -19,17 +19,19 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.misc.springbean.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* Spring bean examples self test.
*/
public class SpringBeanExamplesSelfTest extends GridAbstractExamplesTest {
/**
- * TODO: IGNITE-711 next example(s) should be implemented for java 8
+ * TODO: IGNITE-711 next example(s) should be implemented for java 8
* or testing method(s) should be removed if example(s) does not applicable for java 8.
- *
+ *
* @throws Exception If failed.
*/
// public void testSpringBeanHelloWorldExample() throws Exception {
// SpringBeanExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/examples/TaskExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/examples/TaskExamplesSelfTest.java b/examples/src/test/java8/org/apache/ignite/java8/examples/TaskExamplesSelfTest.java
index a520292..37520c1 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/examples/TaskExamplesSelfTest.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/examples/TaskExamplesSelfTest.java
@@ -19,6 +19,8 @@ package org.apache.ignite.java8.examples;
//import org.apache.ignite.examples.java8.computegrid.*;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
/**
* Hello world examples self test.
*/
@@ -38,4 +40,4 @@ public class TaskExamplesSelfTest extends GridAbstractExamplesTest {
// public void testTaskMapExample() throws Exception {
// ComputeTaskMapExample.main(EMPTY_ARGS);
// }
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0cba13cc/examples/src/test/java8/org/apache/ignite/java8/testsuites/IgniteExamplesJ8SelfTestSuite.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java8/org/apache/ignite/java8/testsuites/IgniteExamplesJ8SelfTestSuite.java b/examples/src/test/java8/org/apache/ignite/java8/testsuites/IgniteExamplesJ8SelfTestSuite.java
index 1373abe..57e48f9 100644
--- a/examples/src/test/java8/org/apache/ignite/java8/testsuites/IgniteExamplesJ8SelfTestSuite.java
+++ b/examples/src/test/java8/org/apache/ignite/java8/testsuites/IgniteExamplesJ8SelfTestSuite.java
@@ -17,7 +17,15 @@
package org.apache.ignite.java8.testsuites;
-import org.apache.ignite.java8.examples.*;
+import junit.framework.TestSuite;
+import org.apache.ignite.java8.examples.BasicExamplesMultiNodeSelfTest;
+import org.apache.ignite.java8.examples.BasicExamplesSelfTest;
+import org.apache.ignite.java8.examples.CacheExamplesMultiNodeSelfTest;
+import org.apache.ignite.java8.examples.CacheExamplesSelfTest;
+import org.apache.ignite.java8.examples.EventsExamplesMultiNodeSelfTest;
+import org.apache.ignite.java8.examples.EventsExamplesSelfTest;
+import org.apache.ignite.java8.examples.MessagingExamplesSelfTest;
+import org.apache.ignite.testframework.GridTestUtils;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP;
@@ -68,4 +76,4 @@ public class IgniteExamplesJ8SelfTestSuite extends TestSuite {
return suite;
}
-}
\ No newline at end of file
+}
[11/17] ignite git commit: minor javadoc fix (cherry picked from
commit 77fc969)
Posted by vo...@apache.org.
minor javadoc fix
(cherry picked from commit 77fc969)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/56583611
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/56583611
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/56583611
Branch: refs/heads/ignite-1364-1
Commit: 565836113bdbaaa22b33f1a340b41dea2f1c8433
Parents: b1a9771
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Thu Sep 3 23:24:21 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Thu Sep 3 23:25:34 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 31 ++++++++------------
1 file changed, 12 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/56583611/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 1bbc110..85eed47 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -17,26 +17,10 @@
package org.apache.ignite.configuration;
-import java.io.Serializable;
-import java.util.Collection;
-import javax.cache.Cache;
-import javax.cache.CacheException;
-import javax.cache.configuration.CompleteConfiguration;
-import javax.cache.configuration.Factory;
-import javax.cache.configuration.MutableConfiguration;
-import javax.cache.expiry.ExpiryPolicy;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheInterceptor;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheRebalanceMode;
-import org.apache.ignite.cache.CacheTypeMetadata;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.cache.*;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.cache.affinity.AffinityKeyMapper;
import org.apache.ignite.cache.eviction.EvictionFilter;
@@ -52,6 +36,15 @@ import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.plugin.CachePluginConfiguration;
import org.jetbrains.annotations.Nullable;
+import javax.cache.Cache;
+import javax.cache.CacheException;
+import javax.cache.configuration.CompleteConfiguration;
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.MutableConfiguration;
+import javax.cache.expiry.ExpiryPolicy;
+import java.io.Serializable;
+import java.util.Collection;
+
/**
* This class defines grid cache configuration. This configuration is passed to
* grid via {@link IgniteConfiguration#getCacheConfiguration()} method. It defines all configuration
@@ -1806,7 +1799,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* Following validator allows to put data only in case topology contains exactly 2 nodes:
* <pre>{@code
* new TopologyValidator() {
- * @Override public boolean validate(Collection<ClusterNode> nodes) {
+ * public boolean validate(Collection<ClusterNode> nodes) {
* return nodes.size() == 2;
* }
* }
@@ -1835,7 +1828,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* Following validator allows to put data only in case topology contains exactly 2 nodes:
* <pre>{@code
* new TopologyValidator() {
- * @Override public boolean validate(Collection<ClusterNode> nodes) {
+ * public boolean validate(Collection<ClusterNode> nodes) {
* return nodes.size() == 2;
* }
* }
[16/17] ignite git commit: Merge branch 'ignite-1.4'
Posted by vo...@apache.org.
Merge branch 'ignite-1.4'
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a0072105
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a0072105
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a0072105
Branch: refs/heads/ignite-1364-1
Commit: a007210563c13cf3a6e0db4eb9d4fab59503a7c1
Parents: 5658361 28213a3
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Sep 4 10:29:00 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Sep 4 10:29:00 2015 +0300
----------------------------------------------------------------------
examples/config/example-default.xml | 76 +++++
examples/config/example-ignite.xml | 56 +---
.../config/portable/example-ignite-portable.xml | 44 +++
.../ignite/examples/portable/Address.java | 72 ++++
.../ignite/examples/portable/Employee.java | 93 ++++++
.../ignite/examples/portable/EmployeeKey.java | 90 +++++
.../portable/ExamplePortableNodeStartup.java | 36 ++
.../ignite/examples/portable/Organization.java | 93 ++++++
.../examples/portable/OrganizationType.java | 32 ++
...mputeClientPortableTaskExecutionExample.java | 154 +++++++++
.../portable/computegrid/ComputeClientTask.java | 116 +++++++
.../portable/computegrid/package-info.java | 21 ++
.../CacheClientPortablePutGetExample.java | 230 +++++++++++++
.../CacheClientPortableQueryExample.java | 328 +++++++++++++++++++
.../portable/datagrid/package-info.java | 21 ++
.../ignite/examples/portable/package-info.java | 21 ++
.../java8/datagrid/CacheAffinityExample.java | 15 +
.../java8/messaging/MessagingExample.java | 11 +-
.../CacheClientPortableExampleTest.java | 46 +++
.../ComputeClientPortableExampleTest.java | 37 +++
.../testsuites/IgniteExamplesSelfTestSuite.java | 6 +
.../java8/examples/BasicExamplesSelfTest.java | 10 +-
.../java8/examples/CacheExamplesSelfTest.java | 8 +-
.../examples/CheckpointExamplesSelfTest.java | 8 +-
.../examples/ClusterGroupExampleSelfTest.java | 4 +-
.../examples/ContinuationExamplesSelfTest.java | 8 +-
.../ContinuousMapperExamplesSelfTest.java | 8 +-
.../examples/DeploymentExamplesSelfTest.java | 6 +-
.../java8/examples/EventsExamplesSelfTest.java | 5 +-
.../HibernateL2CacheExampleSelfTest.java | 8 +-
.../java8/examples/IgfsExamplesSelfTest.java | 6 +-
.../examples/LifecycleExamplesSelfTest.java | 8 +-
.../examples/MemcacheRestExamplesSelfTest.java | 4 +-
.../examples/MessagingExamplesSelfTest.java | 6 +-
.../examples/MonteCarloExamplesSelfTest.java | 8 +-
.../examples/SpringBeanExamplesSelfTest.java | 8 +-
.../java8/examples/TaskExamplesSelfTest.java | 4 +-
.../IgniteExamplesJ8SelfTestSuite.java | 12 +-
.../apache/ignite/internal/IgniteKernal.java | 8 +-
.../IgniteCacheP2pUnmarshallingErrorTest.java | 5 +
.../testsuites/IgniteCacheTestSuite3.java | 3 +-
.../ignite/logger/log4j2/Log4J2Logger.java | 20 +-
.../ignite/platform/cpp/package-info.java | 22 ++
.../ignite/platform/dotnet/package-info.java | 22 ++
.../apache/ignite/platform/package-info.java | 22 ++
parent/pom.xml | 4 +
46 files changed, 1725 insertions(+), 100 deletions(-)
----------------------------------------------------------------------
[06/17] ignite git commit: ignite-1351: moved portable API examples
to Ignite except cross-platform example
Posted by vo...@apache.org.
ignite-1351: moved portable API examples to Ignite except cross-platform example
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6a5a48a0
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6a5a48a0
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6a5a48a0
Branch: refs/heads/ignite-1364-1
Commit: 6a5a48a0c9e379ecf83c8a799d0d8e2397fe5b3c
Parents: c5d303b
Author: Denis Magda <dm...@gridgain.com>
Authored: Thu Sep 3 16:59:36 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Thu Sep 3 16:59:36 2015 +0300
----------------------------------------------------------------------
examples/config/example-default.xml | 76 +++++
examples/config/example-ignite.xml | 56 +---
.../config/portable/example-ignite-portable.xml | 44 +++
.../ignite/examples/portable/Address.java | 72 +++++
.../ignite/examples/portable/Employee.java | 93 ++++++
.../ignite/examples/portable/EmployeeKey.java | 90 ++++++
.../portable/ExamplePortableNodeStartup.java | 36 +++
.../ignite/examples/portable/Organization.java | 93 ++++++
.../examples/portable/OrganizationType.java | 32 ++
...mputeClientPortableTaskExecutionExample.java | 154 +++++++++
.../portable/computegrid/ComputeClientTask.java | 116 +++++++
.../portable/computegrid/package-info.java | 21 ++
.../CacheClientPortablePutGetExample.java | 226 +++++++++++++
.../CacheClientPortableQueryExample.java | 323 +++++++++++++++++++
.../portable/datagrid/package-info.java | 21 ++
.../ignite/examples/portable/package-info.java | 21 ++
.../CacheClientPortableExampleTest.java | 46 +++
.../ComputeClientPortableExampleTest.java | 37 +++
.../testsuites/IgniteExamplesSelfTestSuite.java | 6 +
19 files changed, 1513 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/config/example-default.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-default.xml b/examples/config/example-default.xml
new file mode 100644
index 0000000..e6c359d
--- /dev/null
+++ b/examples/config/example-default.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ Ignite configuration with all defaults and enabled p2p deployment and enabled events.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+ <bean abstract="true" id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <!-- Set to true to enable distributed class loading for examples, default is false. -->
+ <property name="peerClassLoadingEnabled" value="true"/>
+
+ <!-- Enable task execution events for examples. -->
+ <property name="includeEventTypes">
+ <list>
+ <!--Task execution events-->
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_SESSION_ATTR_SET"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_REDUCED"/>
+
+ <!--Cache events-->
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ"/>
+ <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
+ </list>
+ </property>
+
+ <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <!--
+ Ignite provides several options for automatic discovery that can be used
+ instead os static IP based discovery. For information on all options refer
+ to our documentation: http://apacheignite.readme.io/docs/cluster-config
+ -->
+ <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
+ <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+ <property name="addresses">
+ <list>
+ <!-- In distributed environment, replace with actual host IP address. -->
+ <value>127.0.0.1:47500..47509</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/config/example-ignite.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-ignite.xml b/examples/config/example-ignite.xml
index e7adb54..d842a6d 100644
--- a/examples/config/example-ignite.xml
+++ b/examples/config/example-ignite.xml
@@ -22,62 +22,18 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
- <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
- <!-- Set to true to enable distributed class loading for examples, default is false. -->
- <property name="peerClassLoadingEnabled" value="true"/>
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <!-- Imports default Ignite configuration -->
+ <import resource="example-default.xml"/>
+ <bean parent="ignite.cfg">
+ <!-- Enabled optimized marshaller -->
<property name="marshaller">
<bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
<!-- Set to false to allow non-serializable objects in examples, default is true. -->
<property name="requireSerializable" value="false"/>
</bean>
</property>
-
- <!-- Enable task execution events for examples. -->
- <property name="includeEventTypes">
- <list>
- <!--Task execution events-->
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_SESSION_ATTR_SET"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_REDUCED"/>
-
- <!--Cache events-->
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ"/>
- <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
- </list>
- </property>
-
- <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
- <property name="discoverySpi">
- <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
- <property name="ipFinder">
- <!--
- Ignite provides several options for automatic discovery that can be used
- instead os static IP based discovery. For information on all options refer
- to our documentation: http://apacheignite.readme.io/docs/cluster-config
- -->
- <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
- <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
- <property name="addresses">
- <list>
- <!-- In distributed environment, replace with actual host IP address. -->
- <value>127.0.0.1:47500..47509</value>
- </list>
- </property>
- </bean>
- </property>
- </bean>
- </property>
</bean>
</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/config/portable/example-ignite-portable.xml
----------------------------------------------------------------------
diff --git a/examples/config/portable/example-ignite-portable.xml b/examples/config/portable/example-ignite-portable.xml
new file mode 100644
index 0000000..cde15ea
--- /dev/null
+++ b/examples/config/portable/example-ignite-portable.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ Ignite configuration with all defaults and enabled p2p deployment, events and portable marshaller.
+
+ Use this configuration file when running HTTP REST examples (see 'examples/rest' folder).
+
+ When starting a standalone node, you need to execute the following command:
+ {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/portable/example-ignite-portable.xml
+
+ When starting Ignite from Java IDE, pass path to this file to Ignition:
+ Ignition.start("examples/config/portable/example-ignite-portable.xml");
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <!-- Imports default Ignite configuration -->
+ <import resource="../example-default.xml"/>
+
+ <bean parent="ignite.cfg">
+ <!-- Enables portable marshaller -->
+ <property name="marshaller">
+ <bean class="org.apache.ignite.marshaller.portable.PortableMarshaller"/>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/Address.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/Address.java b/examples/src/main/java/org/apache/ignite/examples/portable/Address.java
new file mode 100644
index 0000000..cb08b25
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/Address.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable;
+
+import org.apache.ignite.portable.PortableException;
+import org.apache.ignite.portable.PortableMarshalAware;
+import org.apache.ignite.portable.PortableReader;
+import org.apache.ignite.portable.PortableWriter;
+
+/**
+ * Employee address.
+ * <p>
+ * This class implements {@link PortableMarshalAware} only for example purposes,
+ * in order to show how to customize serialization and deserialization of
+ * portable objects.
+ */
+public class Address implements PortableMarshalAware {
+ /** Street. */
+ private String street;
+
+ /** ZIP code. */
+ private int zip;
+
+ /**
+ * Required for portable deserialization.
+ */
+ public Address() {
+ // No-op.
+ }
+
+ /**
+ * @param street Street.
+ * @param zip ZIP code.
+ */
+ public Address(String street, int zip) {
+ this.street = street;
+ this.zip = zip;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void writePortable(PortableWriter writer) throws PortableException {
+ writer.writeString("street", street);
+ writer.writeInt("zip", zip);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void readPortable(PortableReader reader) throws PortableException {
+ street = reader.readString("street");
+ zip = reader.readInt("zip");
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return "Address [street=" + street +
+ ", zip=" + zip + ']';
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/Employee.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/Employee.java b/examples/src/main/java/org/apache/ignite/examples/portable/Employee.java
new file mode 100644
index 0000000..9614168
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/Employee.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable;
+
+import java.util.Collection;
+
+/**
+ * This class represents employee object.
+ */
+public class Employee {
+ /** Name. */
+ private String name;
+
+ /** Salary. */
+ private long salary;
+
+ /** Address. */
+ private Address address;
+
+ /** Departments. */
+ private Collection<String> departments;
+
+ /**
+ * Required for portable deserialization.
+ */
+ public Employee() {
+ // No-op.
+ }
+
+ /**
+ * @param name Name.
+ * @param salary Salary.
+ * @param address Address.
+ * @param departments Departments.
+ */
+ public Employee(String name, long salary, Address address, Collection<String> departments) {
+ this.name = name;
+ this.salary = salary;
+ this.address = address;
+ this.departments = departments;
+ }
+
+ /**
+ * @return Name.
+ */
+ public String name() {
+ return name;
+ }
+
+ /**
+ * @return Salary.
+ */
+ public long salary() {
+ return salary;
+ }
+
+ /**
+ * @return Address.
+ */
+ public Address address() {
+ return address;
+ }
+
+ /**
+ * @return Departments.
+ */
+ public Collection<String> departments() {
+ return departments;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return "Employee [name=" + name +
+ ", salary=" + salary +
+ ", address=" + address +
+ ", departments=" + departments + ']';
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/EmployeeKey.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/EmployeeKey.java b/examples/src/main/java/org/apache/ignite/examples/portable/EmployeeKey.java
new file mode 100644
index 0000000..f322167
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/EmployeeKey.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable;
+
+/**
+ * This class represents key for employee object.
+ * <p>
+ * Used in query example to collocate employees
+ * with their organizations.
+ */
+public class EmployeeKey {
+ /** ID. */
+ private int id;
+
+ /** Organization ID. */
+ private int organizationId;
+
+ /**
+ * Required for portable deserialization.
+ */
+ public EmployeeKey() {
+ // No-op.
+ }
+
+ /**
+ * @param id ID.
+ * @param organizationId Organization ID.
+ */
+ public EmployeeKey(int id, int organizationId) {
+ this.id = id;
+ this.organizationId = organizationId;
+ }
+
+ /**
+ * @return ID.
+ */
+ public int id() {
+ return id;
+ }
+
+ /**
+ * @return Organization ID.
+ */
+ public int organizationId() {
+ return organizationId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ EmployeeKey key = (EmployeeKey)o;
+
+ return id == key.id && organizationId == key.organizationId;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int hashCode() {
+ int res = id;
+
+ res = 31 * res + organizationId;
+
+ return res;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return "EmployeeKey [id=" + id +
+ ", organizationId=" + organizationId + ']';
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/ExamplePortableNodeStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/ExamplePortableNodeStartup.java b/examples/src/main/java/org/apache/ignite/examples/portable/ExamplePortableNodeStartup.java
new file mode 100644
index 0000000..87a41f7
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/ExamplePortableNodeStartup.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable;
+
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.Ignition;
+
+/**
+ * Starts up an empty node with example configuration and portable marshaller enabled.
+ */
+public class ExamplePortableNodeStartup {
+ /**
+ * Start up an empty node with example configuration and portable marshaller enabled.
+ *
+ * @param args Command line arguments, none required.
+ * @throws IgniteException If failed.
+ */
+ public static void main(String[] args) throws IgniteException {
+ Ignition.start("examples/config/portable/example-ignite-portable.xml");
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/Organization.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/Organization.java b/examples/src/main/java/org/apache/ignite/examples/portable/Organization.java
new file mode 100644
index 0000000..f52cac1
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/Organization.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable;
+
+import java.sql.Timestamp;
+
+/**
+ * This class represents organization object.
+ */
+public class Organization {
+ /** Name. */
+ private String name;
+
+ /** Address. */
+ private Address address;
+
+ /** Type. */
+ private OrganizationType type;
+
+ /** Last update time. */
+ private Timestamp lastUpdated;
+
+ /**
+ * Required for portable deserialization.
+ */
+ public Organization() {
+ // No-op.
+ }
+
+ /**
+ * @param name Name.
+ * @param address Address.
+ * @param type Type.
+ * @param lastUpdated Last update time.
+ */
+ public Organization(String name, Address address, OrganizationType type, Timestamp lastUpdated) {
+ this.name = name;
+ this.address = address;
+ this.type = type;
+ this.lastUpdated = lastUpdated;
+ }
+
+ /**
+ * @return Name.
+ */
+ public String name() {
+ return name;
+ }
+
+ /**
+ * @return Address.
+ */
+ public Address address() {
+ return address;
+ }
+
+ /**
+ * @return Type.
+ */
+ public OrganizationType type() {
+ return type;
+ }
+
+ /**
+ * @return Last update time.
+ */
+ public Timestamp lastUpdated() {
+ return lastUpdated;
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return "Organization [name=" + name +
+ ", address=" + address +
+ ", type=" + type +
+ ", lastUpdated=" + lastUpdated + ']';
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/OrganizationType.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/OrganizationType.java b/examples/src/main/java/org/apache/ignite/examples/portable/OrganizationType.java
new file mode 100644
index 0000000..c753e2d
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/OrganizationType.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable;
+
+/**
+ * Organization type enum.
+ */
+public enum OrganizationType {
+ /** Non-profit organization. */
+ NON_PROFIT,
+
+ /** Private organization. */
+ PRIVATE,
+
+ /** Government organization. */
+ GOVERNMENT
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java
new file mode 100644
index 0000000..34d9cde
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientPortableTaskExecutionExample.java
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable.computegrid;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.examples.portable.Address;
+import org.apache.ignite.examples.portable.Employee;
+import org.apache.ignite.examples.portable.ExamplePortableNodeStartup;
+import org.apache.ignite.portable.PortableObject;
+
+/**
+ * This example demonstrates use of portable objects with task execution.
+ * Specifically it shows that portable objects are simple Java POJOs and do not require any special treatment.
+ * <p>
+ * The example executes map-reduce task that accepts collection of portable objects as an argument.
+ * Since these objects are never deserialized on remote nodes, classes are not required on classpath
+ * of these nodes.
+ * <p>
+ * Remote nodes should always be started with special configuration file which
+ * enables the portable marshaller: {@code 'ignite.{sh|bat} examples/config/portable/example-ignite-portable.xml'}.
+ * <p>
+ * Alternatively you can run {@link ExamplePortableNodeStartup} in another JVM which will
+ * start node with {@code examples/config/portable/example-ignite-portable.xml} configuration.
+ */
+public class ComputeClientPortableTaskExecutionExample {
+ /**
+ * Executes example.
+ *
+ * @param args Command line arguments, none required.
+ */
+ public static void main(String[] args) {
+ try (Ignite ignite = Ignition.start("examples/config/portable/example-ignite-portable.xml")) {
+ System.out.println();
+ System.out.println(">>> Portable objects task execution example started.");
+
+ if (ignite.cluster().forRemotes().nodes().isEmpty()) {
+ System.out.println();
+ System.out.println(">>> This example requires remote nodes to be started.");
+ System.out.println(">>> Please start at least 1 remote node.");
+ System.out.println(">>> Refer to example's javadoc for details on configuration.");
+ System.out.println();
+
+ return;
+ }
+
+ // Generate employees to calculate average salary for.
+ Collection<Employee> employees = employees();
+
+ System.out.println();
+ System.out.println(">>> Calculating average salary for employees:");
+
+ for (Employee employee : employees)
+ System.out.println(">>> " + employee);
+
+ // Convert collection of employees to collection of portable objects.
+ // This allows to send objects across nodes without requiring to have
+ // Employee class on classpath of these nodes.
+ Collection<PortableObject> portables = ignite.portables().toPortable(employees);
+
+ // Execute task and get average salary.
+ Long avgSalary = ignite.compute(ignite.cluster().forRemotes()).execute(new ComputeClientTask(), portables);
+
+ System.out.println();
+ System.out.println(">>> Average salary for all employees: " + avgSalary);
+ System.out.println();
+ }
+ }
+
+ /**
+ * Creates collection of employees.
+ *
+ * @return Collection of employees.
+ */
+ private static Collection<Employee> employees() {
+ Collection<Employee> employees = new ArrayList<>();
+
+ employees.add(new Employee(
+ "James Wilson",
+ 12500,
+ new Address("1096 Eddy Street, San Francisco, CA", 94109),
+ Arrays.asList("Human Resources", "Customer Service")
+ ));
+
+ employees.add(new Employee(
+ "Daniel Adams",
+ 11000,
+ new Address("184 Fidler Drive, San Antonio, TX", 78205),
+ Arrays.asList("Development", "QA")
+ ));
+
+ employees.add(new Employee(
+ "Cristian Moss",
+ 12500,
+ new Address("667 Jerry Dove Drive, Florence, SC", 29501),
+ Arrays.asList("Logistics")
+ ));
+
+ employees.add(new Employee(
+ "Allison Mathis",
+ 25300,
+ new Address("2702 Freedom Lane, Hornitos, CA", 95325),
+ Arrays.asList("Development")
+ ));
+
+ employees.add(new Employee(
+ "Breana Robbin",
+ 6500,
+ new Address("3960 Sundown Lane, Austin, TX", 78758),
+ Arrays.asList("Sales")
+ ));
+
+ employees.add(new Employee(
+ "Philip Horsley",
+ 19800,
+ new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
+ Arrays.asList("Sales")
+ ));
+
+ employees.add(new Employee(
+ "Brian Peters",
+ 10600,
+ new Address("1407 Pearlman Avenue, Boston, MA", 12110),
+ Arrays.asList("Development", "QA")
+ ));
+
+ employees.add(new Employee(
+ "Jack Yang",
+ 12900,
+ new Address("4425 Parrish Avenue Smithsons Valley, TX", 78130),
+ Arrays.asList("Sales")
+ ));
+
+ return employees;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientTask.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientTask.java b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientTask.java
new file mode 100644
index 0000000..0eee8c6
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/ComputeClientTask.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable.computegrid;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.apache.ignite.compute.ComputeJob;
+import org.apache.ignite.compute.ComputeJobAdapter;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.compute.ComputeTaskSplitAdapter;
+import org.apache.ignite.lang.IgniteBiTuple;
+import org.apache.ignite.portable.PortableObject;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Task that is used for {@link ComputeClientPortableTaskExecutionExample} and
+ * similar examples in .NET and C++.
+ * <p>
+ * This task calculates average salary for provided collection of employees.
+ * It splits the collection into batches of size {@code 3} and creates a job
+ * for each batch. After all jobs are executed, there results are reduced to
+ * get the average salary.
+ */
+public class ComputeClientTask extends ComputeTaskSplitAdapter<Collection<PortableObject>, Long> {
+ /** {@inheritDoc} */
+ @Override protected Collection<? extends ComputeJob> split(
+ int gridSize,
+ Collection<PortableObject> arg
+ ) {
+ Collection<ComputeClientJob> jobs = new ArrayList<>();
+
+ Collection<PortableObject> employees = new ArrayList<>();
+
+ // Split provided collection into batches and
+ // create a job for each batch.
+ for (PortableObject employee : arg) {
+ employees.add(employee);
+
+ if (employees.size() == 3) {
+ jobs.add(new ComputeClientJob(employees));
+
+ employees = new ArrayList<>(3);
+ }
+ }
+
+ if (!employees.isEmpty())
+ jobs.add(new ComputeClientJob(employees));
+
+ return jobs;
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override public Long reduce(List<ComputeJobResult> results) {
+ long sum = 0;
+ int cnt = 0;
+
+ for (ComputeJobResult res : results) {
+ IgniteBiTuple<Long, Integer> t = res.getData();
+
+ sum += t.get1();
+ cnt += t.get2();
+ }
+
+ return sum / cnt;
+ }
+
+ /**
+ * Remote job for {@link ComputeClientTask}.
+ */
+ private static class ComputeClientJob extends ComputeJobAdapter {
+ /** Collection of employees. */
+ private final Collection<PortableObject> employees;
+
+ /**
+ * @param employees Collection of employees.
+ */
+ private ComputeClientJob(Collection<PortableObject> employees) {
+ this.employees = employees;
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override public Object execute() {
+ long sum = 0;
+ int cnt = 0;
+
+ for (PortableObject employee : employees) {
+ System.out.println(">>> Processing employee: " + employee.field("name"));
+
+ // Get salary from portable object. Note that object
+ // doesn't need to be fully deserialized.
+ long salary = employee.field("salary");
+
+ sum += salary;
+ cnt++;
+ }
+
+ return new IgniteBiTuple<>(sum, cnt);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/package-info.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/package-info.java b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/package-info.java
new file mode 100644
index 0000000..469128c
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/computegrid/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Demonstrates the usage of portable objects with task execution.
+ */
+package org.apache.ignite.examples.portable.computegrid;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java
new file mode 100644
index 0000000..19c5685
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable.datagrid;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.examples.portable.Address;
+import org.apache.ignite.examples.portable.ExamplePortableNodeStartup;
+import org.apache.ignite.examples.portable.Organization;
+import org.apache.ignite.examples.portable.OrganizationType;
+import org.apache.ignite.portable.PortableObject;
+
+/**
+ * This example demonstrates use of portable objects with Ignite cache.
+ * Specifically it shows that portable objects are simple Java POJOs and do not require any special treatment.
+ * <p>
+ * The example executes several put-get operations on Ignite cache with portable values. Note that
+ * it demonstrates how portable object can be retrieved in fully-deserialized form or in portable object
+ * format using special cache projection.
+ * <p>
+ * Remote nodes should always be started with special configuration file which
+ * enables the portable marshaller: {@code 'ignite.{sh|bat} examples/config/portable/example-ignite-portable.xml'}.
+ * <p>
+ * Alternatively you can run {@link ExamplePortableNodeStartup} in another JVM which will
+ * start node with {@code examples/config/portable/example-ignite-portable.xml} configuration.
+ */
+public class CacheClientPortablePutGetExample {
+ /** Cache name. */
+ private static final String CACHE_NAME = CacheClientPortablePutGetExample.class.getSimpleName();
+
+ /**
+ * Executes example.
+ *
+ * @param args Command line arguments, none required.
+ */
+ public static void main(String[] args) {
+ try (Ignite ignite = Ignition.start("examples/config/portable/example-ignite-portable.xml")) {
+ System.out.println();
+ System.out.println(">>> Portable objects cache put-get example started.");
+
+ CacheConfiguration<Integer, Organization> cfg = new CacheConfiguration<>();
+
+ cfg.setCacheMode(CacheMode.PARTITIONED);
+ cfg.setName(CACHE_NAME);
+ cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
+
+ try (IgniteCache<Integer, Organization> cache = ignite.createCache(cfg)) {
+ if (ignite.cluster().forDataNodes(cache.getName()).nodes().isEmpty()) {
+ System.out.println();
+ System.out.println(">>> This example requires remote cache node nodes to be started.");
+ System.out.println(">>> Please start at least 1 remote cache node.");
+ System.out.println(">>> Refer to example's javadoc for details on configuration.");
+ System.out.println();
+
+ return;
+ }
+
+ putGet(cache);
+ putGetPortable(cache);
+ putGetAll(cache);
+ putGetAllPortable(cache);
+
+ System.out.println();
+ }
+ }
+ }
+
+ /**
+ * Execute individual put and get.
+ *
+ * @param cache Cache.
+ */
+ private static void putGet(IgniteCache<Integer, Organization> cache) {
+ // Create new Organization portable object to store in cache.
+ Organization org = new Organization(
+ "Microsoft", // Name.
+ new Address("1096 Eddy Street, San Francisco, CA", 94109), // Address.
+ OrganizationType.PRIVATE, // Type.
+ new Timestamp(System.currentTimeMillis())); // Last update time.
+
+ // Put created data entry to cache.
+ cache.put(1, org);
+
+ // Get recently created organization as a strongly-typed fully de-serialized instance.
+ Organization orgFromCache = cache.get(1);
+
+ System.out.println();
+ System.out.println(">>> Retrieved organization instance from cache: " + orgFromCache);
+ }
+
+ /**
+ * Execute individual put and get, getting value in portable format, without de-serializing it.
+ *
+ * @param cache Cache.
+ */
+ private static void putGetPortable(IgniteCache<Integer, Organization> cache) {
+ // Create new Organization portable object to store in cache.
+ Organization org = new Organization(
+ "Microsoft", // Name.
+ new Address("1096 Eddy Street, San Francisco, CA", 94109), // Address.
+ OrganizationType.PRIVATE, // Type.
+ new Timestamp(System.currentTimeMillis())); // Last update time.
+
+ // Put created data entry to cache.
+ cache.put(1, org);
+
+ // Get cache that will get values as portable objects.
+ IgniteCache<Integer, PortableObject> portableCache = cache.withKeepPortable();
+
+ // Get recently created organization as a portable object.
+ PortableObject po = portableCache.get(1);
+
+ // Get organization's name from portable object (note that
+ // object doesn't need to be fully deserialized).
+ String name = po.field("name");
+
+ System.out.println();
+ System.out.println(">>> Retrieved organization name from portable object: " + name);
+ }
+
+ /**
+ * Execute bulk {@code putAll(...)} and {@code getAll(...)} operations.
+ *
+ * @param cache Cache.
+ */
+ private static void putGetAll(IgniteCache<Integer, Organization> cache) {
+ // Create new Organization portable objects to store in cache.
+ Organization org1 = new Organization(
+ "Microsoft", // Name.
+ new Address("1096 Eddy Street, San Francisco, CA", 94109), // Address.
+ OrganizationType.PRIVATE, // Type.
+ new Timestamp(System.currentTimeMillis())); // Last update time.
+
+ Organization org2 = new Organization(
+ "Red Cross", // Name.
+ new Address("184 Fidler Drive, San Antonio, TX", 78205), // Address.
+ OrganizationType.NON_PROFIT, // Type.
+ new Timestamp(System.currentTimeMillis())); // Last update time.
+
+ Map<Integer, Organization> map = new HashMap<>();
+
+ map.put(1, org1);
+ map.put(2, org2);
+
+ // Put created data entries to cache.
+ cache.putAll(map);
+
+ // Get recently created organizations as a strongly-typed fully de-serialized instances.
+ Map<Integer, Organization> mapFromCache = cache.getAll(map.keySet());
+
+ System.out.println();
+ System.out.println(">>> Retrieved organization instances from cache:");
+
+ for (Organization org : mapFromCache.values())
+ System.out.println(">>> " + org);
+ }
+
+ /**
+ * Execute bulk {@code putAll(...)} and {@code getAll(...)} operations,
+ * getting values in portable format, without de-serializing it.
+ *
+ * @param cache Cache.
+ */
+ private static void putGetAllPortable(IgniteCache<Integer, Organization> cache) {
+ // Create new Organization portable objects to store in cache.
+ Organization org1 = new Organization(
+ "Microsoft", // Name.
+ new Address("1096 Eddy Street, San Francisco, CA", 94109), // Address.
+ OrganizationType.PRIVATE, // Type.
+ new Timestamp(System.currentTimeMillis())); // Last update time.
+
+ Organization org2 = new Organization(
+ "Red Cross", // Name.
+ new Address("184 Fidler Drive, San Antonio, TX", 78205), // Address.
+ OrganizationType.NON_PROFIT, // Type.
+ new Timestamp(System.currentTimeMillis())); // Last update time.
+
+ Map<Integer, Organization> map = new HashMap<>();
+
+ map.put(1, org1);
+ map.put(2, org2);
+
+ // Put created data entries to cache.
+ cache.putAll(map);
+
+ // Get cache that will get values as portable objects.
+ IgniteCache<Integer, PortableObject> portableCache = cache.withKeepPortable();
+
+ // Get recently created organizations as portable objects.
+ Map<Integer, PortableObject> poMap = portableCache.getAll(map.keySet());
+
+ Collection<String> names = new ArrayList<>();
+
+ // Get organizations' names from portable objects (note that
+ // objects don't need to be fully deserialized).
+ for (PortableObject po : poMap.values())
+ names.add(po.<String>field("name"));
+
+ System.out.println();
+ System.out.println(">>> Retrieved organization names from portable objects: " + names);
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
new file mode 100644
index 0000000..1eb43b3
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
@@ -0,0 +1,323 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.portable.datagrid;
+
+import java.sql.Timestamp;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.cache.Cache;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheTypeMetadata;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.cache.query.TextQuery;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.examples.portable.Address;
+import org.apache.ignite.examples.portable.Employee;
+import org.apache.ignite.examples.portable.EmployeeKey;
+import org.apache.ignite.examples.portable.ExamplePortableNodeStartup;
+import org.apache.ignite.examples.portable.Organization;
+import org.apache.ignite.examples.portable.OrganizationType;
+import org.apache.ignite.portable.PortableObject;
+
+/**
+ * This example demonstrates use of portable objects with cache queries.
+ * The example populates cache with sample data and runs several SQL and full text queries over this data.
+ * <p>
+ * Remote nodes should always be started with special configuration file which
+ * enables the portable marshaller: {@code 'ignite.{sh|bat} examples/config/portable/example-ignite-portable.xml'}.
+ * <p>
+ * Alternatively you can run {@link ExamplePortableNodeStartup} in another JVM which will
+ * start node with {@code examples/config/portable/example-ignite-portable.xml} configuration.
+ */
+public class CacheClientPortableQueryExample {
+ /** Organization cache name. */
+ private static final String ORGANIZATION_CACHE_NAME = CacheClientPortableQueryExample.class.getSimpleName()
+ + "Organizations";
+
+ /** Employee cache name. */
+ private static final String EMPLOYEE_CACHE_NAME = CacheClientPortableQueryExample.class.getSimpleName()
+ + "Employees";
+
+ /**
+ * Executes example.
+ *
+ * @param args Command line arguments, none required.
+ */
+ public static void main(String[] args) {
+ try (Ignite ignite = Ignition.start("examples/config/portable/example-ignite-portable.xml")) {
+ System.out.println();
+ System.out.println(">>> Portable objects cache query example started.");
+
+ CacheConfiguration<Integer, Organization> orgCacheCfg = new CacheConfiguration<>();
+
+ orgCacheCfg.setCacheMode(CacheMode.PARTITIONED);
+ orgCacheCfg.setName(ORGANIZATION_CACHE_NAME);
+
+ orgCacheCfg.setTypeMetadata(Arrays.asList(createOrganizationTypeMetadata()));
+
+ CacheConfiguration<EmployeeKey, Employee> employeeCacheCfg = new CacheConfiguration<>();
+
+ employeeCacheCfg.setCacheMode(CacheMode.PARTITIONED);
+ employeeCacheCfg.setName(EMPLOYEE_CACHE_NAME);
+
+ employeeCacheCfg.setTypeMetadata(Arrays.asList(createEmployeeTypeMetadata()));
+
+ try (IgniteCache<Integer, Organization> orgCache = ignite.createCache(orgCacheCfg);
+ IgniteCache<EmployeeKey, Employee> employeeCache = ignite.createCache(employeeCacheCfg)
+ ) {
+ if (ignite.cluster().forDataNodes(orgCache.getName()).nodes().isEmpty()) {
+ System.out.println();
+ System.out.println(">>> This example requires remote cache nodes to be started.");
+ System.out.println(">>> Please start at least 1 remote cache node.");
+ System.out.println(">>> Refer to example's javadoc for details on configuration.");
+ System.out.println();
+
+ return;
+ }
+
+ // Populate cache with sample data entries.
+ populateCache(orgCache, employeeCache);
+
+ // Get cache that will work with portable objects.
+ IgniteCache<PortableObject, PortableObject> portableCache = employeeCache.withKeepPortable();
+
+ // Run SQL query example.
+ sqlQuery(portableCache);
+
+ // Run SQL query with join example.
+ sqlJoinQuery(portableCache);
+
+ // Run SQL fields query example.
+ sqlFieldsQuery(portableCache);
+
+ // Run full text query example.
+ textQuery(portableCache);
+
+ System.out.println();
+ }
+ }
+ }
+
+ /**
+ * Create cache type metadata for {@link Employee}.
+ *
+ * @return Cache type metadata.
+ */
+ private static CacheTypeMetadata createEmployeeTypeMetadata() {
+ CacheTypeMetadata employeeTypeMeta = new CacheTypeMetadata();
+
+ employeeTypeMeta.setValueType(Employee.class);
+
+ employeeTypeMeta.setKeyType(EmployeeKey.class);
+
+ Map<String, Class<?>> ascFields = new HashMap<>();
+
+ ascFields.put("name", String.class);
+ ascFields.put("salary", Long.class);
+ ascFields.put("address.zip", Integer.class);
+ ascFields.put("organizationId", Integer.class);
+
+ employeeTypeMeta.setAscendingFields(ascFields);
+
+ employeeTypeMeta.setTextFields(Arrays.asList("address.street"));
+
+ return employeeTypeMeta;
+ }
+
+ /**
+ * Create cache type metadata for {@link Organization}.
+ *
+ * @return Cache type metadata.
+ */
+ private static CacheTypeMetadata createOrganizationTypeMetadata() {
+ CacheTypeMetadata organizationTypeMeta = new CacheTypeMetadata();
+
+ organizationTypeMeta.setValueType(Organization.class);
+
+ organizationTypeMeta.setKeyType(Integer.class);
+
+ Map<String, Class<?>> ascFields = new HashMap<>();
+
+ ascFields.put("name", String.class);
+
+ Map<String, Class<?>> queryFields = new HashMap<>();
+
+ queryFields.put("address.street", String.class);
+
+ organizationTypeMeta.setAscendingFields(ascFields);
+
+ organizationTypeMeta.setQueryFields(queryFields);
+
+ return organizationTypeMeta;
+ }
+
+ /**
+ * Queries employees that have provided ZIP code in address.
+ *
+ * @param cache Ignite cache.
+ */
+ private static void sqlQuery(IgniteCache<PortableObject, PortableObject> cache) {
+ SqlQuery<PortableObject, PortableObject> query = new SqlQuery<>(Employee.class, "zip = ?");
+
+ int zip = 94109;
+
+ QueryCursor<Cache.Entry<PortableObject, PortableObject>> employees = cache.query(query.setArgs(zip));
+
+ System.out.println();
+ System.out.println(">>> Employees with zip " + zip + ':');
+
+ for (Cache.Entry<PortableObject, PortableObject> e : employees.getAll())
+ System.out.println(">>> " + e.getValue().deserialize());
+ }
+
+ /**
+ * Queries employees that work for organization with provided name.
+ *
+ * @param cache Ignite cache.
+ */
+ private static void sqlJoinQuery(IgniteCache<PortableObject, PortableObject> cache) {
+ SqlQuery<PortableObject, PortableObject> query = new SqlQuery<>(Employee.class,
+ "from Employee, \"" + ORGANIZATION_CACHE_NAME + "\".Organization as org " +
+ "where Employee.organizationId = org._key and org.name = ?");
+
+ String organizationName = "GridGain";
+
+ QueryCursor<Cache.Entry<PortableObject, PortableObject>> employees =
+ cache.query(query.setArgs(organizationName));
+
+ System.out.println();
+ System.out.println(">>> Employees working for " + organizationName + ':');
+
+ for (Cache.Entry<PortableObject, PortableObject> e : employees.getAll())
+ System.out.println(">>> " + e.getValue());
+ }
+
+ /**
+ * Queries names and salaries for all employees.
+ *
+ * @param cache Ignite cache.
+ */
+ private static void sqlFieldsQuery(IgniteCache<PortableObject, PortableObject> cache) {
+ SqlFieldsQuery query = new SqlFieldsQuery("select name, salary from Employee");
+
+ QueryCursor<List<?>> employees = cache.query(query);
+
+ System.out.println();
+ System.out.println(">>> Employee names and their salaries:");
+
+ for (List<?> row : employees.getAll())
+ System.out.println(">>> [Name=" + row.get(0) + ", salary=" + row.get(1) + ']');
+ }
+
+ /**
+ * Queries employees that live in Texas using full-text query API.
+ *
+ * @param cache Ignite cache.
+ */
+ private static void textQuery(IgniteCache<PortableObject, PortableObject> cache) {
+ TextQuery<PortableObject, PortableObject> query = new TextQuery<>(Employee.class, "TX");
+
+ QueryCursor<Cache.Entry<PortableObject, PortableObject>> employees = cache.query(query);
+
+ System.out.println();
+ System.out.println(">>> Employees living in Texas:");
+
+ for (Cache.Entry<PortableObject, PortableObject> e : employees.getAll())
+ System.out.println(">>> " + e.getValue().deserialize());
+ }
+
+ /**
+ * Populates cache with data.
+ *
+ * @param orgCache Organization cache.
+ * @param employeeCache Employee cache.
+ */
+ private static void populateCache(IgniteCache<Integer, Organization> orgCache,
+ IgniteCache<EmployeeKey, Employee> employeeCache) {
+ orgCache.put(1, new Organization(
+ "GridGain",
+ new Address("1065 East Hillsdale Blvd, Foster City, CA", 94404),
+ OrganizationType.PRIVATE,
+ new Timestamp(System.currentTimeMillis())
+ ));
+
+ orgCache.put(2, new Organization(
+ "Microsoft",
+ new Address("1096 Eddy Street, San Francisco, CA", 94109),
+ OrganizationType.PRIVATE,
+ new Timestamp(System.currentTimeMillis())
+ ));
+
+ employeeCache.put(new EmployeeKey(1, 1), new Employee(
+ "James Wilson",
+ 12500,
+ new Address("1096 Eddy Street, San Francisco, CA", 94109),
+ Arrays.asList("Human Resources", "Customer Service")
+ ));
+
+ employeeCache.put(new EmployeeKey(2, 1), new Employee(
+ "Daniel Adams",
+ 11000,
+ new Address("184 Fidler Drive, San Antonio, TX", 78130),
+ Arrays.asList("Development", "QA")
+ ));
+
+ employeeCache.put(new EmployeeKey(3, 1), new Employee(
+ "Cristian Moss",
+ 12500,
+ new Address("667 Jerry Dove Drive, Florence, SC", 29501),
+ Arrays.asList("Logistics")
+ ));
+
+ employeeCache.put(new EmployeeKey(4, 2), new Employee(
+ "Allison Mathis",
+ 25300,
+ new Address("2702 Freedom Lane, San Francisco, CA", 94109),
+ Arrays.asList("Development")
+ ));
+
+ employeeCache.put(new EmployeeKey(5, 2), new Employee(
+ "Breana Robbin",
+ 6500,
+ new Address("3960 Sundown Lane, Austin, TX", 78130),
+ Arrays.asList("Sales")
+ ));
+
+ employeeCache.put(new EmployeeKey(6, 2), new Employee(
+ "Philip Horsley",
+ 19800,
+ new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
+ Arrays.asList("Sales")
+ ));
+
+ employeeCache.put(new EmployeeKey(7, 2), new Employee(
+ "Brian Peters",
+ 10600,
+ new Address("1407 Pearlman Avenue, Boston, MA", 12110),
+ Arrays.asList("Development", "QA")
+ ));
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/package-info.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/package-info.java b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/package-info.java
new file mode 100644
index 0000000..b24f233
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Demonstrates the usage of portable objects with cache.
+ */
+package org.apache.ignite.examples.portable.datagrid;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/main/java/org/apache/ignite/examples/portable/package-info.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/package-info.java b/examples/src/main/java/org/apache/ignite/examples/portable/package-info.java
new file mode 100644
index 0000000..4301027
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Contains portable classes and examples.
+ */
+package org.apache.ignite.examples.portable;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/test/java/org/apache/ignite/examples/CacheClientPortableExampleTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/CacheClientPortableExampleTest.java b/examples/src/test/java/org/apache/ignite/examples/CacheClientPortableExampleTest.java
new file mode 100644
index 0000000..6ea1484
--- /dev/null
+++ b/examples/src/test/java/org/apache/ignite/examples/CacheClientPortableExampleTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples;
+
+import org.apache.ignite.examples.portable.datagrid.CacheClientPortablePutGetExample;
+import org.apache.ignite.examples.portable.datagrid.CacheClientPortableQueryExample;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
+/**
+ *
+ */
+public class CacheClientPortableExampleTest extends GridAbstractExamplesTest {
+ /** {@inheritDoc} */
+ @Override protected String defaultConfig() {
+ return "examples/config/portable/example-ignite-portable.xml";
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPortablePutGetExample() throws Exception {
+ CacheClientPortablePutGetExample.main(new String[] {});
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPortableQueryExample() throws Exception {
+ CacheClientPortableQueryExample.main(new String[] {});
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/test/java/org/apache/ignite/examples/ComputeClientPortableExampleTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/ComputeClientPortableExampleTest.java b/examples/src/test/java/org/apache/ignite/examples/ComputeClientPortableExampleTest.java
new file mode 100644
index 0000000..2223aec
--- /dev/null
+++ b/examples/src/test/java/org/apache/ignite/examples/ComputeClientPortableExampleTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ignite.examples;
+
+import org.apache.ignite.examples.portable.computegrid.ComputeClientPortableTaskExecutionExample;
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
+
+/**
+ *
+ */
+public class ComputeClientPortableExampleTest extends GridAbstractExamplesTest {
+ /** {@inheritDoc} */
+ @Override protected String defaultConfig() {
+ return "examples/config/portable/example-ignite-portable.xml";
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testPortableTaskExecutionExample() throws Exception {
+ ComputeClientPortableTaskExecutionExample.main(new String[] {});
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/6a5a48a0/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
index 4669ae4..baa23fc 100644
--- a/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
+++ b/examples/src/test/java/org/apache/ignite/testsuites/IgniteExamplesSelfTestSuite.java
@@ -20,10 +20,12 @@ package org.apache.ignite.testsuites;
import junit.framework.TestSuite;
import org.apache.ignite.examples.BasicExamplesMultiNodeSelfTest;
import org.apache.ignite.examples.BasicExamplesSelfTest;
+import org.apache.ignite.examples.CacheClientPortableExampleTest;
import org.apache.ignite.examples.CacheExamplesMultiNodeSelfTest;
import org.apache.ignite.examples.CacheExamplesSelfTest;
import org.apache.ignite.examples.CheckpointExamplesSelfTest;
import org.apache.ignite.examples.ClusterGroupExampleSelfTest;
+import org.apache.ignite.examples.ComputeClientPortableExampleTest;
import org.apache.ignite.examples.ContinuationExamplesMultiNodeSelfTest;
import org.apache.ignite.examples.ContinuationExamplesSelfTest;
import org.apache.ignite.examples.ContinuousMapperExamplesMultiNodeSelfTest;
@@ -93,6 +95,10 @@ public class IgniteExamplesSelfTestSuite extends TestSuite {
suite.addTest(new TestSuite(MonteCarloExamplesMultiNodeSelfTest.class));
suite.addTest(new TestSuite(HibernateL2CacheExampleMultiNodeSelfTest.class));
+ // Portable.
+ suite.addTest(new TestSuite(CacheClientPortableExampleTest.class));
+ suite.addTest(new TestSuite(ComputeClientPortableExampleTest.class));
+
return suite;
}
}
\ No newline at end of file
[07/17] ignite git commit: Topology validator test and javadoc
improvement
Posted by vo...@apache.org.
Topology validator test and javadoc improvement
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2fbf328b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2fbf328b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2fbf328b
Branch: refs/heads/ignite-1364-1
Commit: 2fbf328b3f5fd08f7d24d2a0dab6e482192281ad
Parents: c5d303b
Author: Anton Vinogradov <av...@apache.org>
Authored: Thu Sep 3 18:34:38 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Thu Sep 3 18:34:38 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 45 +++++++++++++++++++
.../ignite/configuration/TopologyValidator.java | 4 +-
...gniteTopologyValidatorAbstractCacheTest.java | 46 ++++++++++++++++----
3 files changed, 85 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2fbf328b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 792bb28..1bbc110 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -20,12 +20,14 @@ package org.apache.ignite.configuration;
import java.io.Serializable;
import java.util.Collection;
import javax.cache.Cache;
+import javax.cache.CacheException;
import javax.cache.configuration.CompleteConfiguration;
import javax.cache.configuration.Factory;
import javax.cache.configuration.MutableConfiguration;
import javax.cache.expiry.ExpiryPolicy;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheEntryProcessor;
@@ -1788,6 +1790,27 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/**
* Gets topology validator.
+ * <p>
+ * Topology validator checks whether the new topology is valid for specific cache at each topology change.
+ * Topology is always valid in case no topology validator used.
+ * <p>
+ * In case topology is valid for specific cache all operations on this cache are allowed.
+ * <p>
+ * In case topology is not valid for specific cache all update operations on this cache are restricted:
+ * <p>{@link CacheException} will be thrown at update operations (put, remove, etc) attempt.
+ * <p>{@link IgniteException} will be thrown at transaction commit attempt.
+ *
+ * <p>
+ * Usage example
+ * <p>
+ * Following validator allows to put data only in case topology contains exactly 2 nodes:
+ * <pre>{@code
+ * new TopologyValidator() {
+ * @Override public boolean validate(Collection<ClusterNode> nodes) {
+ * return nodes.size() == 2;
+ * }
+ * }
+ * }</pre>
* @return validator.
*/
public TopologyValidator getTopologyValidator() {
@@ -1796,6 +1819,28 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
/**
* Sets topology validator.
+ * <p>
+ * Topology validator checks whether the new topology is valid for specific cache at each topology change.
+ * Topology is always valid in case no topology validator used.
+ * <p>
+ * In case topology is valid for specific cache all operations on this cache are allowed.
+ * <p>
+ * In case topology is not valid for specific cache all update operations on this cache are restricted:
+ * <p>{@link CacheException} will be thrown at update operations (put, remove, etc) attempt.
+ * <p>{@link IgniteException} will be thrown at transaction commit attempt.
+ *
+ * <p>
+ * Usage example
+ * <p>
+ * Following validator allows to put data only in case topology contains exactly 2 nodes:
+ * <pre>{@code
+ * new TopologyValidator() {
+ * @Override public boolean validate(Collection<ClusterNode> nodes) {
+ * return nodes.size() == 2;
+ * }
+ * }
+ * }</pre>
+ *
* @param topValidator validator.
* @return {@code this} for chaining.
*/
http://git-wip-us.apache.org/repos/asf/ignite/blob/2fbf328b/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java b/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
index ef9284d..49c06a0 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
@@ -27,8 +27,8 @@ import org.apache.ignite.cluster.ClusterNode;
public interface TopologyValidator extends Serializable {
/**
* Validates topology.
- * @param nodes nodes collection to be validated.
- * @return is topology valid or not.
+ * @param nodes Collection of nodes.
+ * @return {@code true} in case topology is valid for specific cache, otherwise {@code false}
*/
boolean validate(Collection<ClusterNode> nodes);
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/2fbf328b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
index deb1fee..65f4694 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTopologyValidatorAbstractCacheTest.java
@@ -86,13 +86,11 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
*/
protected void putInvalid(String cacheName) {
try {
- assert grid(0).cache(cacheName).get(KEY_VALUE) == null;
-
grid(0).cache(cacheName).put(KEY_VALUE, KEY_VALUE);
assert false : "topology validation broken";
}
- catch (IgniteException | CacheException ex) {
+ catch (CacheException ex) {
assert ex.getCause() instanceof IgniteCheckedException &&
ex.getCause().getMessage().contains("cache topology is not valid");
}
@@ -105,18 +103,47 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
*/
protected void putValid(String cacheName) {
try {
- assert grid(0).cache(cacheName).get(KEY_VALUE) == null;
-
grid(0).cache(cacheName).put(KEY_VALUE, KEY_VALUE);
assert grid(0).cache(cacheName).get(KEY_VALUE).equals(KEY_VALUE);
}
- catch (IgniteException | CacheException ex) {
+ catch (CacheException ex) {
+ assert false : "topology validation broken";
+ }
+ }
+
+ /**
+ * Gets when topology is invalid.
+ *
+ * @param cacheName cache name.
+ */
+ protected void getInvalid(String cacheName) {
+ try {
+ assert grid(0).cache(cacheName).get(KEY_VALUE).equals(KEY_VALUE);
+ }
+ catch (CacheException ex) {
assert false : "topology validation broken";
}
}
/**
+ * Remove when topology is invalid.
+ *
+ * @param cacheName cache name.
+ */
+ protected void removeInvalid(String cacheName) {
+ try {
+ grid(0).cache(cacheName).remove(KEY_VALUE);
+
+ assert false : "topology validation broken";
+ }
+ catch (CacheException ex) {
+ assert ex.getCause() instanceof IgniteCheckedException &&
+ ex.getCause().getMessage().contains("cache topology is not valid");
+ }
+ }
+
+ /**
* Commits with error.
*
* @param tx transaction.
@@ -125,7 +152,7 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
try {
tx.commit();
}
- catch (IgniteException | CacheException ex) {
+ catch (IgniteException ex) {
assert ex.getCause() instanceof IgniteCheckedException &&
ex.getCause().getMessage().contains("cache topology is not valid");
}
@@ -158,8 +185,10 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
remove(null);
putInvalid(CACHE_NAME_1);
+ removeInvalid(CACHE_NAME_1);
putInvalid(CACHE_NAME_2);
+ removeInvalid(CACHE_NAME_2);
startGrid(1);
@@ -167,7 +196,6 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
remove(null);
putValid(CACHE_NAME_1);
- remove(CACHE_NAME_1);
putValid(CACHE_NAME_2);
remove(CACHE_NAME_2);
@@ -177,7 +205,9 @@ public abstract class IgniteTopologyValidatorAbstractCacheTest extends IgniteCac
putValid(null);
remove(null);
+ getInvalid(CACHE_NAME_1);
putInvalid(CACHE_NAME_1);
+ removeInvalid(CACHE_NAME_1);
putValid(CACHE_NAME_2);
remove(CACHE_NAME_2);
[10/17] ignite git commit: minot javadoc fix
Posted by vo...@apache.org.
minot javadoc fix
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/77fc9692
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/77fc9692
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/77fc9692
Branch: refs/heads/ignite-1364-1
Commit: 77fc969262584d82c5193ad347080876832f623f
Parents: 8901575
Author: Anton Vinogradov <av...@gridgain.com>
Authored: Thu Sep 3 23:24:21 2015 +0300
Committer: Anton Vinogradov <av...@gridgain.com>
Committed: Thu Sep 3 23:24:21 2015 +0300
----------------------------------------------------------------------
.../configuration/CacheConfiguration.java | 31 ++++++++------------
1 file changed, 12 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/77fc9692/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 1bbc110..85eed47 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -17,26 +17,10 @@
package org.apache.ignite.configuration;
-import java.io.Serializable;
-import java.util.Collection;
-import javax.cache.Cache;
-import javax.cache.CacheException;
-import javax.cache.configuration.CompleteConfiguration;
-import javax.cache.configuration.Factory;
-import javax.cache.configuration.MutableConfiguration;
-import javax.cache.expiry.ExpiryPolicy;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheInterceptor;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheRebalanceMode;
-import org.apache.ignite.cache.CacheTypeMetadata;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.cache.*;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.cache.affinity.AffinityKeyMapper;
import org.apache.ignite.cache.eviction.EvictionFilter;
@@ -52,6 +36,15 @@ import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.plugin.CachePluginConfiguration;
import org.jetbrains.annotations.Nullable;
+import javax.cache.Cache;
+import javax.cache.CacheException;
+import javax.cache.configuration.CompleteConfiguration;
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.MutableConfiguration;
+import javax.cache.expiry.ExpiryPolicy;
+import java.io.Serializable;
+import java.util.Collection;
+
/**
* This class defines grid cache configuration. This configuration is passed to
* grid via {@link IgniteConfiguration#getCacheConfiguration()} method. It defines all configuration
@@ -1806,7 +1799,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* Following validator allows to put data only in case topology contains exactly 2 nodes:
* <pre>{@code
* new TopologyValidator() {
- * @Override public boolean validate(Collection<ClusterNode> nodes) {
+ * public boolean validate(Collection<ClusterNode> nodes) {
* return nodes.size() == 2;
* }
* }
@@ -1835,7 +1828,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* Following validator allows to put data only in case topology contains exactly 2 nodes:
* <pre>{@code
* new TopologyValidator() {
- * @Override public boolean validate(Collection<ClusterNode> nodes) {
+ * public boolean validate(Collection<ClusterNode> nodes) {
* return nodes.size() == 2;
* }
* }
[02/17] ignite git commit: Fixing platform JavaDocs.
Posted by vo...@apache.org.
Fixing platform JavaDocs.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5463df29
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5463df29
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5463df29
Branch: refs/heads/ignite-1364-1
Commit: 5463df29a5e7c5d2ad7e583fc77d5c1ed38cc5f2
Parents: 27cd615
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Sep 3 14:28:07 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Sep 3 14:28:07 2015 +0300
----------------------------------------------------------------------
.../ignite/platform/cpp/package-info.java | 22 ++++++++++++++++++++
.../ignite/platform/dotnet/package-info.java | 22 ++++++++++++++++++++
.../apache/ignite/platform/package-info.java | 22 ++++++++++++++++++++
parent/pom.xml | 4 ++++
4 files changed, 70 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5463df29/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java b/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java
new file mode 100644
index 0000000..6d745a7
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/platform/cpp/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <!-- Package description. -->
+ * Contains C++ platform-related classes.
+ */
+package org.apache.ignite.platform.cpp;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/5463df29/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java
new file mode 100644
index 0000000..0765e01
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/platform/dotnet/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <!-- Package description. -->
+ * Contains .Net platform-related classes.
+ */
+package org.apache.ignite.platform.dotnet;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/5463df29/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java b/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java
new file mode 100644
index 0000000..ac89b58
--- /dev/null
+++ b/modules/platform/src/main/java/org/apache/ignite/platform/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <!-- Package description. -->
+ * Contains platform-related classes.
+ */
+package org.apache.ignite.platform;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/5463df29/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index ebe691f..eba7390 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -339,6 +339,10 @@
<packages>org.apache.ignite.yarn*</packages>
</group>
<group>
+ <title>Platforms</title>
+ <packages>org.apache.ignite.platform*</packages>
+ </group>
+ <group>
<title>Spark Integration</title>
<packages>org.apache.ignite.spark.examples.java</packages>
</group>
[17/17] ignite git commit: Merge branch 'master' into ignite-1364-1
Posted by vo...@apache.org.
Merge branch 'master' into ignite-1364-1
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2ca66975
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2ca66975
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2ca66975
Branch: refs/heads/ignite-1364-1
Commit: 2ca66975ca73d6f9351c649c0344e195905be5c3
Parents: 1fc06e0 a007210
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Sep 4 10:48:29 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Sep 4 10:48:29 2015 +0300
----------------------------------------------------------------------
examples/config/example-default.xml | 76 +++++
examples/config/example-ignite.xml | 56 +---
.../config/portable/example-ignite-portable.xml | 44 +++
.../ignite/examples/portable/Address.java | 72 ++++
.../ignite/examples/portable/Employee.java | 93 ++++++
.../ignite/examples/portable/EmployeeKey.java | 90 +++++
.../portable/ExamplePortableNodeStartup.java | 36 ++
.../ignite/examples/portable/Organization.java | 93 ++++++
.../examples/portable/OrganizationType.java | 32 ++
...mputeClientPortableTaskExecutionExample.java | 154 +++++++++
.../portable/computegrid/ComputeClientTask.java | 116 +++++++
.../portable/computegrid/package-info.java | 21 ++
.../CacheClientPortablePutGetExample.java | 230 +++++++++++++
.../CacheClientPortableQueryExample.java | 328 +++++++++++++++++++
.../portable/datagrid/package-info.java | 21 ++
.../ignite/examples/portable/package-info.java | 21 ++
.../java8/datagrid/CacheAffinityExample.java | 15 +
.../java8/messaging/MessagingExample.java | 11 +-
.../CacheClientPortableExampleTest.java | 46 +++
.../ComputeClientPortableExampleTest.java | 37 +++
.../testsuites/IgniteExamplesSelfTestSuite.java | 6 +
.../java8/examples/BasicExamplesSelfTest.java | 10 +-
.../java8/examples/CacheExamplesSelfTest.java | 8 +-
.../examples/CheckpointExamplesSelfTest.java | 8 +-
.../examples/ClusterGroupExampleSelfTest.java | 4 +-
.../examples/ContinuationExamplesSelfTest.java | 8 +-
.../ContinuousMapperExamplesSelfTest.java | 8 +-
.../examples/DeploymentExamplesSelfTest.java | 6 +-
.../java8/examples/EventsExamplesSelfTest.java | 5 +-
.../HibernateL2CacheExampleSelfTest.java | 8 +-
.../java8/examples/IgfsExamplesSelfTest.java | 6 +-
.../examples/LifecycleExamplesSelfTest.java | 8 +-
.../examples/MemcacheRestExamplesSelfTest.java | 4 +-
.../examples/MessagingExamplesSelfTest.java | 6 +-
.../examples/MonteCarloExamplesSelfTest.java | 8 +-
.../examples/SpringBeanExamplesSelfTest.java | 8 +-
.../java8/examples/TaskExamplesSelfTest.java | 4 +-
.../IgniteExamplesJ8SelfTestSuite.java | 12 +-
.../configuration/CacheConfiguration.java | 31 +-
.../apache/ignite/internal/IgniteKernal.java | 8 +-
.../IgniteCacheP2pUnmarshallingErrorTest.java | 5 +
.../testsuites/IgniteCacheTestSuite3.java | 3 +-
.../ignite/logger/log4j2/Log4J2Logger.java | 20 +-
.../ignite/platform/cpp/package-info.java | 22 ++
.../ignite/platform/dotnet/package-info.java | 22 ++
.../apache/ignite/platform/package-info.java | 22 ++
parent/pom.xml | 4 +
47 files changed, 1737 insertions(+), 119 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2ca66975/parent/pom.xml
----------------------------------------------------------------------
[09/17] ignite git commit: Log4j2LoggerSelfTest.testLogFilesTwoNodes
test case for Windows.
Posted by vo...@apache.org.
Log4j2LoggerSelfTest.testLogFilesTwoNodes test case for Windows.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8901575e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8901575e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8901575e
Branch: refs/heads/ignite-1364-1
Commit: 8901575e14f7334874d630ae685db624d00dcc7f
Parents: 154f185
Author: Artem Shutak <ar...@gmail.com>
Authored: Thu Sep 3 18:57:47 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Thu Sep 3 18:57:47 2015 +0300
----------------------------------------------------------------------
.../ignite/logger/log4j2/Log4J2Logger.java | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/8901575e/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
----------------------------------------------------------------------
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
index 5e6ab34..ffe8e1b 100644
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
+++ b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
@@ -242,10 +242,10 @@ public class Log4J2Logger implements IgniteLogger, LoggerNodeIdAware {
Appender innerApp = control.getAppender();
if (innerApp instanceof FileAppender)
- return ((FileAppender)innerApp).getFileName();
+ return normilize(((FileAppender)innerApp).getFileName());
if (innerApp instanceof RollingFileAppender)
- return ((RollingFileAppender)innerApp).getFileName();
+ return normilize(((RollingFileAppender)innerApp).getFileName());
}
}
catch (IllegalAccessException | NoSuchFieldException e) {
@@ -259,6 +259,20 @@ public class Log4J2Logger implements IgniteLogger, LoggerNodeIdAware {
}
/**
+ * Normalizes given path for windows.
+ * Log4j2 doesn't replace unix directory delimiters which used at 'fileName' to windows.
+ *
+ * @param path Path.
+ * @return Normalized path.
+ */
+ private String normilize(String path) {
+ if (!U.isWindows())
+ return path;
+
+ return path.replace('/', File.separatorChar);
+ }
+
+ /**
* Adds console appender when needed with some default logging settings.
*
* @param initLogClo Optional log implementation init closure.
@@ -495,4 +509,4 @@ public class Log4J2Logger implements IgniteLogger, LoggerNodeIdAware {
@Override public String toString() {
return S.toString(Log4J2Logger.class, this);
}
-}
\ No newline at end of file
+}
[15/17] ignite git commit: Fixed update notifier executor service
issue.
Posted by vo...@apache.org.
Fixed update notifier executor service issue.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/28213a31
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/28213a31
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/28213a31
Branch: refs/heads/ignite-1364-1
Commit: 28213a311213cd46e2ade744590f339f4fc385a3
Parents: f1f6be8
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Fri Sep 4 10:27:17 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Fri Sep 4 10:27:17 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/internal/IgniteKernal.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/28213a31/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index ad4940a..70cd56f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -821,7 +821,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
updateNtfTimer = new Timer("ignite-update-notifier-timer", true);
// Setup periodic version check.
- updateNtfTimer.scheduleAtFixedRate(new UpdateNotifierTimerTask(this, verChecker),
+ updateNtfTimer.scheduleAtFixedRate(new UpdateNotifierTimerTask(this, execSvc, verChecker),
0, PERIODIC_VER_CHECK_DELAY);
}
catch (IgniteCheckedException e) {
@@ -3199,15 +3199,15 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
* Constructor.
*
* @param kernal Kernal.
+ * @param execSvc Executor service.
* @param verChecker Version checker.
*/
- private UpdateNotifierTimerTask(IgniteKernal kernal, GridUpdateNotifier verChecker) {
+ private UpdateNotifierTimerTask(IgniteKernal kernal, ExecutorService execSvc, GridUpdateNotifier verChecker) {
kernalRef = new WeakReference<>(kernal);
log = kernal.log.getLogger(UpdateNotifierTimerTask.class);
- execSvc = kernal.executorService();
-
+ this.execSvc = execSvc;
this.verChecker = verChecker;
}
[14/17] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f1f6be8c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f1f6be8c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f1f6be8c
Branch: refs/heads/ignite-1364-1
Commit: f1f6be8c750877e636681b07af849418e2919dec
Parents: 7a69e74 ca1523e
Author: sboikov <sb...@gridgain.com>
Authored: Fri Sep 4 10:21:09 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Sep 4 10:21:09 2015 +0300
----------------------------------------------------------------------
.../portable/datagrid/CacheClientPortablePutGetExample.java | 4 ++++
.../portable/datagrid/CacheClientPortableQueryExample.java | 5 +++++
2 files changed, 9 insertions(+)
----------------------------------------------------------------------
[08/17] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/154f1858
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/154f1858
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/154f1858
Branch: refs/heads/ignite-1364-1
Commit: 154f18588e01943bfde60ade49262837bb670204
Parents: 2fbf328 6a5a48a
Author: Anton Vinogradov <av...@apache.org>
Authored: Thu Sep 3 18:35:06 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Thu Sep 3 18:35:06 2015 +0300
----------------------------------------------------------------------
examples/config/example-default.xml | 76 +++++
examples/config/example-ignite.xml | 56 +---
.../config/portable/example-ignite-portable.xml | 44 +++
.../ignite/examples/portable/Address.java | 72 +++++
.../ignite/examples/portable/Employee.java | 93 ++++++
.../ignite/examples/portable/EmployeeKey.java | 90 ++++++
.../portable/ExamplePortableNodeStartup.java | 36 +++
.../ignite/examples/portable/Organization.java | 93 ++++++
.../examples/portable/OrganizationType.java | 32 ++
...mputeClientPortableTaskExecutionExample.java | 154 +++++++++
.../portable/computegrid/ComputeClientTask.java | 116 +++++++
.../portable/computegrid/package-info.java | 21 ++
.../CacheClientPortablePutGetExample.java | 226 +++++++++++++
.../CacheClientPortableQueryExample.java | 323 +++++++++++++++++++
.../portable/datagrid/package-info.java | 21 ++
.../ignite/examples/portable/package-info.java | 21 ++
.../CacheClientPortableExampleTest.java | 46 +++
.../ComputeClientPortableExampleTest.java | 37 +++
.../testsuites/IgniteExamplesSelfTestSuite.java | 6 +
19 files changed, 1513 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
[12/17] ignite git commit: ignite-1369: fixed failing portable
example tests
Posted by vo...@apache.org.
ignite-1369: fixed failing portable example tests
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ca1523ec
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ca1523ec
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ca1523ec
Branch: refs/heads/ignite-1364-1
Commit: ca1523ec5c28286ac75f9fedd51cd53eb7870ff1
Parents: 77fc969
Author: Denis Magda <dm...@gridgain.com>
Authored: Fri Sep 4 09:05:55 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Fri Sep 4 09:05:55 2015 +0300
----------------------------------------------------------------------
.../portable/datagrid/CacheClientPortablePutGetExample.java | 4 ++++
.../portable/datagrid/CacheClientPortableQueryExample.java | 5 +++++
2 files changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/ca1523ec/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java
index 19c5685..77c5d95 100644
--- a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortablePutGetExample.java
@@ -86,6 +86,10 @@ public class CacheClientPortablePutGetExample {
System.out.println();
}
+ finally {
+ // Delete cache with its content completely.
+ ignite.destroyCache(CACHE_NAME);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/ca1523ec/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
index 1eb43b3..b0048fa 100644
--- a/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/portable/datagrid/CacheClientPortableQueryExample.java
@@ -117,6 +117,11 @@ public class CacheClientPortableQueryExample {
System.out.println();
}
+ finally {
+ // Delete caches with their content completely.
+ ignite.destroyCache(ORGANIZATION_CACHE_NAME);
+ ignite.destroyCache(EMPLOYEE_CACHE_NAME);
+ }
}
}
[04/17] ignite git commit: Disabled hanging tests.
Posted by vo...@apache.org.
Disabled hanging tests.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/66a49d75
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/66a49d75
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/66a49d75
Branch: refs/heads/ignite-1364-1
Commit: 66a49d75e3cdd001135f32a81dbfb931b9e1584b
Parents: 27cd615
Author: sboikov <sb...@gridgain.com>
Authored: Thu Sep 3 15:32:26 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Sep 3 15:32:26 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/66a49d75/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
index b62cc48..ecb2698 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingErrorTest.java
@@ -42,6 +42,11 @@ public class IgniteCacheP2pUnmarshallingErrorTest extends IgniteCacheAbstractTes
protected static int key = 0;
/** {@inheritDoc} */
+ @Override protected void beforeTestsStarted() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-1366");
+ }
+
+ /** {@inheritDoc} */
@Override protected int gridCount() {
return 3;
}
[05/17] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c5d303ba
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c5d303ba
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c5d303ba
Branch: refs/heads/ignite-1364-1
Commit: c5d303bac7a9b17f88260b1bde175fbfbc053988
Parents: 66a49d7 7f4c9ac
Author: sboikov <sb...@gridgain.com>
Authored: Thu Sep 3 15:34:47 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Sep 3 15:34:47 2015 +0300
----------------------------------------------------------------------
.../java8/datagrid/CacheAffinityExample.java | 15 +++++++++++++
.../java8/messaging/MessagingExample.java | 11 +++++++++-
.../java8/examples/BasicExamplesSelfTest.java | 10 ++++++---
.../java8/examples/CacheExamplesSelfTest.java | 8 ++++---
.../examples/CheckpointExamplesSelfTest.java | 8 +++----
.../examples/ClusterGroupExampleSelfTest.java | 4 +++-
.../examples/ContinuationExamplesSelfTest.java | 8 ++++---
.../ContinuousMapperExamplesSelfTest.java | 8 ++++---
.../examples/DeploymentExamplesSelfTest.java | 6 ++++--
.../java8/examples/EventsExamplesSelfTest.java | 5 +++--
.../HibernateL2CacheExampleSelfTest.java | 8 ++++---
.../java8/examples/IgfsExamplesSelfTest.java | 6 ++++--
.../examples/LifecycleExamplesSelfTest.java | 8 ++++---
.../examples/MemcacheRestExamplesSelfTest.java | 4 +++-
.../examples/MessagingExamplesSelfTest.java | 6 ++++--
.../examples/MonteCarloExamplesSelfTest.java | 8 ++++---
.../examples/SpringBeanExamplesSelfTest.java | 8 ++++---
.../java8/examples/TaskExamplesSelfTest.java | 4 +++-
.../IgniteExamplesJ8SelfTestSuite.java | 12 +++++++++--
.../ignite/platform/cpp/package-info.java | 22 ++++++++++++++++++++
.../ignite/platform/dotnet/package-info.java | 22 ++++++++++++++++++++
.../apache/ignite/platform/package-info.java | 22 ++++++++++++++++++++
parent/pom.xml | 4 ++++
23 files changed, 175 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
[13/17] ignite git commit: Uncommented test.
Posted by vo...@apache.org.
Uncommented test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7a69e74e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7a69e74e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7a69e74e
Branch: refs/heads/ignite-1364-1
Commit: 7a69e74ee86c85aef38b60607d91a7469436f542
Parents: 77fc969
Author: sboikov <sb...@gridgain.com>
Authored: Fri Sep 4 10:20:54 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Sep 4 10:20:54 2015 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/7a69e74e/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index 837fb9a..5a2815d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -73,6 +73,7 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.preloa
import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadSelfTest;
import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadStartStopEventsSelfTest;
import org.apache.ignite.internal.processors.cache.local.GridCacheDaemonNodeLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.local.GridCacheLocalByteArrayValuesSelfTest;
/**
* Test suite.
@@ -132,7 +133,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
suite.addTestSuite(GridCacheOrderedPreloadingSelfTest.class);
// Test for byte array value special case.
-// suite.addTestSuite(GridCacheLocalByteArrayValuesSelfTest.class);
+ suite.addTestSuite(GridCacheLocalByteArrayValuesSelfTest.class);
suite.addTestSuite(GridCacheNearPartitionedP2PEnabledByteArrayValuesSelfTest.class);
suite.addTestSuite(GridCacheNearPartitionedP2PDisabledByteArrayValuesSelfTest.class);
suite.addTestSuite(GridCachePartitionedOnlyP2PEnabledByteArrayValuesSelfTest.class);
[03/17] ignite git commit: Merge remote-tracking branch
'origin/ignite-1.4' into ignite-1.4
Posted by vo...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.4' into ignite-1.4
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7f4c9ace
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7f4c9ace
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7f4c9ace
Branch: refs/heads/ignite-1364-1
Commit: 7f4c9ace076ba4e0be5a97bc61a655b8ec11c363
Parents: 5463df2 0cba13c
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Sep 3 14:28:33 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Sep 3 14:28:33 2015 +0300
----------------------------------------------------------------------
.../java8/datagrid/CacheAffinityExample.java | 15 +++++++++++++++
.../examples/java8/messaging/MessagingExample.java | 11 ++++++++++-
.../ignite/java8/examples/BasicExamplesSelfTest.java | 10 +++++++---
.../ignite/java8/examples/CacheExamplesSelfTest.java | 8 +++++---
.../java8/examples/CheckpointExamplesSelfTest.java | 8 ++++----
.../java8/examples/ClusterGroupExampleSelfTest.java | 4 +++-
.../java8/examples/ContinuationExamplesSelfTest.java | 8 +++++---
.../examples/ContinuousMapperExamplesSelfTest.java | 8 +++++---
.../java8/examples/DeploymentExamplesSelfTest.java | 6 ++++--
.../java8/examples/EventsExamplesSelfTest.java | 5 +++--
.../examples/HibernateL2CacheExampleSelfTest.java | 8 +++++---
.../ignite/java8/examples/IgfsExamplesSelfTest.java | 6 ++++--
.../java8/examples/LifecycleExamplesSelfTest.java | 8 +++++---
.../java8/examples/MemcacheRestExamplesSelfTest.java | 4 +++-
.../java8/examples/MessagingExamplesSelfTest.java | 6 ++++--
.../java8/examples/MonteCarloExamplesSelfTest.java | 8 +++++---
.../java8/examples/SpringBeanExamplesSelfTest.java | 8 +++++---
.../ignite/java8/examples/TaskExamplesSelfTest.java | 4 +++-
.../testsuites/IgniteExamplesJ8SelfTestSuite.java | 12 ++++++++++--
19 files changed, 105 insertions(+), 42 deletions(-)
----------------------------------------------------------------------