You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vk...@apache.org on 2015/05/22 03:52:34 UTC

[01/14] incubator-ignite git commit: IGNITE-891 - Cache store improvements

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-891 d4bcd19b6 -> b37d00465


IGNITE-891 - Cache store improvements


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

Branch: refs/heads/ignite-891
Commit: 1e3238c76a3f32de31d8297082bd3eb9c7b4c332
Parents: d4bcd19
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Wed May 20 18:53:45 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Wed May 20 18:53:45 2015 -0700

----------------------------------------------------------------------
 ...cheStoreSessionListenerAbstractSelfTest.java |  4 +-
 .../CacheStoreSessionHibernateListener.java     |  5 +-
 ...heStoreSessionHibernateListenerSelfTest.java | 97 +++++++++++++++++++-
 3 files changed, 96 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1e3238c7/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
index 5df8f68..adac0b2 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/CacheStoreSessionListenerAbstractSelfTest.java
@@ -93,8 +93,8 @@ public abstract class CacheStoreSessionListenerAbstractSelfTest extends GridComm
             conn.createStatement().executeUpdate("DROP TABLE IF EXISTS Table1");
             conn.createStatement().executeUpdate("DROP TABLE IF EXISTS Table2");
 
-            conn.createStatement().executeUpdate("CREATE TABLE Table1 (key INT, value INT)");
-            conn.createStatement().executeUpdate("CREATE TABLE Table2 (key INT, value INT)");
+            conn.createStatement().executeUpdate("CREATE TABLE Table1 (id INT AUTO_INCREMENT, key INT, value INT)");
+            conn.createStatement().executeUpdate("CREATE TABLE Table2 (id INT AUTO_INCREMENT, key INT, value INT)");
         }
 
         loadCacheCnt.set(0);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1e3238c7/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
index 06af03a..fc9eb91 100644
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
@@ -19,7 +19,6 @@ package org.apache.ignite.cache.store.hibernate;
 
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.resources.*;
 import org.hibernate.*;
 
 import javax.cache.integration.*;
@@ -85,10 +84,10 @@ public class CacheStoreSessionHibernateListener implements CacheStoreSessionList
                 if (commit) {
                     hibSes.flush();
 
-                    if (tx != null)
+                    if (tx.isActive())
                         tx.commit();
                 }
-                else if (tx != null)
+                else if (tx.isActive())
                     tx.rollback();
             }
             catch (HibernateException e) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1e3238c7/modules/hibernate/src/test/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListenerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListenerSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListenerSelfTest.java
index d631393..a9d465e 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListenerSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListenerSelfTest.java
@@ -27,6 +27,8 @@ import org.hibernate.cfg.Configuration;
 import javax.cache.Cache;
 import javax.cache.configuration.*;
 import javax.cache.integration.*;
+import javax.persistence.*;
+import java.io.*;
 import java.util.*;
 
 /**
@@ -48,10 +50,13 @@ public class CacheStoreSessionHibernateListenerSelfTest extends CacheStoreSessio
             @Override public CacheStoreSessionListener create() {
                 CacheStoreSessionHibernateListener lsnr = new CacheStoreSessionHibernateListener();
 
-                Configuration cfg = new Configuration().
-                    setProperty("hibernate.connection.url", URL);
+                SessionFactory sesFactory = new Configuration().
+                    setProperty("hibernate.connection.url", URL).
+                    addAnnotatedClass(Table1.class).
+                    addAnnotatedClass(Table2.class).
+                    buildSessionFactory();
 
-                lsnr.setSessionFactory(cfg.buildSessionFactory());
+                lsnr.setSessionFactory(sesFactory);
 
                 return lsnr;
             }
@@ -90,6 +95,28 @@ public class CacheStoreSessionHibernateListenerSelfTest extends CacheStoreSessio
             writeCnt.incrementAndGet();
 
             checkSession();
+
+            if (write.get()) {
+                Session hibSes = session();
+
+                switch (ses.cacheName()) {
+                    case "cache1":
+                        hibSes.save(new Table1(entry.getKey(), entry.getValue()));
+
+                        break;
+
+                    case "cache2":
+                        if (fail.get())
+                            throw new CacheWriterException("Expected failure.");
+
+                        hibSes.save(new Table2(entry.getKey(), entry.getValue()));
+
+                        break;
+
+                    default:
+                        throw new CacheWriterException("Wring cache: " + ses.cacheName());
+                }
+            }
         }
 
         /** {@inheritDoc} */
@@ -113,10 +140,14 @@ public class CacheStoreSessionHibernateListenerSelfTest extends CacheStoreSessio
 
             assertTrue(hibSes.isOpen());
 
+            Transaction tx = hibSes.getTransaction();
+
+            assertNotNull(tx);
+
             if (ses.isWithinTransaction())
-                assertNotNull(hibSes.getTransaction());
+                assertTrue(tx.isActive());
             else
-                assertNull(hibSes.getTransaction());
+                assertFalse(tx.isActive());
 
             verifySameInstance(hibSes);
         }
@@ -145,4 +176,60 @@ public class CacheStoreSessionHibernateListenerSelfTest extends CacheStoreSessio
             return ses.<String, Session>properties().get(CacheStoreSessionHibernateListener.HIBERNATE_SES_KEY);
         }
     }
+
+    /**
+     */
+    @Entity
+    @Table(name = "Table1")
+    private static class Table1 implements Serializable {
+        /** */
+        @Id @GeneratedValue
+        @Column(name = "id")
+        private Integer id;
+
+        /** */
+        @Column(name = "key")
+        private int key;
+
+        /** */
+        @Column(name = "value")
+        private int value;
+
+        /**
+         * @param key Key.
+         * @param value Value.
+         */
+        private Table1(int key, int value) {
+            this.key = key;
+            this.value = value;
+        }
+    }
+
+    /**
+     */
+    @Entity
+    @Table(name = "Table2")
+    private static class Table2 implements Serializable {
+        /** */
+        @Id @GeneratedValue
+        @Column(name = "id")
+        private Integer id;
+
+        /** */
+        @Column(name = "key")
+        private int key;
+
+        /** */
+        @Column(name = "value")
+        private int value;
+
+        /**
+         * @param key Key.
+         * @param value Value.
+         */
+        private Table2(int key, int value) {
+            this.key = key;
+            this.value = value;
+        }
+    }
 }


[12/14] incubator-ignite git commit: Merge branch 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-5

Posted by vk...@apache.org.
Merge branch 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sprint-5


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

Branch: refs/heads/ignite-891
Commit: 4929c7ddb7407228c0f63ebdacfcc6f6227e67bc
Parents: d7349c3 6adbe76
Author: agura <ag...@gridgain.com>
Authored: Thu May 21 17:37:48 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Thu May 21 17:37:48 2015 +0300

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[10/14] incubator-ignite git commit: GG-10284

Posted by vk...@apache.org.
GG-10284


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

