You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/04 14:45:21 UTC

[1/7] ignite git commit: IGNITE-1947 More info about why query was not found in error message.

Repository: ignite
Updated Branches:
  refs/heads/ignite-1537 4a1b1ecb1 -> bfaa9de42


IGNITE-1947 More info about why query was not found in error message.


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

Branch: refs/heads/ignite-1537
Commit: e6f6f407ef4f0c3555fd80fe5ba328739d94e3f0
Parents: baab3d2
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Dec 4 15:14:49 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Dec 4 15:14:49 2015 +0700

----------------------------------------------------------------------
 .../processors/rest/handlers/query/QueryCommandHandler.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e6f6f407/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
index bb929a4..0c44077 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/query/QueryCommandHandler.java
@@ -443,14 +443,16 @@ public class QueryCommandHandler extends GridRestCommandHandlerAdapter {
 
                 if (qryCurIt == null)
                     return new GridRestResponse(GridRestResponse.STATUS_FAILED,
-                        "Failed to find query with ID: " + req.queryId());
+                        "Failed to find query with ID: " + req.queryId() + ". " +
+                        "Possible reasons: wrong query ID, no more data to fetch from query, query was closed by timeout" +
+                        " or node where query was executed is not found.");
 
                 qryCurIt.lock();
 
                 try {
                     if (qryCurIt.timestamp() == -1)
                         return new GridRestResponse(GridRestResponse.STATUS_FAILED,
-                            "Query is closed by timeout. Restart query with ID: " + req.queryId());
+                            "Query with ID: " + req.queryId() + " was closed by timeout");
 
                     qryCurIt.timestamp(U.currentTimeMillis());
 


[7/7] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-1537

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-1537


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

Branch: refs/heads/ignite-1537
Commit: bfaa9de42d4c69ffc979096d9820e5433950f07e
Parents: 4a1b1ec 92ef7c7
Author: sboikov <sb...@gridgain.com>
Authored: Fri Dec 4 16:45:04 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Dec 4 16:45:04 2015 +0300

----------------------------------------------------------------------
 examples/config/example-default.xml             |   7 +
 .../store/auto/CacheBinaryAutoStoreExample.java | 158 +++++++++++++++++++
 .../datagrid/store/auto/package-info.java       |  22 +++
 .../store/auto/CacheAutoStoreExample.java       |  93 +++++++++--
 .../auto/CacheAutoStoreLoadDataExample.java     |  85 ----------
 .../datagrid/store/auto/CacheConfig.java        |  81 ----------
 .../datagrid/store/auto/DbH2ServerStartup.java  |  79 ----------
 .../ignite/examples/util/DbH2ServerStartup.java |  79 ++++++++++
 .../ignite/examples/util/package-info.java      |  22 +++
 .../store/jdbc/CacheAbstractJdbcStore.java      |  12 +-
 .../cache/store/jdbc/CacheJdbcPojoStore.java    |   9 ++
 .../dht/preloader/GridDhtPartitionDemander.java |   2 +-
 .../handlers/query/QueryCommandHandler.java     |   6 +-
 .../ignite/schema/ui/SchemaImportApp.java       |  14 ++
 ...IgniteTransactionalWriteInvokeBenchmark.java |  16 +-
 parent/pom.xml                                  |   4 +
 16 files changed, 420 insertions(+), 269 deletions(-)
----------------------------------------------------------------------



[4/7] ignite git commit: Javadoc hotfix

Posted by sb...@apache.org.
Javadoc hotfix


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