Branch: refs/heads/ignite-891
Commit: 6adbe76ddd9e18e1951675315b0824ea324bd092
Parents: 51d32fc
Author: avinogradov <av...@gridgain.com>
Authored: Thu May 21 17:37:03 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Thu May 21 17:37:03 2015 +0300

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6adbe76d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index abd3ab8..f4510a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <groupId>org.apache.ignite</groupId>
-    <artifactId>ignite</artifactId>
+    <artifactId>apache-ignite</artifactId>
     <version>1.0.7-SNAPSHOT</version>
     <packaging>pom</packaging>
 


[07/14] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5

Posted by vk...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5


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

Branch: refs/heads/ignite-891
Commit: 0bc36a975299dcdf56444590c8f4f106baf78bec
Parents: 4a23c2c 29bffe6
Author: null <null>
Authored: Thu May 21 13:56:59 2015 +0300
Committer: null <null>
Committed: Thu May 21 13:56:59 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 modules/core/src/main/java/META-INF/LICENSE     | 238 +++++++++++++++++++
 modules/core/src/main/java/META-INF/NOTICE      |  12 +
 .../core/src/main/resources/ignite.properties   |   2 +-
 modules/extdata/p2p/pom.xml                     |   2 +-
 modules/extdata/uri/pom.xml                     |   2 +-
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/log4j/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spring/pom.xml                          |   2 +-
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 parent/pom.xml                                  |   1 -
 pom.xml                                         |  39 ++-
 35 files changed, 309 insertions(+), 43 deletions(-)
----------------------------------------------------------------------



[13/14] incubator-ignite git commit: Merge branch 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-891

Posted by vk...@apache.org.
Merge branch 'ignite-sprint-5' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-891


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

Branch: refs/heads/ignite-891
Commit: 80ebfe0b0387ace6438bce6704df2cfded89292c
Parents: 1e3238c 4929c7d
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu May 21 15:54:58 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu May 21 15:54:58 2015 -0700

----------------------------------------------------------------------
 dev-tools/build.gradle                          |   2 +-
 dev-tools/src/main/groovy/jiraslurp.groovy      | 213 ++++++++++++++-----
 examples/pom.xml                                |   2 +-
 modules/aop/pom.xml                             |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../RandomEvictionPolicyCacheSizeSelfTest.java  |  72 +++++++
 .../IgniteCacheEvictionSelfTestSuite.java       |   1 +
 modules/extdata/p2p/pom.xml                     |   2 +-
 modules/extdata/uri/pom.xml                     |   2 +-
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate/pom.xml                       |   2 +-
 modules/indexing/pom.xml                        |   2 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/log4j/pom.xml                           |   2 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/schema-import/pom.xml                   |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spring/pom.xml                          |   2 +-
 modules/ssh/pom.xml                             |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/urideploy/pom.xml                       |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 pom.xml                                         |   4 +-
 36 files changed, 265 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/80ebfe0b/modules/spring/pom.xml
----------------------------------------------------------------------


[05/14] incubator-ignite git commit: # Adjusted version in ignite.properties.

Posted by vk...@apache.org.
# Adjusted version in ignite.properties.


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

Branch: refs/heads/ignite-891
Commit: 29bffe61a20fa6bac4c05d26bff35f6ac05f3e75
Parents: 3100dcc
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu May 21 13:24:21 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu May 21 13:24:21 2015 +0300

----------------------------------------------------------------------
 modules/core/src/main/resources/ignite.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/29bffe61/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index 61c6583..f53dec6 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=1.0.7
+ignite.version=1.0.7-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970


[02/14] incubator-ignite git commit: 1.0.7-SNAPSHOT

Posted by vk...@apache.org.
1.0.7-SNAPSHOT


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

Branch: refs/heads/ignite-891
Commit: 7e64372353b3aaf324c6e3e7ec1f616a4e6cdf25
Parents: 4b4158f
Author: Ignite Teamcity <ig...@apache.org>
Authored: Thu May 21 12:23:26 2015 +0300
Committer: Ignite Teamcity <ig...@apache.org>
Committed: Thu May 21 12:23:26 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml                                  | 2 +-
 modules/aop/pom.xml                               | 2 +-
 modules/aws/pom.xml                               | 2 +-
 modules/clients/pom.xml                           | 2 +-
 modules/cloud/pom.xml                             | 2 +-
 modules/codegen/pom.xml                           | 2 +-
 modules/core/pom.xml                              | 2 +-
 modules/core/src/main/resources/ignite.properties | 2 +-
 modules/extdata/p2p/pom.xml                       | 2 +-
 modules/extdata/uri/pom.xml                       | 2 +-
 modules/gce/pom.xml                               | 2 +-
 modules/geospatial/pom.xml                        | 2 +-
 modules/hadoop/pom.xml                            | 2 +-
 modules/hibernate/pom.xml                         | 2 +-
 modules/indexing/pom.xml                          | 2 +-
 modules/jcl/pom.xml                               | 2 +-
 modules/jta/pom.xml                               | 2 +-
 modules/log4j/pom.xml                             | 2 +-
 modules/rest-http/pom.xml                         | 2 +-
 modules/scalar/pom.xml                            | 2 +-
 modules/schedule/pom.xml                          | 2 +-
 modules/schema-import/pom.xml                     | 2 +-
 modules/slf4j/pom.xml                             | 2 +-
 modules/spring/pom.xml                            | 2 +-
 modules/ssh/pom.xml                               | 2 +-
 modules/tools/pom.xml                             | 2 +-
 modules/urideploy/pom.xml                         | 2 +-
 modules/visor-console/pom.xml                     | 2 +-
 modules/visor-plugins/pom.xml                     | 2 +-
 modules/web/pom.xml                               | 2 +-
 modules/yardstick/pom.xml                         | 2 +-
 pom.xml                                           | 2 +-
 32 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 064b804..0c53874 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>ignite-examples</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index a248f85..0f7f3e4 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aop</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/aws/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aws/pom.xml b/modules/aws/pom.xml
index a6604f9..abb89a8 100644
--- a/modules/aws/pom.xml
+++ b/modules/aws/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-aws</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 96b6542..2efa860 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-clients</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/cloud/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cloud/pom.xml b/modules/cloud/pom.xml
index 25d610e..5c8e07e 100644
--- a/modules/cloud/pom.xml
+++ b/modules/cloud/pom.xml
@@ -29,7 +29,7 @@
     </parent>
 
     <artifactId>ignite-cloud</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <properties>
         <jcloud.version>1.9.0</jcloud.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index ed4aa8f..617b3f4 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-codegen</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 72d993f..2521bd1 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-core</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index 58aed26..61c6583 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=1.0.6
+ignite.version=1.0.7
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/extdata/p2p/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/p2p/pom.xml b/modules/extdata/p2p/pom.xml
index 2357695..c7c1c00 100644
--- a/modules/extdata/p2p/pom.xml
+++ b/modules/extdata/p2p/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-p2p</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/extdata/uri/pom.xml
----------------------------------------------------------------------
diff --git a/modules/extdata/uri/pom.xml b/modules/extdata/uri/pom.xml
index bffe625..e7076c8 100644
--- a/modules/extdata/uri/pom.xml
+++ b/modules/extdata/uri/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-extdata-uri</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/gce/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gce/pom.xml b/modules/gce/pom.xml
index 310ba31..b985167 100644
--- a/modules/gce/pom.xml
+++ b/modules/gce/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-gce</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/geospatial/pom.xml
----------------------------------------------------------------------
diff --git a/modules/geospatial/pom.xml b/modules/geospatial/pom.xml
index b8111f1..44f6038 100644
--- a/modules/geospatial/pom.xml
+++ b/modules/geospatial/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-geospatial</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hadoop/pom.xml b/modules/hadoop/pom.xml
index 782f0c9..cc3d6de 100644
--- a/modules/hadoop/pom.xml
+++ b/modules/hadoop/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hadoop</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/hibernate/pom.xml
----------------------------------------------------------------------
diff --git a/modules/hibernate/pom.xml b/modules/hibernate/pom.xml
index d9caf79..b196a5e 100644
--- a/modules/hibernate/pom.xml
+++ b/modules/hibernate/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-hibernate</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index 3ac136c..d892755 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-indexing</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/jcl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jcl/pom.xml b/modules/jcl/pom.xml
index d81c7cb..193a881 100644
--- a/modules/jcl/pom.xml
+++ b/modules/jcl/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jcl</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/jta/pom.xml
----------------------------------------------------------------------
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index e02e601..3abb2dd 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-jta</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
index b07549f..671756f 100644
--- a/modules/log4j/pom.xml
+++ b/modules/log4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-log4j</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/rest-http/pom.xml
----------------------------------------------------------------------
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 4be6b4a..5a031ab 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-rest-http</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/scalar/pom.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/pom.xml b/modules/scalar/pom.xml
index 295d3de..f38c7e6 100644
--- a/modules/scalar/pom.xml
+++ b/modules/scalar/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-scalar</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/schedule/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index 1a36beb..3e347c4 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schedule</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/schema-import/pom.xml
----------------------------------------------------------------------
diff --git a/modules/schema-import/pom.xml b/modules/schema-import/pom.xml
index 0cda51b..f4f1245 100644
--- a/modules/schema-import/pom.xml
+++ b/modules/schema-import/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-schema-import</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/slf4j/pom.xml
----------------------------------------------------------------------
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index d2fdcef..ff62c67 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-slf4j</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 8494ad0..c88dfcf 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-spring</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/ssh/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index ba29b8a..c0c6f19 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-ssh</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index 1e9f270..5f19e7e 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-tools</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/urideploy/pom.xml
----------------------------------------------------------------------
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index b5f5b75..80c4faa 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-urideploy</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/visor-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-console/pom.xml b/modules/visor-console/pom.xml
index 95eb6cf..517425b 100644
--- a/modules/visor-console/pom.xml
+++ b/modules/visor-console/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-console</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/visor-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index edc45b6..e59f71f 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-visor-plugins</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <!-- Ignite dependencies -->

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/web/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 1479e79..63bab5f 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-web</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 0c20fbb..d99a57b 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -31,7 +31,7 @@
     </parent>
 
     <artifactId>ignite-yardstick</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
 
     <properties>
         <yardstick.version>0.7.0</yardstick.version>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e643723/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 537b8f9..abd3ab8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.ignite</groupId>
     <artifactId>ignite</artifactId>
-    <version>1.0.6-SNAPSHOT</version>
+    <version>1.0.7-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>


[11/14] incubator-ignite git commit: RandomEvictionPolicy cache size test added

Posted by vk...@apache.org.
RandomEvictionPolicy cache size test added


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

Branch: refs/heads/ignite-891
Commit: d7349c34d803eaf31afb88b2cc13102d1c68fbed
Parents: 51d32fc
Author: agura <ag...@gridgain.com>
Authored: Thu May 21 17:37:18 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Thu May 21 17:37:18 2015 +0300

----------------------------------------------------------------------
 .../RandomEvictionPolicyCacheSizeSelfTest.java  | 72 ++++++++++++++++++++
 .../IgniteCacheEvictionSelfTestSuite.java       |  1 +
 2 files changed, 73 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7349c34/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.java
new file mode 100644
index 0000000..e9e7228
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/random/RandomEvictionPolicyCacheSizeSelfTest.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.internal.processors.cache.eviction.random;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.eviction.random.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.testframework.junits.common.*;
+
+/**
+ * Random eviction policy cache size test.
+ */
+public class RandomEvictionPolicyCacheSizeSelfTest extends GridCommonAbstractTest {
+    /** Grid count. */
+    private static final int GRID_CNT = 3;
+
+    /** Keys count. */
+    private static final int KEYS_CNT = 50;
+
+    /** Policy max size. */
+    private static final int PLC_MAX_SIZE = 10;
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        startGrids(GRID_CNT);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        CacheConfiguration ccfg = defaultCacheConfiguration();
+        ccfg.setNearConfiguration(null);
+        ccfg.setEvictionPolicy(new RandomEvictionPolicy(PLC_MAX_SIZE));
+
+        cfg.setCacheConfiguration(ccfg);
+
+        return cfg;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSize() throws Exception {
+        IgniteCache<Integer, Integer> cache = grid(0).cache(null);
+
+        for (int i = 0; i < KEYS_CNT; i++)
+            cache.put(i, i);
+
+        assertEquals(PLC_MAX_SIZE * GRID_CNT, cache.size());
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7349c34/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
index 8918a29..0852496 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
@@ -44,6 +44,7 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridCacheLruEvictionPolicySelfTest.class));
         suite.addTest(new TestSuite(GridCacheLruNearEvictionPolicySelfTest.class));
         suite.addTest(new TestSuite(GridCacheNearOnlyLruNearEvictionPolicySelfTest.class));
+        suite.addTest(new TestSuite(RandomEvictionPolicyCacheSizeSelfTest.class));
         suite.addTest(new TestSuite(GridCacheRandomEvictionPolicySelfTest.class));
         suite.addTest(new TestSuite(GridCacheNearEvictionSelfTest.class));
         suite.addTest(new TestSuite(GridCacheAtomicNearEvictionSelfTest.class));


[04/14] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5

Posted by vk...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-5' into ignite-sprint-5

Conflicts:
	modules/core/src/main/resources/ignite.properties


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

Branch: refs/heads/ignite-891
Commit: 3100dcc49c5a981661c6191cd004b3cebd0d3217
Parents: f879a3d 7e64372
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu May 21 13:24:12 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu May 21 13:24:12 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml                                  | 2 +-
 modules/aop/pom.xml                               | 2 +-
 modules/aws/pom.xml                               | 2 +-
 modules/clients/pom.xml                           | 2 +-
 modules/cloud/pom.xml                             | 2 +-
 modules/codegen/pom.xml                           | 2 +-
 modules/core/pom.xml                              | 2 +-
 modules/core/src/main/resources/ignite.properties | 2 +-
 modules/extdata/p2p/pom.xml                       | 2 +-
 modules/extdata/uri/pom.xml                       | 2 +-
 modules/gce/pom.xml                               | 2 +-
 modules/geospatial/pom.xml                        | 2 +-
 modules/hadoop/pom.xml                            | 2 +-
 modules/hibernate/pom.xml                         | 2 +-
 modules/indexing/pom.xml                          | 2 +-
 modules/jcl/pom.xml                               | 2 +-
 modules/jta/pom.xml                               | 2 +-
 modules/log4j/pom.xml                             | 2 +-
 modules/rest-http/pom.xml                         | 2 +-
 modules/scalar/pom.xml                            | 2 +-
 modules/schedule/pom.xml                          | 2 +-
 modules/schema-import/pom.xml                     | 2 +-
 modules/slf4j/pom.xml                             | 2 +-
 modules/spring/pom.xml                            | 2 +-
 modules/ssh/pom.xml                               | 2 +-
 modules/tools/pom.xml                             | 2 +-
 modules/urideploy/pom.xml                         | 2 +-
 modules/visor-console/pom.xml                     | 2 +-
 modules/visor-plugins/pom.xml                     | 2 +-
 modules/web/pom.xml                               | 2 +-
 modules/yardstick/pom.xml                         | 2 +-
 pom.xml                                           | 2 +-
 32 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------