Branch: refs/heads/ignite-1537
Commit: d5fa3c1b69cfa336e70087dded9ddfa099000235
Parents: e5de23e
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Dec 4 13:24:59 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Dec 4 13:24:59 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/preloader/GridDhtPartitionDemander.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d5fa3c1b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index ced0d10..998f7a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -359,7 +359,7 @@ public class GridDhtPartitionDemander {
      * @param fut Future.
      * @param assigns Assignments.
      * @throws IgniteCheckedException If failed.
-     * @return
+     * @return Partitions were requested.
      */
     private boolean requestPartitions(
         RebalanceFuture fut,


[6/7] ignite git commit: IGNITE-2041 Fixed JDBC cache store example. Reworked from deprecated code to new API and refactored code, made it more simple. Fixed bug in store in case of cache configured keepBinaryInStore(true). Added one more auto cache

Posted by sb...@apache.org.
 IGNITE-2041 Fixed JDBC cache store example.
 Reworked from deprecated code to new API and refactored code, made it more simple.
 Fixed bug in store in case of cache configured keepBinaryInStore(true).
 Added one more auto cache store example: CacheBinaryAutoStoreExample.


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

Branch: refs/heads/ignite-1537
Commit: 92ef7c7ce8229130762b64082cc9455579a05247
Parents: 6a109eb
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Dec 4 17:57:57 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Dec 4 17:57:57 2015 +0700

----------------------------------------------------------------------
 examples/config/example-default.xml             |   7 +
 .../store/auto/CacheBinaryAutoStoreExample.java | 158 +++++++++++++++++++
 .../datagrid/store/auto/package-info.java       |  22 +++
 .../store/auto/CacheAutoStoreExample.java       |  93 +++++++++--
 .../auto/CacheAutoStoreLoadDataExample.java     |  85 ----------
 .../datagrid/store/auto/CacheConfig.java        |  81 ----------
 .../datagrid/store/auto/DbH2ServerStartup.java  |  79 ----------
 .../ignite/examples/util/DbH2ServerStartup.java |  79 ++++++++++
 .../ignite/examples/util/package-info.java      |  22 +++
 .../store/jdbc/CacheAbstractJdbcStore.java      |  12 +-
 .../cache/store/jdbc/CacheJdbcPojoStore.java    |   9 ++
 11 files changed, 390 insertions(+), 257 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/config/example-default.xml
----------------------------------------------------------------------
diff --git a/examples/config/example-default.xml b/examples/config/example-default.xml
index e6c359d..6bd6f16 100644
--- a/examples/config/example-default.xml
+++ b/examples/config/example-default.xml
@@ -28,6 +28,13 @@
         http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/util
         http://www.springframework.org/schema/util/spring-util.xsd">
+
+    <!-- Datasource for sample in-memory H2 database. -->
+    <bean id="h2-example-db" class="org.h2.jdbcx.JdbcDataSource">
+        <property name="URL" value="jdbc:h2:tcp://localhost/mem:ExampleDb" />
+        <property name="user" value="sa" />
+    </bean>
+
     <bean abstract="true" id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
         <!-- Set to true to enable distributed class loading for examples, default is false. -->
         <property name="peerClassLoadingEnabled" value="true"/>

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/CacheBinaryAutoStoreExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/CacheBinaryAutoStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/CacheBinaryAutoStoreExample.java
new file mode 100644
index 0000000..9df9f79
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/CacheBinaryAutoStoreExample.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.binary.datagrid.store.auto;
+
+import java.sql.Types;
+import java.util.UUID;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
+import org.apache.ignite.cache.store.jdbc.JdbcType;
+import org.apache.ignite.cache.store.jdbc.JdbcTypeField;
+import org.apache.ignite.cache.store.jdbc.dialect.H2Dialect;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.examples.ExampleNodeStartup;
+import org.apache.ignite.examples.util.DbH2ServerStartup;
+import org.apache.ignite.examples.model.Person;
+import org.apache.ignite.transactions.Transaction;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+
+/**
+ * Demonstrates usage of cache with underlying persistent store configured.
+ * <p>
+ * This example uses {@link CacheJdbcPojoStore} as a persistent store.
+ * <p>
+ * To start the example, you should:
+ * <ul>
+ *     <li>Start H2 database TCP server using {@link DbH2ServerStartup}.</li>
+ *     <li>Start a few nodes using {@link ExampleNodeStartup} or by starting remote nodes as specified below.</li>
+ *     <li>Start example using {@link CacheBinaryAutoStoreExample}.</li>
+ * </ul>
+ * <p>
+ * Remote nodes should always be started with special configuration file which
+ * contains H2 data source bean descriptor: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
+ * <p>
+ * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will
+ * start node with {@code examples/config/example-ignite.xml} configuration.
+ */
+public class CacheBinaryAutoStoreExample {
+    /** Global person ID to use across entire example. */
+    private static final Long id = Math.abs(UUID.randomUUID().getLeastSignificantBits());
+
+    /** Cache name. */
+    public static final String CACHE_NAME = CacheBinaryAutoStoreExample.class.getSimpleName();
+
+    /**
+     * Configure cache with store.
+     */
+    private static CacheConfiguration<Long, Person> cacheConfiguration() {
+        CacheJdbcPojoStoreFactory<Long, Person> storeFactory = new CacheJdbcPojoStoreFactory<>();
+
+        storeFactory.setDataSourceBean("h2-example-db");
+        storeFactory.setDialect(new H2Dialect());
+
+        JdbcType jdbcType = new JdbcType();
+
+        jdbcType.setCacheName(CACHE_NAME);
+        jdbcType.setDatabaseSchema("PUBLIC");
+        jdbcType.setDatabaseTable("PERSON");
+
+        jdbcType.setKeyType("java.lang.Long");
+        jdbcType.setKeyFields(new JdbcTypeField(Types.BIGINT, "ID", Long.class, "id"));
+
+        jdbcType.setValueType("org.apache.ignite.examples.model.Person");
+        jdbcType.setValueFields(
+                new JdbcTypeField(Types.BIGINT, "ID", Long.class, "id"),
+                new JdbcTypeField(Types.VARCHAR, "FIRST_NAME", String.class, "firstName"),
+                new JdbcTypeField(Types.VARCHAR, "LAST_NAME", String.class, "lastName")
+        );
+
+        storeFactory.setTypes(jdbcType);
+
+        CacheConfiguration<Long, Person> cfg = new CacheConfiguration<>(CACHE_NAME);
+
+        cfg.setCacheStoreFactory(storeFactory);
+
+        // Set atomicity as transaction, since we are showing transactions in the example.
+        cfg.setAtomicityMode(TRANSACTIONAL);
+
+        // This option will allow to start remote nodes without having user classes in classpath.
+        cfg.setKeepBinaryInStore(true);
+
+        cfg.setReadThrough(true);
+        cfg.setWriteThrough(true);
+
+        return cfg;
+    }
+
+    /**
+     * Executes example.
+     *
+     * @param args Command line arguments, none required.
+     * @throws IgniteException If example execution failed.
+     */
+    public static void main(String[] args) throws IgniteException {
+        // To start ignite with desired configuration uncomment the appropriate line.
+        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
+            System.out.println();
+            System.out.println(">>> Cache auto store example started.");
+
+            try (IgniteCache<Long, Person> cache = ignite.getOrCreateCache(cacheConfiguration())) {
+                try (Transaction tx = ignite.transactions().txStart()) {
+                    Person val = cache.get(id);
+
+                    System.out.println("Read value: " + val);
+
+                    val = cache.getAndPut(id, new Person(id, "Isaac", "Newton"));
+
+                    System.out.println("Overwrote old value: " + val);
+
+                    val = cache.get(id);
+
+                    System.out.println("Read value: " + val);
+
+                    tx.commit();
+                }
+
+                System.out.println("Read value after commit: " + cache.get(id));
+
+                cache.clear();
+
+                System.out.println(">>> ------------------------------------------");
+                System.out.println(">>> Load data to cache from DB with cusom SQL...");
+
+                // Load cache on all data nodes with custom SQL statement.
+                cache.loadCache(null, "java.lang.Long", "select * from PERSON where id <= 3");
+
+                System.out.println("Loaded cache entries: " + cache.size());
+
+                cache.clear();
+
+                // Load cache on all data nodes with default SQL statement.
+                System.out.println(">>> Load ALL data to cache from DB...");
+                cache.loadCache(null);
+
+                System.out.println("Loaded cache entries: " + cache.size());
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/package-info.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/package-info.java b/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/package-info.java
new file mode 100644
index 0000000..153f210
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/binary/datagrid/store/auto/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <!-- Package description. -->
+ * Contains automatic JDBC store example.
+ */
+package org.apache.ignite.examples.binary.datagrid.store.auto;

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
index 37a31d7..a262c38 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreExample.java
@@ -17,15 +17,25 @@
 
 package org.apache.ignite.examples.datagrid.store.auto;
 
+import java.sql.Types;
 import java.util.UUID;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore;
+import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
+import org.apache.ignite.cache.store.jdbc.JdbcType;
+import org.apache.ignite.cache.store.jdbc.JdbcTypeField;
+import org.apache.ignite.cache.store.jdbc.dialect.H2Dialect;
+import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.examples.ExampleNodeStartup;
 import org.apache.ignite.examples.model.Person;
+import org.apache.ignite.examples.util.DbH2ServerStartup;
 import org.apache.ignite.transactions.Transaction;
+import org.h2.jdbcx.JdbcConnectionPool;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 
 /**
  * Demonstrates usage of cache with underlying persistent store configured.
@@ -35,23 +45,70 @@ import org.apache.ignite.transactions.Transaction;
  * To start the example, you should:
  * <ul>
  *     <li>Start H2 database TCP server using {@link DbH2ServerStartup}.</li>
- *     <li>Start a few nodes using {@link ExampleNodeStartup} or by starting remote nodes as specified below.</li>
+ *     <li>Start a few nodes using {@link ExampleNodeStartup}.</li>
  *     <li>Start example using {@link CacheAutoStoreExample}.</li>
  * </ul>
  * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will
+ * Remote nodes can be started with {@link ExampleNodeStartup} in another JVM which will
  * start node with {@code examples/config/example-ignite.xml} configuration.
  */
 public class CacheAutoStoreExample {
-    /** Cache name. */
-    public static final String CACHE_NAME = CacheAutoStoreLoadDataExample.class.getSimpleName();
-
     /** Global person ID to use across entire example. */
     private static final Long id = Math.abs(UUID.randomUUID().getLeastSignificantBits());
 
+    /** Cache name. */
+    public static final String CACHE_NAME = CacheAutoStoreExample.class.getSimpleName();
+
+    /**
+     * Example store factory.
+     */
+    private static final class CacheJdbcPojoStoreExampleFactory extends CacheJdbcPojoStoreFactory<Long, Person> {
+        /** {@inheritDoc} */
+        @Override public CacheJdbcPojoStore<Long, Person> create() {
+            JdbcType jdbcType = new JdbcType();
+
+            jdbcType.setCacheName(CACHE_NAME);
+            jdbcType.setDatabaseSchema("PUBLIC");
+            jdbcType.setDatabaseTable("PERSON");
+
+            jdbcType.setKeyType("java.lang.Long");
+            jdbcType.setKeyFields(new JdbcTypeField(Types.BIGINT, "ID", Long.class, "id"));
+
+            jdbcType.setValueType("org.apache.ignite.examples.model.Person");
+            jdbcType.setValueFields(
+                    new JdbcTypeField(Types.BIGINT, "ID", Long.class, "id"),
+                    new JdbcTypeField(Types.VARCHAR, "FIRST_NAME", String.class, "firstName"),
+                    new JdbcTypeField(Types.VARCHAR, "LAST_NAME", String.class, "lastName")
+            );
+
+            CacheJdbcPojoStore<Long, Person> store = new CacheJdbcPojoStore<>();
+
+            store.setDataSource(JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:ExampleDb", "sa", ""));
+            store.setDialect(new H2Dialect());
+
+            store.setTypes(jdbcType);
+
+            return store;
+        }
+    }
+
+    /**
+     * Configure cache with store.
+     */
+    private static CacheConfiguration<Long, Person> cacheConfiguration() {
+        CacheConfiguration<Long, Person> cfg = new CacheConfiguration<>(CACHE_NAME);
+
+        cfg.setCacheStoreFactory(new CacheJdbcPojoStoreExampleFactory());
+
+        // Set atomicity as transaction, since we are showing transactions in the example.
+        cfg.setAtomicityMode(TRANSACTIONAL);
+
+        cfg.setReadThrough(true);
+        cfg.setWriteThrough(true);
+
+        return cfg;
+    }
+
     /**
      * Executes example.
      *
@@ -64,7 +121,7 @@ public class CacheAutoStoreExample {
             System.out.println();
             System.out.println(">>> Cache auto store example started.");
 
-            try (IgniteCache<Long, Person> cache = ignite.getOrCreateCache(CacheConfig.jdbcPojoStoreCache(CACHE_NAME))) {
+            try (IgniteCache<Long, Person> cache = ignite.getOrCreateCache(cacheConfiguration())) {
                 try (Transaction tx = ignite.transactions().txStart()) {
                     Person val = cache.get(id);
 
@@ -82,6 +139,24 @@ public class CacheAutoStoreExample {
                 }
 
                 System.out.println("Read value after commit: " + cache.get(id));
+
+                cache.clear();
+
+                System.out.println(">>> ------------------------------------------");
+                System.out.println(">>> Load data to cache from DB with cusom SQL...");
+
+                // Load cache on all data nodes with custom SQL statement.
+                cache.loadCache(null, "java.lang.Long", "select * from PERSON where id <= 3");
+
+                System.out.println("Loaded cache entries: " + cache.size());
+
+                cache.clear();
+
+                // Load cache on all data nodes with default SQL statement.
+                System.out.println(">>> Load ALL data to cache from DB...");
+                cache.loadCache(null);
+
+                System.out.println("Loaded cache entries: " + cache.size());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
deleted file mode 100644
index 63a8c6f..0000000
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.examples.datagrid.store.auto;
-
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.ExampleNodeStartup;
-import org.apache.ignite.examples.ExamplesUtils;
-import org.apache.ignite.examples.model.Person;
-
-/**
- * Demonstrates how to load data from database.
- * <p>
- * This example uses {@link CacheJdbcPojoStore} as a persistent store.
- * <p>
- * To start the example, you should:
- * <ul>
- *     <li>Start H2 database TCP server using {@link DbH2ServerStartup}.</li>
- *     <li>Start a few nodes using {@link ExampleNodeStartup} or by starting remote nodes as specified below.</li>
- *     <li>Start example using {@link CacheAutoStoreLoadDataExample}.</li>
- * </ul>
- * <p>
- * Remote nodes should always be started with special configuration file which
- * enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-ignite.xml'}.
- * <p>
- * Alternatively you can run {@link ExampleNodeStartup} in another JVM which will
- * start node with {@code examples/config/example-ignite.xml} configuration.
- */
-public class CacheAutoStoreLoadDataExample {
-    /** Cache name. */
-    public static final String CACHE_NAME = CacheAutoStoreLoadDataExample.class.getSimpleName();
-
-    /** Heap size required to run this example. */
-    public static final int MIN_MEMORY = 1024 * 1024 * 1024;
-
-    /**
-     * Executes example.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If example execution failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        ExamplesUtils.checkMinMemory(MIN_MEMORY);
-
-        try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-            System.out.println();
-            System.out.println(">>> Cache auto store load data example started.");
-
-            CacheConfiguration<Long, Person> cacheCfg = CacheConfig.jdbcPojoStoreCache(CACHE_NAME);
-
-            try (IgniteCache<Long, Person> cache = ignite.getOrCreateCache(cacheCfg)) {
-                // Load cache on all data nodes with custom SQL statement.
-                cache.loadCache(null, "java.lang.Long", "select * from PERSON where id <= 3");
-
-                System.out.println("Loaded cache entries: " + cache.size());
-
-                cache.clear();
-
-                // Load cache on all data nodes with default SQL statement.
-                cache.loadCache(null);
-
-                System.out.println("Loaded cache entries: " + cache.size());
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java
deleted file mode 100644
index 3b38aeb..0000000
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheConfig.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.examples.datagrid.store.auto;
-
-import java.sql.Types;
-import java.util.Arrays;
-import java.util.Collections;
-import javax.cache.configuration.Factory;
-import org.apache.ignite.cache.CacheTypeFieldMetadata;
-import org.apache.ignite.cache.CacheTypeMetadata;
-import org.apache.ignite.cache.store.CacheStore;
-import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.examples.model.Person;
-import org.h2.jdbcx.JdbcConnectionPool;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-
-/**
- * Predefined configuration for examples with {@link CacheJdbcPojoStore}.
- */
-public class CacheConfig {
-    /**
-     * Configure cache with store.
-     */
-    public static CacheConfiguration<Long, Person> jdbcPojoStoreCache(String name) {
-        CacheConfiguration<Long, Person> cfg = new CacheConfiguration<>(name);
-
-        // Set atomicity as transaction, since we are showing transactions in the example.
-        cfg.setAtomicityMode(TRANSACTIONAL);
-
-        cfg.setCacheStoreFactory(new Factory<CacheStore<? super Long, ? super Person>>() {
-            @Override public CacheStore<? super Long, ? super Person> create() {
-                CacheJdbcPojoStore<Long, Person> store = new CacheJdbcPojoStore<>();
-
-                store.setDataSource(JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:ExampleDb", "sa", ""));
-
-                return store;
-            }
-        });
-
-        CacheTypeMetadata meta = new CacheTypeMetadata();
-
-        meta.setDatabaseTable("PERSON");
-
-        meta.setKeyType("java.lang.Long");
-        meta.setValueType("org.apache.ignite.examples.model.Person");
-
-        meta.setKeyFields(Collections.singletonList(new CacheTypeFieldMetadata("ID", Types.BIGINT, "id", Long.class)));
-
-        meta.setValueFields(Arrays.asList(
-            new CacheTypeFieldMetadata("ID", Types.BIGINT, "id", long.class),
-            new CacheTypeFieldMetadata("FIRST_NAME", Types.VARCHAR, "firstName", String.class),
-            new CacheTypeFieldMetadata("LAST_NAME", Types.VARCHAR, "lastName", String.class)
-        ));
-
-        cfg.setTypeMetadata(Collections.singletonList(meta));
-
-        cfg.setWriteBehindEnabled(true);
-
-        cfg.setReadThrough(true);
-        cfg.setWriteThrough(true);
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/DbH2ServerStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/DbH2ServerStartup.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/DbH2ServerStartup.java
deleted file mode 100644
index f5e07a8..0000000
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/DbH2ServerStartup.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.examples.datagrid.store.auto;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.sql.SQLException;
-import org.apache.ignite.IgniteException;
-import org.h2.jdbcx.JdbcConnectionPool;
-import org.h2.tools.RunScript;
-import org.h2.tools.Server;
-
-/**
- * Start H2 database TCP server in order to access sample in-memory database from other processes.
- */
-public class DbH2ServerStartup {
-    /** Create table script. */
-    private static final String CREATE_TABLE =
-        "create table PERSON(id bigint not null, first_name varchar(50), last_name varchar(50), PRIMARY KEY(id));";
-
-    /** Sample data script. */
-    private static final String POPULATE_TABLE =
-        "insert into PERSON(id, first_name, last_name) values(1, 'Johannes', 'Kepler');\n" +
-        "insert into PERSON(id, first_name, last_name) values(2, 'Galileo', 'Galilei');\n" +
-        "insert into PERSON(id, first_name, last_name) values(3, 'Henry', 'More');\n" +
-        "insert into PERSON(id, first_name, last_name) values(4, 'Polish', 'Brethren');\n" +
-        "insert into PERSON(id, first_name, last_name) values(5, 'Robert', 'Boyle');\n" +
-        "insert into PERSON(id, first_name, last_name) values(6, 'Isaac', 'Newton');";
-
-    /**
-     * Start H2 database TCP server.
-     *
-     * @param args Command line arguments, none required.
-     * @throws IgniteException If start H2 database TCP server failed.
-     */
-    public static void main(String[] args) throws IgniteException {
-        try {
-            // Start H2 database TCP server in order to access sample in-memory database from other processes.
-            Server.createTcpServer("-tcpDaemon").start();
-
-            // Try to connect to database TCP server.
-            JdbcConnectionPool dataSrc = JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:ExampleDb", "sa", "");
-
-            // Create Person table in database.
-            RunScript.execute(dataSrc.getConnection(), new StringReader(CREATE_TABLE));
-
-            // Populates Person table with sample data in database.
-            RunScript.execute(dataSrc.getConnection(), new StringReader(POPULATE_TABLE));
-        }
-        catch (SQLException e) {
-            throw new IgniteException("Failed to start database TCP server", e);
-        }
-
-        try {
-            do {
-                System.out.println("Type 'q' and press 'Enter' to stop H2 TCP server...");
-            }
-            while ('q' != System.in.read());
-        }
-        catch (IOException ignored) {
-            // No-op.
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/util/DbH2ServerStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/util/DbH2ServerStartup.java b/examples/src/main/java/org/apache/ignite/examples/util/DbH2ServerStartup.java
new file mode 100644
index 0000000..01717d0
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/util/DbH2ServerStartup.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.util;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.sql.SQLException;
+import org.apache.ignite.IgniteException;
+import org.h2.jdbcx.JdbcConnectionPool;
+import org.h2.tools.RunScript;
+import org.h2.tools.Server;
+
+/**
+ * Start H2 database TCP server in order to access sample in-memory database from other processes.
+ */
+public class DbH2ServerStartup {
+    /** Create table script. */
+    private static final String CREATE_TABLE =
+        "create table PERSON(id bigint not null, first_name varchar(50), last_name varchar(50), PRIMARY KEY(id));";
+
+    /** Sample data script. */
+    private static final String POPULATE_TABLE =
+        "insert into PERSON(id, first_name, last_name) values(1, 'Johannes', 'Kepler');\n" +
+        "insert into PERSON(id, first_name, last_name) values(2, 'Galileo', 'Galilei');\n" +
+        "insert into PERSON(id, first_name, last_name) values(3, 'Henry', 'More');\n" +
+        "insert into PERSON(id, first_name, last_name) values(4, 'Polish', 'Brethren');\n" +
+        "insert into PERSON(id, first_name, last_name) values(5, 'Robert', 'Boyle');\n" +
+        "insert into PERSON(id, first_name, last_name) values(6, 'Isaac', 'Newton');";
+
+    /**
+     * Start H2 database TCP server.
+     *
+     * @param args Command line arguments, none required.
+     * @throws IgniteException If start H2 database TCP server failed.
+     */
+    public static void main(String[] args) throws IgniteException {
+        try {
+            // Start H2 database TCP server in order to access sample in-memory database from other processes.
+            Server.createTcpServer("-tcpDaemon").start();
+
+            // Try to connect to database TCP server.
+            JdbcConnectionPool dataSrc = JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:ExampleDb", "sa", "");
+
+            // Create Person table in database.
+            RunScript.execute(dataSrc.getConnection(), new StringReader(CREATE_TABLE));
+
+            // Populates Person table with sample data in database.
+            RunScript.execute(dataSrc.getConnection(), new StringReader(POPULATE_TABLE));
+        }
+        catch (SQLException e) {
+            throw new IgniteException("Failed to start database TCP server", e);
+        }
+
+        try {
+            do {
+                System.out.println("Type 'q' and press 'Enter' to stop H2 TCP server...");
+            }
+            while ('q' != System.in.read());
+        }
+        catch (IOException ignored) {
+            // No-op.
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/examples/src/main/java/org/apache/ignite/examples/util/package-info.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/util/package-info.java b/examples/src/main/java/org/apache/ignite/examples/util/package-info.java
new file mode 100644
index 0000000..1d87d02
--- /dev/null
+++ b/examples/src/main/java/org/apache/ignite/examples/util/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <!-- Package description. -->
+ * Contains utility classes for examples.
+ */
+package org.apache.ignite.examples.util;

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
index 7617e48..366262c 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java
@@ -49,6 +49,7 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.cache.CacheTypeFieldMetadata;
 import org.apache.ignite.cache.CacheTypeMetadata;
 import org.apache.ignite.cache.store.CacheStore;
@@ -1442,8 +1443,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      * @return Next index for parameters.
      * @throws CacheException If failed to set statement parameters.
      */
-    protected int fillKeyParameters(PreparedStatement stmt, int idx, EntryMapping em,
-        Object key) throws CacheException {
+    protected int fillKeyParameters(PreparedStatement stmt, int idx, EntryMapping em, Object key) throws CacheException {
         for (JdbcTypeField field : em.keyColumns()) {
             Object fieldVal = extractParameter(em.cacheName, em.keyType(), em.keyKind(), field.getJavaFieldName(), key);
 
@@ -1474,8 +1474,14 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
      */
     protected int fillValueParameters(PreparedStatement stmt, int idx, EntryMapping em, Object val)
         throws CacheWriterException {
+        TypeKind valKind = em.valueKind();
+
+        // Object could be passed by cache in binary format in case of cache configured with setKeepBinaryInStore(true).
+        if (valKind == TypeKind.POJO && val instanceof BinaryObject)
+            valKind = TypeKind.BINARY;
+
         for (JdbcTypeField field : em.uniqValFlds) {
-            Object fieldVal = extractParameter(em.cacheName, em.valueType(), em.valueKind(), field.getJavaFieldName(), val);
+            Object fieldVal = extractParameter(em.cacheName, em.valueType(), valKind, field.getJavaFieldName(), val);
 
             fillParameter(stmt, idx++, field, fieldVal);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/92ef7c7c/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
index abc4b2e..a25df04 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
@@ -354,6 +354,15 @@ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
             this.getter = getter;
             this.setter = setter;
             this.field = field;
+
+            if (getter != null)
+                getter.setAccessible(true);
+
+            if (setter != null)
+                setter.setAccessible(true);
+
+            if (field != null)
+                field.setAccessible(true);
         }
 
         /**


[3/7] ignite git commit: Fixed IgniteTransactionalWriteInvokeBenchmark

Posted by sb...@apache.org.
Fixed IgniteTransactionalWriteInvokeBenchmark


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

Branch: refs/heads/ignite-1537
Commit: e5de23e9b61acc435ead4e70be9970a307906dbb
Parents: 11d668b
Author: ashutak <as...@gridgain.com>
Authored: Fri Dec 4 12:11:15 2015 +0300
Committer: ashutak <as...@gridgain.com>
Committed: Fri Dec 4 12:11:15 2015 +0300

----------------------------------------------------------------------
 .../IgniteTransactionalWriteInvokeBenchmark.java    | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e5de23e9/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
index 9f9b5f7..35befad 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalWriteInvokeBenchmark.java
@@ -68,17 +68,15 @@ public class IgniteTransactionalWriteInvokeBenchmark extends IgniteFailoverAbstr
 
         long start = System.nanoTime();
 
-        if (cfg.memberId() == 0) {
-            try (IgniteDataStreamer<String, Long> dataLdr = ignite().dataStreamer(cacheName())) {
-                for (int k = 0; k < args.range() && !Thread.currentThread().isInterrupted(); k++) {
-                    dataLdr.addData("key-" + k + "-master", INITIAL_VALUE);
+        try (IgniteDataStreamer<String, Long> dataLdr = ignite().dataStreamer(cacheName())) {
+            for (int k = 0; k < args.range() && !Thread.currentThread().isInterrupted(); k++) {
+                dataLdr.addData("key-" + k + "-master", INITIAL_VALUE);
 
-                    for (int i = 0; i < args.keysCount(); i++)
-                        dataLdr.addData("key-" + k + "-" + i, INITIAL_VALUE);
+                for (int i = 0; i < args.keysCount(); i++)
+                    dataLdr.addData("key-" + k + "-" + i, INITIAL_VALUE);
 
-                    if (k % 100000 == 0)
-                        println(cfg, "Populated accounts: " + k);
-                }
+                if (k % 100000 == 0)
+                    println(cfg, "Populated accounts: " + k);
             }
         }
 


[2/7] ignite git commit: IGNITE-2019 Fixed schema import on Mac OSX El Capitan. - Fixes #292.

Posted by sb...@apache.org.
IGNITE-2019 Fixed schema import on Mac OSX El Capitan. - Fixes #292.

Signed-off-by: Andrey <an...@gridgain.com>


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

Branch: refs/heads/ignite-1537
Commit: 11d668b2f77b12e7dc9bbc8ebdbfeb5e2ddad716
Parents: e6f6f40
Author: Andrey <an...@gridgain.com>
Authored: Fri Dec 4 15:52:14 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Fri Dec 4 15:52:14 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/schema/ui/SchemaImportApp.java  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/11d668b2/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
index 495c316..6f9e05b 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.lang.reflect.Field;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.sql.Connection;
@@ -1738,6 +1739,19 @@ public class SchemaImportApp extends Application {
             catch (Exception ignore) {
                 // No-op.
             }
+
+            // Workaround for JDK 7/JavaFX 2 application on Mac OSX El Capitan.
+            try {
+                Class<?> fontFinderCls = Class.forName("com.sun.t2k.MacFontFinder");
+
+                Field psNameToPathMap = fontFinderCls.getDeclaredField("psNameToPathMap");
+
+                psNameToPathMap.setAccessible(true);
+                psNameToPathMap.set(null, new HashMap<String, String>());
+            }
+            catch (Exception ignore) {
+                // No-op.
+            }
         }
 
         launch(args);


[5/7] ignite git commit: Javadoc hotfix

Posted by sb...@apache.org.
Javadoc hotfix


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

Branch: refs/heads/ignite-1537
Commit: 6a109ebd4c637b3ec6e298ae8cf785c422abebc1
Parents: d5fa3c1
Author: Anton Vinogradov <av...@apache.org>
Authored: Fri Dec 4 13:42:25 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Fri Dec 4 13:42:25 2015 +0300

----------------------------------------------------------------------
 parent/pom.xml | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6a109ebd/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 4fd7156..68ba62b 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -428,6 +428,10 @@
                                 <title>Spark Integration</title>
                                 <packages>org.apache.ignite.spark.examples.java</packages>
                             </group>
+                            <group>
+                                <title>OSGi integration</title>
+                                <packages>org.apache.ignite.osgi*</packages>
+                            </group>
                         </groups>
                         <header>
                             <![CDATA[