[09/14] incubator-ignite git commit: # ignite-456: fix patchApply start

Posted by vk...@apache.org.
# ignite-456: fix patchApply start


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

Branch: refs/heads/ignite-891
Commit: 51d32fc3c99b2e582feb8ab774aeafef8a345b7f
Parents: 51ae1a3
Author: null <null>
Authored: Thu May 21 14:53:07 2015 +0300
Committer: null <null>
Committed: Thu May 21 14:53:07 2015 +0300

----------------------------------------------------------------------
 dev-tools/src/main/groovy/jiraslurp.groovy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51d32fc3/dev-tools/src/main/groovy/jiraslurp.groovy
----------------------------------------------------------------------
diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy
index 0b8f090..32a6e43 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -363,8 +363,8 @@ args.each {
             runAllTestBuilds(builds, k)
         }
     }
-    else if (parameters.length > 1 && parameters[0] == "patchApply") {
-        if (parameters.length < 2 || parameters[1] !=~ /\w+-\d+/) {
+    else if (parameters.length >= 1 && parameters[0] == "patchApply") {
+        if (parameters.length < 2 || parameters[1] == 'null') {
             println "There is no jira number to apply. Exit."
 
             return


[03/14] incubator-ignite git commit: # Adjusted version in ignite.properties.

Posted by vk...@apache.org.
# Adjusted version in ignite.properties.


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

Branch: refs/heads/ignite-891
Commit: f879a3dbb29d16aed5fbb22d4087d17fac085c14
Parents: 4b4158f
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu May 21 13:23:48 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu May 21 13:23:48 2015 +0300

----------------------------------------------------------------------
 modules/core/src/main/resources/ignite.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f879a3db/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index 58aed26..f53dec6 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=1.0.6
+ignite.version=1.0.7-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970


[14/14] incubator-ignite git commit: IGNITE-891 - Cache store improvements

Posted by vk...@apache.org.
IGNITE-891 - Cache store improvements


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

Branch: refs/heads/ignite-891
Commit: b37d00465f1a162436082660ec69a1f765492373
Parents: 80ebfe0
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Thu May 21 18:52:15 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Thu May 21 18:52:15 2015 -0700

----------------------------------------------------------------------
 .../jdbc/CacheStoreSessionJdbcListener.java     | 16 +++-
 .../processors/cache/GridCacheProcessor.java    | 10 ++-
 .../cache/GridCacheSharedContext.java           | 15 +++-
 .../processors/cache/GridCacheUtils.java        | 33 +++++++
 .../store/GridCacheStoreManagerAdapter.java     | 44 +++-------
 .../cache/transactions/IgniteTxAdapter.java     | 13 ++-
 .../transactions/IgniteTxLocalAdapter.java      | 27 ++----
 .../loadtests/hashmap/GridCacheTestContext.java |  3 +-
 .../CacheStoreSessionHibernateListener.java     | 82 +++++++++++++++++-
 modules/spring/pom.xml                          | 12 +--
 .../spring/CacheStoreSessionSpringListener.java | 90 ++++++++++++++++++--
 ...CacheStoreSessionSpringListenerSelfTest.java |  2 +-
 12 files changed, 271 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheStoreSessionJdbcListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheStoreSessionJdbcListener.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheStoreSessionJdbcListener.java
index c683abe..e4cd617 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheStoreSessionJdbcListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheStoreSessionJdbcListener.java
@@ -17,9 +17,10 @@
 
 package org.apache.ignite.cache.store.jdbc;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.resources.*;
+import org.apache.ignite.lifecycle.*;
 
 import javax.cache.integration.*;
 import javax.sql.*;
@@ -29,7 +30,7 @@ import java.util.*;
 /**
  * Cache store session listener based on JDBC connection.
  */
-public class CacheStoreSessionJdbcListener implements CacheStoreSessionListener {
+public class CacheStoreSessionJdbcListener implements CacheStoreSessionListener, LifecycleAware {
     /** Session key for JDBC connection. */
     public static final String JDBC_CONN_KEY = "__jdbc_conn_";
 
@@ -57,6 +58,17 @@ public class CacheStoreSessionJdbcListener implements CacheStoreSessionListener
     }
 
     /** {@inheritDoc} */
+    @Override public void start() throws IgniteException {
+        if (dataSrc == null)
+            throw new IgniteException("Data source is required by " + getClass().getSimpleName() + '.');
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() throws IgniteException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
     @Override public void onSessionStart(CacheStoreSession ses) {
         Map<String, Connection> props = ses.properties();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 0e1a9c2..5b57817 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -567,7 +567,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         CacheConfiguration[] cfgs = ctx.config().getCacheConfiguration();
 
-        sharedCtx = createSharedContext(ctx);
+        sharedCtx = createSharedContext(ctx, CU.createStoreSessionListeners(ctx,
+            ctx.config().getCacheStoreSessionListenerFactories()));
 
         ctx.performance().add("Disable serializable transactions (set 'txSerializableEnabled' to false)",
             !ctx.config().getTransactionConfiguration().isTxSerializableEnabled());
@@ -1562,10 +1563,12 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * Creates shared context.
      *
      * @param kernalCtx Kernal context.
+     * @param storeSesLsnrs Store session listeners.
      * @return Shared context.
      */
     @SuppressWarnings("unchecked")
-    private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx) {
+    private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx,
+        Collection<CacheStoreSessionListener> storeSesLsnrs) {
         IgniteTxManager tm = new IgniteTxManager();
         GridCacheMvccManager mvccMgr = new GridCacheMvccManager();
         GridCacheVersionManager verMgr = new GridCacheVersionManager();
@@ -1580,7 +1583,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
             mvccMgr,
             depMgr,
             exchMgr,
-            ioMgr
+            ioMgr,
+            storeSesLsnrs
         );
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index b16885e..45634b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
@@ -77,6 +78,9 @@ public class GridCacheSharedContext<K, V> {
     /** Preloaders start future. */
     private IgniteInternalFuture<Object> preloadersStartFut;
 
+    /** Store session listeners. */
+    private Collection<CacheStoreSessionListener> storeSesLsnrs;
+
     /**
      * @param txMgr Transaction manager.
      * @param verMgr Version manager.
@@ -89,7 +93,8 @@ public class GridCacheSharedContext<K, V> {
         GridCacheMvccManager mvccMgr,
         GridCacheDeploymentManager<K, V> depMgr,
         GridCachePartitionExchangeManager<K, V> exchMgr,
-        GridCacheIoManager ioMgr
+        GridCacheIoManager ioMgr,
+        Collection<CacheStoreSessionListener> storeSesLsnrs
     ) {
         this.kernalCtx = kernalCtx;
         this.mvccMgr = add(mvccMgr);
@@ -98,6 +103,7 @@ public class GridCacheSharedContext<K, V> {
         this.depMgr = add(depMgr);
         this.exchMgr = add(exchMgr);
         this.ioMgr = add(ioMgr);
+        this.storeSesLsnrs = storeSesLsnrs;
 
         txMetrics = new TransactionMetricsAdapter();
 
@@ -524,6 +530,13 @@ public class GridCacheSharedContext<K, V> {
     }
 
     /**
+     * @return Store session listeners.
+     */
+    @Nullable public Collection<CacheStoreSessionListener> storeSessionListeners() {
+        return storeSesLsnrs;
+    }
+
+    /**
      * @param mgr Manager to add.
      * @return Added manager.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 549f42f..6968fcb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
@@ -34,12 +35,14 @@ import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.lifecycle.*;
 import org.apache.ignite.plugin.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 import org.jsr166.*;
 
 import javax.cache.*;
+import javax.cache.configuration.*;
 import javax.cache.expiry.*;
 import javax.cache.integration.*;
 import java.io.*;
@@ -1790,4 +1793,34 @@ public class GridCacheUtils {
 
         return res;
     }
+
+    /**
+     * Creates store session listeners.
+     *
+     * @param ctx Kernal context.
+     * @param factories Factories.
+     * @return Listeners.
+     */
+    public static Collection<CacheStoreSessionListener> createStoreSessionListeners(GridKernalContext ctx,
+        Factory<CacheStoreSessionListener>[] factories) throws IgniteCheckedException {
+        if (factories == null)
+            return null;
+
+        Collection<CacheStoreSessionListener> lsnrs = new ArrayList<>(factories.length);
+
+        for (Factory<CacheStoreSessionListener> factory : factories) {
+            CacheStoreSessionListener lsnr = factory.create();
+
+            if (lsnr != null) {
+                ctx.resource().injectGeneric(lsnr);
+
+                if (lsnr instanceof LifecycleAware)
+                    ((LifecycleAware)lsnr).start();
+
+                lsnrs.add(lsnr);
+            }
+        }
+
+        return lsnrs;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
index 79ac86d..8096291 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
@@ -35,7 +35,6 @@ import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
 import javax.cache.*;
-import javax.cache.configuration.*;
 import javax.cache.integration.*;
 import java.util.*;
 
@@ -167,39 +166,10 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
                 "Persistence store is configured, but both read-through and write-through are disabled.");
         }
 
-        sesLsnrs = createSessionListeners(cfg.getCacheStoreSessionListenerFactories());
+        sesLsnrs = CU.createStoreSessionListeners(cctx.kernalContext(), cfg.getCacheStoreSessionListenerFactories());
 
         if (sesLsnrs == null)
-            sesLsnrs = createSessionListeners(cctx.kernalContext().config().getCacheStoreSessionListenerFactories());
-    }
-
-    /**
-     * Creates session listeners.
-     *
-     * @param factories Factories.
-     * @return Listeners.
-     */
-    private Collection<CacheStoreSessionListener> createSessionListeners(Factory<CacheStoreSessionListener>[] factories)
-        throws IgniteCheckedException {
-        if (factories == null)
-            return null;
-
-        Collection<CacheStoreSessionListener> lsnrs = new ArrayList<>(factories.length);
-
-        for (Factory<CacheStoreSessionListener> factory : factories) {
-            CacheStoreSessionListener lsnr = factory.create();
-
-            if (lsnr != null) {
-                cctx.kernalContext().resource().injectGeneric(lsnr);
-
-                if (lsnr instanceof LifecycleAware)
-                    ((LifecycleAware)lsnr).start();
-
-                lsnrs.add(lsnr);
-            }
-        }
-
-        return lsnrs;
+            sesLsnrs = cctx.shared().storeSessionListeners();
     }
 
     /** {@inheritDoc} */
@@ -754,6 +724,11 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             if (!sesHolder.get().storeEnded(store))
                 store.sessionEnd(commit);
         }
+        catch (Throwable e) {
+            last = true;
+
+            throw e;
+        }
         finally {
             if (last && sesHolder != null) {
                 sesHolder.set(null);
@@ -834,8 +809,9 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
                         lsnr.onSessionEnd(locSes, !threwEx);
                 }
 
-                if (!sesHolder.get().storeEnded(store))
-                    store.sessionEnd(!threwEx);
+                assert !sesHolder.get().storeEnded(store);
+
+                store.sessionEnd(!threwEx);
             }
         }
         catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index f6d5d90..adc1c86 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -408,9 +408,18 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
         if (!storeEnabled())
             return false;
 
-        Collection<CacheStoreManager> stores = stores();
+        Collection<Integer> cacheIds = activeCacheIds();
+
+        if (!cacheIds.isEmpty()) {
+            for (int cacheId : cacheIds) {
+                CacheStoreManager store = cctx.cacheContext(cacheId).store();
 
-        return stores != null && !stores.isEmpty();
+                if (store.configured())
+                    return true;
+            }
+        }
+
+        return false;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 1bed2da..fdaef47 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -18,10 +18,10 @@
 package org.apache.ignite.internal.processors.cache.transactions;
 
 import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
 import org.apache.ignite.internal.managers.communication.*;
+import org.apache.ignite.internal.processors.affinity.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
 import org.apache.ignite.internal.processors.cache.dr.*;
@@ -1010,24 +1010,6 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                 cctx.tm().resetContext();
             }
         }
-        else if (!internal()) {
-            Collection<CacheStoreManager> stores = stores();
-
-            if (stores != null && !stores.isEmpty()) {
-                try {
-                    sessionEnd(stores, true);
-                }
-                catch (IgniteCheckedException e) {
-                    commitError(e);
-
-                    setRollbackOnly();
-
-                    cctx.tm().removeCommittedTx(this);
-
-                    throw e;
-                }
-            }
-        }
 
         // Do not unlock transaction entries if one-phase commit.
         if (!onePhaseCommit()) {
@@ -1119,7 +1101,12 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                 if (!internal()) {
                     Collection<CacheStoreManager> stores = stores();
 
-                    if (stores != null && !stores.isEmpty() && (near() || F.first(stores).isWriteToStoreFromDht()))
+                    assert isWriteToStoreFromDhtValid(stores) :
+                        "isWriteToStoreFromDht can't be different within one transaction";
+
+                    boolean isWriteToStoreFromDht = F.first(stores).isWriteToStoreFromDht();
+
+                    if (stores != null && !stores.isEmpty() && (near() || isWriteToStoreFromDht))
                         sessionEnd(stores, false);
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index 0b0f099..1c85ed3 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -54,7 +54,8 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K, V> {
                 new GridCacheMvccManager(),
                 new GridCacheDeploymentManager<K, V>(),
                 new GridCachePartitionExchangeManager<K, V>(),
-                new GridCacheIoManager()
+                new GridCacheIoManager(),
+                null
             ),
             defaultCacheConfiguration(),
             CacheType.USER,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
index fc9eb91..fe0960e 100644
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/store/hibernate/CacheStoreSessionHibernateListener.java
@@ -17,23 +17,40 @@
 
 package org.apache.ignite.cache.store.hibernate;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.store.*;
+import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lifecycle.*;
+import org.apache.ignite.resources.*;
 import org.hibernate.*;
+import org.hibernate.cfg.*;
 
 import javax.cache.integration.*;
+import java.io.*;
+import java.net.*;
 import java.util.*;
 
 /**
  * Cache store session listener based on Hibernate session.
  */
-public class CacheStoreSessionHibernateListener implements CacheStoreSessionListener {
+public class CacheStoreSessionHibernateListener implements CacheStoreSessionListener, LifecycleAware {
     /** Session key for JDBC connection. */
     public static final String HIBERNATE_SES_KEY = "__hibernate_ses_";
 
     /** Hibernate session factory. */
     private SessionFactory sesFactory;
 
+    /** Hibernate configuration file path. */
+    private String hibernateCfgPath;
+
+    /** Logger. */
+    @LoggerResource
+    private IgniteLogger log;
+
+    /** Whether to close session on stop. */
+    private boolean closeSesOnStop;
+
     /**
      * Sets Hibernate session factory.
      *
@@ -54,6 +71,69 @@ public class CacheStoreSessionHibernateListener implements CacheStoreSessionList
         return sesFactory;
     }
 
+    /**
+     * Sets hibernate configuration path.
+     *
+     * @param hibernateCfgPath Hibernate configuration path.
+     */
+    public void setHibernateConfigurationPath(String hibernateCfgPath) {
+        this.hibernateCfgPath = hibernateCfgPath;
+    }
+
+    /**
+     * Gets hibernate configuration path.
+     *
+     * @return Hibernate configuration path.
+     */
+    public String getHibernateConfigurationPath() {
+        return hibernateCfgPath;
+    }
+
+    /** {@inheritDoc} */
+    @SuppressWarnings("deprecation")
+    @Override public void start() throws IgniteException {
+        if (sesFactory == null && F.isEmpty(hibernateCfgPath))
+            throw new IgniteException("Either session factory or Hibernate configuration file is required by " +
+                getClass().getSimpleName() + '.');
+
+        if (!F.isEmpty(hibernateCfgPath)) {
+            if (sesFactory == null) {
+                try {
+                    URL url = new URL(hibernateCfgPath);
+
+                    sesFactory = new Configuration().configure(url).buildSessionFactory();
+                }
+                catch (MalformedURLException ignored) {
+                    // No-op.
+                }
+
+                if (sesFactory == null) {
+                    File cfgFile = new File(hibernateCfgPath);
+
+                    if (cfgFile.exists())
+                        sesFactory = new Configuration().configure(cfgFile).buildSessionFactory();
+                }
+
+                if (sesFactory == null)
+                    sesFactory = new Configuration().configure(hibernateCfgPath).buildSessionFactory();
+
+                if (sesFactory == null)
+                    throw new IgniteException("Failed to resolve Hibernate configuration file: " + hibernateCfgPath);
+
+                closeSesOnStop = true;
+            }
+            else
+                U.warn(log, "Hibernate configuration file configured in " + getClass().getSimpleName() +
+                    " will be ignored (session factory is already set).");
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() throws IgniteException {
+        if (closeSesOnStop && sesFactory != null && !sesFactory.isClosed())
+            sesFactory.close();
+    }
+
     /** {@inheritDoc} */
     @Override public void onSessionStart(CacheStoreSession ses) {
         Map<String, Session> props = ses.properties();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/spring/pom.xml
----------------------------------------------------------------------
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 2633c83..f49a23d 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -77,6 +77,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
             <version>1.1.1</version>
@@ -104,12 +110,6 @@
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-jdbc</artifactId>
-            <version>${spring.version}</version>
-            <scope>test</scope>
-        </dependency>
 
         <dependency>
             <groupId>com.h2database</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/spring/src/main/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListener.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListener.java b/modules/spring/src/main/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListener.java
index e0caad5..2fab4f0 100644
--- a/modules/spring/src/main/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListener.java
+++ b/modules/spring/src/main/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListener.java
@@ -17,32 +17,45 @@
 
 package org.apache.ignite.cache.store.spring;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lifecycle.*;
+import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;
+import org.springframework.jdbc.datasource.*;
 import org.springframework.transaction.*;
 import org.springframework.transaction.support.*;
 
 import javax.cache.integration.*;
+import javax.sql.*;
 
 /**
  * Cache store session listener based on Spring cache manager.
  */
-public class CacheStoreSessionSpringListener implements CacheStoreSessionListener {
+public class CacheStoreSessionSpringListener implements CacheStoreSessionListener, LifecycleAware {
     /** Session key for transaction status. */
     public static final String TX_STATUS_KEY = "__spring_tx_status_";
 
     /** Transaction manager. */
     private PlatformTransactionManager txMgr;
 
+    /** Data source. */
+    private DataSource dataSrc;
+
+    /** Propagation behavior. */
+    private int propagation = TransactionDefinition.PROPAGATION_REQUIRED;
+
+    /** Logger. */
+    @LoggerResource
+    private IgniteLogger log;
+
     /**
      * Sets transaction manager.
      *
      * @param txMgr Transaction manager.
      */
     public void setTransactionManager(PlatformTransactionManager txMgr) {
-        A.notNull(txMgr, "txMgr");
-
         this.txMgr = txMgr;
     }
 
@@ -55,11 +68,71 @@ public class CacheStoreSessionSpringListener implements CacheStoreSessionListene
         return txMgr;
     }
 
+    /**
+     * Sets data source.
+     *
+     * @param dataSrc Data source.
+     */
+    public void setDataSource(DataSource dataSrc) {
+        this.dataSrc = dataSrc;
+    }
+
+    /**
+     * Gets data source.
+     *
+     * @return Data source.
+     */
+    public DataSource getDataSource() {
+        return dataSrc;
+    }
+
+    /**
+     * Sets propagation behavior.
+     *
+     * @param propagation Propagation behavior.
+     */
+    public void setPropagationBehavior(int propagation) {
+        this.propagation = propagation;
+    }
+
+    /**
+     * Gets propagation behavior.
+     *
+     * @return Propagation behavior.
+     */
+    public int getPropagationBehavior() {
+        return propagation;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void start() throws IgniteException {
+        if (txMgr == null && dataSrc == null)
+            throw new IgniteException("Either transaction manager or data source is required by " +
+                getClass().getSimpleName() + '.');
+
+        if (dataSrc != null) {
+            if (txMgr == null)
+                txMgr = new DataSourceTransactionManager(dataSrc);
+            else
+                U.warn(log, "Data source configured in " + getClass().getSimpleName() +
+                    " will be ignored (transaction manager is already set).");
+        }
+
+        assert txMgr != null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() throws IgniteException {
+        // No-op.
+    }
+
     /** {@inheritDoc} */
     @Override public void onSessionStart(CacheStoreSession ses) {
         if (ses.isWithinTransaction()) {
             try {
-                ses.properties().put(TX_STATUS_KEY, txMgr.getTransaction(definition(ses.transaction())));
+                TransactionDefinition def = definition(ses.transaction(), ses.cacheName());
+
+                ses.properties().put(TX_STATUS_KEY, txMgr.getTransaction(def));
             }
             catch (TransactionException e) {
                 throw new CacheWriterException("Failed to start store session [tx=" + ses.transaction() + ']', e);
@@ -91,12 +164,19 @@ public class CacheStoreSessionSpringListener implements CacheStoreSessionListene
      *
      * @return DB transaction isolation.
      */
-    private TransactionDefinition definition(Transaction tx) {
+    private TransactionDefinition definition(Transaction tx, String cacheName) {
         assert tx != null;
 
         DefaultTransactionDefinition def = new DefaultTransactionDefinition();
 
+        def.setName("Ignite Tx [cache=" + (cacheName != null ? cacheName : "<default>") + ", id=" + tx.xid() + ']');
         def.setIsolationLevel(isolationLevel(tx.isolation()));
+        def.setPropagationBehavior(propagation);
+
+        long timeoutSec = (tx.timeout() + 500) / 1000;
+
+        if (timeoutSec > 0 && timeoutSec < Integer.MAX_VALUE)
+            def.setTimeout((int)timeoutSec);
 
         return def;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b37d0046/modules/spring/src/test/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListenerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListenerSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListenerSelfTest.java
index 79d5b5e..83ed249 100644
--- a/modules/spring/src/test/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListenerSelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/spring/CacheStoreSessionSpringListenerSelfTest.java
@@ -54,7 +54,7 @@ public class CacheStoreSessionSpringListenerSelfTest extends CacheStoreSessionLi
             @Override public CacheStoreSessionListener create() {
                 CacheStoreSessionSpringListener lsnr = new CacheStoreSessionSpringListener();
 
-                lsnr.setTransactionManager(new DataSourceTransactionManager(DATA_SRC));
+                lsnr.setDataSource(DATA_SRC);
 
                 return lsnr;
             }


[06/14] incubator-ignite git commit: # ignite-456: second part

Posted by vk...@apache.org.
# ignite-456: second part


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

Branch: refs/heads/ignite-891
Commit: 4a23c2c830b5dd5276e5b70a08b170a62060637b
Parents: 3cc3fbe
Author: null <null>
Authored: Thu May 21 13:56:37 2015 +0300
Committer: null <null>
Committed: Thu May 21 13:56:37 2015 +0300

----------------------------------------------------------------------
 dev-tools/build.gradle                     |   2 +-
 dev-tools/src/main/groovy/jiraslurp.groovy | 213 ++++++++++++++++++------
 2 files changed, 159 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4a23c2c8/dev-tools/build.gradle
----------------------------------------------------------------------
diff --git a/dev-tools/build.gradle b/dev-tools/build.gradle
index 164a775..10f9b64 100644
--- a/dev-tools/build.gradle
+++ b/dev-tools/build.gradle
@@ -36,7 +36,7 @@ task help {
 }
 
 task slurp(dependsOn: 'classes', type: JavaExec) {
-    args(project.buildDir, "slurp,${System.getenv('TEST_BUILDS')}")
+    args(project.buildDir)
     main = 'jiraslurp'
     classpath = sourceSets.main.runtimeClasspath
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4a23c2c8/dev-tools/src/main/groovy/jiraslurp.groovy
----------------------------------------------------------------------
diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy
index 34ac79c..0b8f090 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -19,7 +19,8 @@
  * attachments to process.
  */
 final GIT_REPO = "https://git1-us-west.apache.org/repos/asf/incubator-ignite.git"
-final ATTACHMENT_URL = "https://issues.apache.org/jira/secure/attachment"
+final JIRA_URL = "https://issues.apache.org"
+final ATTACHMENT_URL = "$JIRA_URL/jira/secure/attachment"
 final validated_filename = "${System.getProperty("user.home")}/validated-jira.txt"
 final LAST_SUCCESSFUL_ARTIFACT = "guestAuth/repository/download/Ignite_PatchValidation_PatchChecker/.lastSuccessful/$validated_filename"
 
@@ -119,8 +120,6 @@ def checkForAttachments = {
  * Monitors given process and show errors if exist.
  */
 def checkprocess = { process ->
-    println process.text
-
     process.waitFor()
 
     if (process.exitValue() != 0) {
@@ -179,65 +178,162 @@ def JIRA_xml = { jiranum ->
 }
 
 /**
- * Runs all given test builds to validate last patch from given jira.
+ * Gets all builds from TC project.
  */
-def runAllTestBuilds = { builds, jiraNum ->
-    assert jiraNum != 'null', 'Jira number should not be null.'
-    assert jiraNum != null, 'Jira number should not be null.'
+def getTestBuilds = { ->
+    def projName = System.getenv('PROJECT_NAME')
 
-    if (jiraNum) {
-        def tcURL = System.getenv('TC_URL')
-        def user = System.getenv('TASK_RUNNER_USER')
-        def pwd = System.getenv('TASK_RUNNER_PWD')
+    if (projName == null || projName == 'null')
+        projName = "Ignite"
 
-        builds.each {
-            try {
-                println "Triggering $it build for $jiraNum jira..."
+    def tcURL = System.getenv('TC_URL')
+    def excludeListProp = System.getenv('BUILD_ID_EXCLUDES')
+    def excludeList = excludeListProp?.split(' ') as List
 
-                String postData =
-                    "<build>" +
-                        "  <buildType id='$it'/>" +
-                        "  <properties>" +
-                        "    <property name='JIRA_NUM' value='$jiraNum'/>" +
-                        "  </properties>" +
-                        "</build>";
+    if (excludeList == null || excludeList == 'null')
+        excludeList = ["Ignite_RunAllTestBuilds"]
+
+    def project = new XmlSlurper().parse("http://$tcURL:80/guestAuth/app/rest/projects/id:$projName")
+
+    def buildIds = []
 
-                URL url = new URL("http://$tcURL:80/httpAuth/app/rest/buildQueue");
+    def count = Integer.valueOf(project.buildTypes.@count as String)
+
+    for (int i = 0; i < count; i++) {
+        def id = project.buildTypes.buildType[i].@id
+
+        if (excludeList == null || !excludeList.contains(id))
+            buildIds.add(id)
+    }
+
+    buildIds
+}
+
+/**
+ * Util method to send post request.
+ */
+def sendPostRequest = { urlString, user, pwd, postData, contentType ->
+    URL url = new URL(urlString as String);
 
-                HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+    HttpURLConnection conn = (HttpURLConnection)url.openConnection();
 
-                String encoded = new sun.misc.BASE64Encoder().encode("$user:$pwd".getBytes());
+    String encoded = new sun.misc.BASE64Encoder().encode("$user:$pwd".getBytes());
+
+    conn.setRequestProperty("Authorization", "Basic " + encoded);
+
+    conn.setDoOutput(true);
+    conn.setRequestMethod("POST");
+    conn.setRequestProperty("Content-Type", contentType);
+    conn.setRequestProperty("Content-Length", String.valueOf(postData.length()));
+
+    OutputStream os = conn.getOutputStream();
+    os.write(postData.getBytes());
+    os.flush();
+    os.close();
+
+    conn.connect();
+
+    // Read response.
+    BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+
+    String response = "";
+    String line;
+
+    while ((line = br.readLine()) != null)
+        response += line
+
+    br.close();
+
+    response
+}
+
+/**
+ * Adds comment to jira ticket.
+ */
+def addJiraComment = { jiraNum, comment ->
+    def user = System.getenv('JIRA_USER')
+    def pwd = System.getenv('JIRA_PWD')
+
+    try {
+        println "Comment: $comment"
 
-                conn.setRequestProperty("Authorization", "Basic " + encoded);
+        def jsonComment = "{\n \"body\": \"${comment}\"\n}";
 
-                conn.setDoOutput(true);
-                conn.setRequestMethod("POST");
-                conn.setRequestProperty("Content-Type", "application/xml");
-                conn.setRequestProperty("Content-Length", String.valueOf(postData.length()));
+        def response = sendPostRequest(
+            "$JIRA_URL/jira/rest/api/2/issue/$jiraNum/comment" as String,
+            user,
+            pwd,
+            jsonComment,
+            "application/json")
 
-                OutputStream os = conn.getOutputStream();
-                os.write(postData.getBytes());
-                os.flush();
-                os.close();
+        println "Response: $response"
+    }
+    catch (Exception e) {
+        e.printStackTrace()
+    }
+}
 
-                conn.connect();
+/**
+ * Runs all given test builds to validate last patch from given jira.
+ */
+def runAllTestBuilds = {builds, jiraNum ->
+    def tcURL = System.getenv('TC_URL')
+    def user = System.getenv('TASK_RUNNER_USER')
+    def pwd = System.getenv('TASK_RUNNER_PWD')
 
-                // Read response.
-                print "Response: "
+    def triggeredBuilds = [:]
 
-                BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+    builds.each {
+        try {
+            println "Triggering $it build for $jiraNum jira..."
 
-                String line;
-                while ((line = br.readLine()) != null)
-                    println line
+            String postData
 
-                br.close();
+            if (jiraNum == 'null' || jiraNum == null) {
+                postData = "<build>" +
+                        "  <buildType id='$it'/>" +
+                        "</build>";
             }
-            catch (Exception e) {
-                e.printStackTrace()
+            else {
+                postData = "<build>" +
+                        "  <buildType id='$it'/>" +
+                        "  <properties>" +
+                        "    <property name='env.JIRA_NUM' value='$jiraNum'/>" +
+                        "  </properties>" +
+                        "</build>";
             }
+
+            println "Request: $postData"
+
+            def response = sendPostRequest(
+                "http://$tcURL:80/httpAuth/app/rest/buildQueue" as String,
+                user,
+                pwd,
+                postData,
+                "application/xml")
+
+            println "Response: $response"
+
+            def build = new XmlSlurper().parseText(response)
+
+            println "Triggered build: ${build.buildType.@name}"
+            println "Triggered build url: ${build.@webUrl}"
+            println "Triggered build branch: ${build.@branchName}"
+
+            triggeredBuilds.put(build.buildType.@name, build.@webUrl)
+        }
+        catch (Exception e) {
+            e.printStackTrace()
         }
     }
+
+    def triggeredBuildsComment = "There was triggered next test builds for last attached patch-file:\\n"
+
+    triggeredBuilds.each { name, url ->
+        triggeredBuildsComment += "${name as String} - ${url as String}\\n"
+    }
+
+    addJiraComment(jiraNum, triggeredBuildsComment)
 }
 
 /**
@@ -250,22 +346,30 @@ args.each {
 
     println parameters
 
-    if (parameters.length == 2 && parameters[0] == "slurp" && parameters[1] != 'null') {
-        def builds = parameters[1].split(' ');
-
-        println "Running in 'slurp' mode. Test builds=${builds}"
+    if (parameters.length >= 1 && parameters[0] == "slurp") {
+        println "Running in 'slurp' mode."
 
         checkForAttachments()
 
+        def builds = getTestBuilds()
+
+        println "Test builds to be triggered=$builds"
+
         // For each ticket with new attachment, let's trigger remove build
         jirasAttached.each { k, v ->
             //  Trailing slash is important for download; only need to pass JIRA number
             println "Triggering the test builds for: $k = $ATTACHMENT_URL/$v/"
 
-            runAllTestBuilds(builds,k)
+            runAllTestBuilds(builds, k)
         }
     }
-    else if (parameters.length == 2 && parameters[0] == "patchApply" && parameters[1] ==~ /\w+-\d+/) {
+    else if (parameters.length > 1 && parameters[0] == "patchApply") {
+        if (parameters.length < 2 || parameters[1] !=~ /\w+-\d+/) {
+            println "There is no jira number to apply. Exit."
+
+            return
+        }
+
         def jiraNum = parameters[1]
 
         println "Running in 'patch apply' mode with jira number '$jiraNum'"
@@ -285,17 +389,16 @@ args.each {
             applyPatch(jira, attachementURL)
         }
     }
-    else if (parameters.length >= 2 && parameters[0] == "runAllBuilds" && parameters[1] ==~ /\w+-\d+/) {
+    else if (parameters.length > 1 && parameters[0] == "runAllBuilds" ) {
         def jiraNum = parameters[1]
 
-        def attachementURL=null
+        println "Running in 'all builds' mode with jira number='$jiraNum'."
 
-        if (parameters[2] ==~ /\d+/)
-            attachementURL = parameters[2]
+        def builds = getTestBuilds()
 
-        println "Running in 'all builds' mode with jira number='$jiraNum' and attachment URL='$attachementURL'."
+        println "Test builds to be triggered=$builds"
 
-        runAllTestBuilds jiraNum attachmentURL
+        runAllTestBuilds(builds, jiraNum)
     }
 }
 


[08/14] incubator-ignite git commit: # ignite-456: fix slurp runner

Posted by vk...@apache.org.
# ignite-456: fix slurp runner


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

Branch: refs/heads/ignite-891
Commit: 51ae1a36674d6ea00de401c04cfef607c77f00cc
Parents: 0bc36a9
Author: null <null>
Authored: Thu May 21 14:17:19 2015 +0300
Committer: null <null>
Committed: Thu May 21 14:17:19 2015 +0300

----------------------------------------------------------------------
 dev-tools/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/51ae1a36/dev-tools/build.gradle
----------------------------------------------------------------------
diff --git a/dev-tools/build.gradle b/dev-tools/build.gradle
index 10f9b64..5b089e8 100644
--- a/dev-tools/build.gradle
+++ b/dev-tools/build.gradle
@@ -36,7 +36,7 @@ task help {
 }
 
 task slurp(dependsOn: 'classes', type: JavaExec) {
-    args(project.buildDir)
+    args(project.buildDir, "slurp")
     main = 'jiraslurp'
     classpath = sourceSets.main.runtimeClasspath
 }