You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/04/07 05:31:59 UTC

[1/7] incubator-ignite git commit: # ignite-564 WIP

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-639 43fa7148b -> f1eaf2929


# ignite-564 WIP


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

Branch: refs/heads/ignite-639
Commit: e69ef35b6c89c22dd34fcf1623cee4856060ae44
Parents: 6c3f101
Author: anovikov <an...@gridgain.com>
Authored: Fri Apr 3 14:23:56 2015 +0700
Committer: anovikov <an...@gridgain.com>
Committed: Fri Apr 3 15:31:04 2015 +0700

----------------------------------------------------------------------
 .../store/jdbc/CacheAbstractJdbcStore.java      | 41 ++++++++++++++++----
 1 file changed, 34 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e69ef35b/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 75e2080..f7bf272 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
@@ -233,8 +233,12 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         if (dataSrc == null)
             throw new IgniteException("Failed to initialize cache store (data source is not provided).");
 
-        if (dialect == null)
+        if (dialect == null) {
             dialect = resolveDialect();
+
+            if (log.isDebugEnabled())
+                log.debug("Resolved database dialect: " + U.getSimpleName(dialect.getClass()));
+        }
     }
 
     /** {@inheritDoc} */
@@ -616,6 +620,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         ExecutorService pool = null;
 
         try {
+            String cacheName = session().cacheName();
+
             pool = Executors.newFixedThreadPool(maxPoolSz);
 
             Collection<Future<?>> futs = new ArrayList<>();
@@ -627,8 +633,6 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 if (log.isDebugEnabled())
                     log.debug("Start loading entries from db using user queries from arguments");
 
-                String cacheName = session().cacheName();
-
                 for (int i = 0; i < args.length; i += 2) {
                     String keyType = args[i].toString();
 
@@ -642,13 +646,13 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
             else {
                 Collection<EntryMapping> entryMappings = cacheMappings(session().cacheName()).values();
 
-                if (log.isDebugEnabled())
-                    log.debug("Start loading all cache types entries from db");
-
                 for (EntryMapping em : entryMappings) {
                     if (parallelLoadCacheMinThreshold > 0) {
                         Connection conn = null;
 
+                        log.debug("Start parallel loading entries of one type from db [cache name=" + cacheName +
+                            ", key type=" + em.keyType() + " ]");
+
                         try {
                             conn = connection();
 
@@ -691,13 +695,21 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                             U.closeQuiet(conn);
                         }
                     }
-                    else
+                    else {
+                        if (log.isDebugEnabled())
+                            log.debug("Start loading entries of one type from db [cache name=" + cacheName +
+                                ", key type=" + em.keyType() + " ]");
+
                         futs.add(pool.submit(loadCacheFull(em, clo)));
+                    }
                 }
             }
 
             for (Future<?> fut : futs)
                 U.get(fut);
+
+            if (log.isDebugEnabled())
+                log.debug("Finished load cache: " + cacheName + " from db");
         }
         catch (IgniteCheckedException e) {
             throw new CacheLoaderException("Failed to load cache", e.getCause());
@@ -940,6 +952,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
             String cacheName = session().cacheName();
 
+            if (log.isDebugEnabled())
+                log.debug("Start write entries to database [cache name=" + cacheName +
+                    ", count=" + entries.size() + "]");
+
             if (dialect.hasMerge()) {
                 PreparedStatement mergeStmt = null;
 
@@ -1145,6 +1161,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
             String cacheName = session().cacheName();
 
+            if (log.isDebugEnabled())
+                log.debug("Start remove values from database [cache name=" + cacheName + ", count=" + keys.size() + "]");
+
             for (Object key : keys) {
                 Object keyTypeId = keyTypeId(key);
 
@@ -1600,6 +1619,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
         /** {@inheritDoc} */
         @Override public Void call() throws Exception {
+            if (log.isDebugEnabled())
+                log.debug("Start load cache using custom query [cache name= " + em.cacheName +
+                    ", key type=" + em.keyType() + ", query=" + qry + "]");
+
             Connection conn = null;
 
             PreparedStatement stmt = null;
@@ -1692,6 +1715,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
         /** {@inheritDoc} */
         @Override public Map<K1, V1> call() throws Exception {
+            if (log.isDebugEnabled())
+                log.debug("Start load values from database [table= " + em.fullTableName() +
+                    ", key count=" + keys.size() + "]");
+
             PreparedStatement stmt = null;
 
             try {


[6/7] incubator-ignite git commit: # ignite-564 Add debug output.

Posted by ak...@apache.org.
# ignite-564 Add debug output.


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

Branch: refs/heads/ignite-639
Commit: 3629cee2e79eba9581e8a3f79d6f05aba0538711
Parents: 975b47c
Author: Andrey Novikov <an...@gridgain.com>
Authored: Tue Apr 7 10:27:20 2015 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Tue Apr 7 10:27:20 2015 +0700

----------------------------------------------------------------------
 .../store/jdbc/CacheAbstractJdbcStore.java      | 34 ++++++++++----------
 1 file changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3629cee2/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 df5345b..22d6d7a 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
@@ -619,9 +619,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         throws CacheLoaderException {
         ExecutorService pool = null;
 
-        try {
-            String cacheName = session().cacheName();
+        String cacheName = session().cacheName();
 
+        try {
             pool = Executors.newFixedThreadPool(maxPoolSz);
 
             Collection<Future<?>> futs = new ArrayList<>();
@@ -648,7 +648,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                 for (EntryMapping em : entryMappings) {
                     if (parallelLoadCacheMinThreshold > 0) {
-                        log.debug("Start parallel loading entries of one type from db [cache name=" + cacheName +
+                        log.debug("Multithread loading entries from db [cache name=" + cacheName +
                             ", key type=" + em.keyType() + " ]");
 
                         Connection conn = null;
@@ -697,7 +697,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                     }
                     else {
                         if (log.isDebugEnabled())
-                            log.debug("Start loading entries of one type from db [cache name=" + cacheName +
+                            log.debug("Single thread loading entries from db [cache name=" + cacheName +
                                 ", key type=" + em.keyType() + " ]");
 
                         futs.add(pool.submit(loadCacheFull(em, clo)));
@@ -709,10 +709,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 U.get(fut);
 
             if (log.isDebugEnabled())
-                log.debug("Finished load cache: " + cacheName + " from db");
+                log.debug("Cache loaded from db: " + cacheName);
         }
         catch (IgniteCheckedException e) {
-            throw new CacheLoaderException("Failed to load cache", e.getCause());
+            throw new CacheLoaderException("Failed to load cache: " + cacheName, e.getCause());
         }
         finally {
             U.shutdownNow(getClass(), pool, log);
@@ -726,7 +726,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         EntryMapping em = entryMapping(session().cacheName(), keyTypeId(key), key);
 
         if (log.isDebugEnabled())
-            log.debug("Start load value from database [table= " + em.fullTableName() + ", key=" + key + "]");
+            log.debug("Load value from db [table= " + em.fullTableName() + ", key=" + key + "]");
 
         Connection conn = null;
 
@@ -976,7 +976,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                         if (currKeyTypeId == null || !currKeyTypeId.equals(keyTypeId)) {
                             if (mergeStmt != null) {
                                 if (log.isDebugEnabled())
-                                    log.debug("Start write entries to database [cache name=" + cacheName +
+                                    log.debug("Write entries to db [cache name=" + cacheName +
                                         ", key type=" + em.keyType() + ", count=" + prepared + "]");
 
                                 executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
@@ -1001,7 +1001,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                         if (++prepared % batchSz == 0) {
                             if (log.isDebugEnabled())
-                                log.debug("Start write entries to database [cache name=" + cacheName +
+                                log.debug("Write entries to db [cache name=" + cacheName +
                                     ", key type=" + em.keyType() + ", count=" + prepared + "]");
 
                             executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
@@ -1014,7 +1014,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                     if (mergeStmt != null && prepared % batchSz != 0) {
                         if (log.isDebugEnabled())
-                            log.debug("Start write entries to database [cache name=" + cacheName +
+                            log.debug("Write entries to db [cache name=" + cacheName +
                                 ", key type=" + em.keyType() + ", count=" + prepared + "]");
 
                         executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
@@ -1026,7 +1026,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 }
             }
             else {
-                log.debug("Start write entries to database by one using update and insert statement [cache name=" +
+                log.debug("Write entries to db one by one using update and insert statements [cache name=" +
                     cacheName + ", count=" + entries.size() + "]");
 
                 PreparedStatement insStmt = null;
@@ -1078,7 +1078,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         EntryMapping em = entryMapping(session().cacheName(), keyTypeId(key), key);
 
         if (log.isDebugEnabled())
-            log.debug("Start remove value from database [table=" + em.fullTableName() + ", key=" + key + "]");
+            log.debug("Remove value from db [table=" + em.fullTableName() + ", key=" + key + "]");
 
         Connection conn = null;
 
@@ -1191,7 +1191,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                 if (!currKeyTypeId.equals(keyTypeId)) {
                     if (log.isDebugEnabled())
-                        log.debug("Start delete entries to database [cache name=" + cacheName +
+                        log.debug("Delete entries from db [cache name=" + cacheName +
                             ", key type=" + em.keyType() + ", count=" + prepared + "]");
 
                     executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
@@ -1209,7 +1209,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                 if (++prepared % batchSz == 0) {
                     if (log.isDebugEnabled())
-                        log.debug("Start delete entries to database [cache name=" + cacheName +
+                        log.debug("Delete entries from db [cache name=" + cacheName +
                             ", key type=" + em.keyType() + ", count=" + prepared + "]");
 
                     executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
@@ -1222,7 +1222,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
             if (delStmt != null && prepared % batchSz != 0) {
                 if (log.isDebugEnabled())
-                    log.debug("Start delete entries to database [cache name=" + cacheName +
+                    log.debug("Delete entries from db [cache name=" + cacheName +
                         ", key type=" + em.keyType() + ", count=" + prepared + "]");
 
                 executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
@@ -1647,7 +1647,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         /** {@inheritDoc} */
         @Override public Void call() throws Exception {
             if (log.isDebugEnabled())
-                log.debug("Start load cache using custom query [cache name= " + em.cacheName +
+                log.debug("Load cache using custom query [cache name= " + em.cacheName +
                     ", key type=" + em.keyType() + ", query=" + qry + "]");
 
             Connection conn = null;
@@ -1743,7 +1743,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         /** {@inheritDoc} */
         @Override public Map<K1, V1> call() throws Exception {
             if (log.isDebugEnabled())
-                log.debug("Start load values from database [table= " + em.fullTableName() +
+                log.debug("Load values from db [table= " + em.fullTableName() +
                     ", key count=" + keys.size() + "]");
 
             PreparedStatement stmt = null;


[5/7] incubator-ignite git commit: Merge branches 'ignite-564' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-564

Posted by ak...@apache.org.
Merge branches 'ignite-564' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-564


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

Branch: refs/heads/ignite-639
Commit: 975b47c4e9b6543649f00e0d1a30b860ffa793f1
Parents: f14e0f2 5a2b46c
Author: Andrey Novikov <an...@gridgain.com>
Authored: Tue Apr 7 10:15:57 2015 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Tue Apr 7 10:15:57 2015 +0700

----------------------------------------------------------------------
 .../cache/eviction/fifo/FifoEvictionPolicy.java |  58 ++-
 .../eviction/fifo/FifoEvictionPolicyMBean.java  |  16 +
 .../org/apache/ignite/stream/StreamVisitor.java |   2 +-
 .../eviction/GridCacheEvictionAbstractTest.java |   5 +-
 ...ridCacheFifoBatchEvictionPolicySelfTest.java | 385 +++++++++++++++++++
 pom.xml                                         |  59 ++-
 6 files changed, 508 insertions(+), 17 deletions(-)
----------------------------------------------------------------------



[2/7] incubator-ignite git commit: Merge branches 'ignite-564' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-564

Posted by ak...@apache.org.
Merge branches 'ignite-564' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-564


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

Branch: refs/heads/ignite-639
Commit: 5e2704d609e17ba317e96719724f30ae5009f8f1
Parents: e69ef35 5b806d8
Author: Andrey Novikov <an...@gridgain.com>
Authored: Mon Apr 6 08:51:54 2015 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Mon Apr 6 08:51:54 2015 +0700

----------------------------------------------------------------------
 .gitignore                                      |   2 +-
 examples/schema-import/bin/db-init.sql          |  17 ++
 .../streaming/numbers/StreamRandomNumbers.java  |   2 +-
 .../streaming/numbers/StreamRandomNumbers.java  |   2 +-
 modules/core/pom.xml                            |  38 +--
 .../configuration/CacheConfiguration.java       |   2 +-
 .../ignite/events/CacheQueryExecutedEvent.java  |  11 +-
 .../ignite/events/CacheQueryReadEvent.java      |  11 +-
 .../ignite/internal/GridCachePluginContext.java |   6 +
 .../internal/cluster/ClusterGroupAdapter.java   |   3 +-
 .../cache/CacheEvictableEntryImpl.java          |  11 +-
 .../processors/cache/CacheProjection.java       |  36 ---
 .../processors/cache/GridCacheAdapter.java      | 257 +------------------
 .../cache/GridCacheDeploymentManager.java       |   7 +-
 .../processors/cache/GridCacheEntryEx.java      |  55 +---
 .../processors/cache/GridCacheMapEntry.java     | 236 +----------------
 .../processors/cache/GridCachePeekMode.java     |  81 ------
 .../processors/cache/GridCacheProcessor.java    |  64 +++--
 .../cache/GridCacheProjectionImpl.java          |  11 -
 .../processors/cache/GridCacheProxyImpl.java    |  24 --
 .../processors/cache/GridCacheUtils.java        |  11 -
 .../distributed/dht/GridDhtCacheAdapter.java    |   9 +-
 .../dht/atomic/GridDhtAtomicCache.java          |  29 +--
 .../dht/colocated/GridDhtColocatedCache.java    |  30 +--
 .../distributed/near/GridNearCacheAdapter.java  |  72 +-----
 .../distributed/near/GridNearTxRemote.java      |  11 +-
 .../cache/local/GridLocalCacheEntry.java        |   1 -
 .../cache/query/GridCacheQueryManager.java      |  18 +-
 .../continuous/CacheContinuousQueryHandler.java |   4 +-
 .../processors/plugin/CachePluginManager.java   |  51 +++-
 .../processors/query/GridQueryProcessor.java    |   4 +-
 .../processors/task/GridTaskProcessor.java      |   9 +-
 .../cache/VisorCacheDefaultConfiguration.java   |  10 -
 .../ignite/plugin/CachePluginContext.java       |  11 +
 .../ignite/plugin/CachePluginProvider.java      |   4 +-
 .../org/apache/ignite/plugin/PluginContext.java |   9 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   7 +
 .../communication/tcp/TcpCommunicationSpi.java  |   6 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   7 -
 .../resources/META-INF/classnames.properties    |   1 -
 .../GridCachePreloadingEvictionsSelfTest.java   |   4 +-
 .../processors/cache/GridCacheTestEntryEx.java  |  40 +--
 ...GridCacheDhtEvictionNearReadersSelfTest.java |  14 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |  24 +-
 .../dht/GridCacheDhtMappingSelfTest.java        |   2 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   5 +
 .../near/GridCacheNearMultiNodeSelfTest.java    | 103 +++-----
 .../near/GridCacheNearOneNodeSelfTest.java      |  33 +--
 .../near/GridCacheNearReadersSelfTest.java      | 154 +++++------
 .../GridCacheReplicatedPreloadSelfTest.java     |  11 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |   4 +-
 .../processors/igfs/IgfsProcessorSelfTest.java  |   3 +-
 .../processors/igfs/IgfsSizeSelfTest.java       |  46 +---
 .../ignite/messaging/GridMessagingSelfTest.java |  50 ++++
 .../junits/common/GridCommonAbstractTest.java   |  42 +++
 .../fs/IgniteHadoopIgfsSecondaryFileSystem.java |   3 +
 .../query/h2/twostep/GridMapQueryExecutor.java  |   4 +-
 .../cache/GridIndexingWithNoopSwapSelfTest.java |   2 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |   8 +-
 .../commands/cache/VisorCacheCommand.scala      |   3 +-
 parent/pom.xml                                  |   1 -
 scripts/git-apply-patch.sh                      |  94 +++++++
 scripts/git-format-patch.sh                     |  87 +++++++
 scripts/git-patch-functions.sh                  | 171 ++++++++++++
 scripts/git-patch-prop.sh                       |  24 ++
 65 files changed, 917 insertions(+), 1195 deletions(-)
----------------------------------------------------------------------



[3/7] incubator-ignite git commit: # ignite-564 Add debug output.

Posted by ak...@apache.org.
# ignite-564 Add debug output.


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

Branch: refs/heads/ignite-639
Commit: 7fa7f425ff23ac2246f94e6816480123163b0507
Parents: 5e2704d
Author: Andrey Novikov <an...@gridgain.com>
Authored: Mon Apr 6 10:17:53 2015 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Mon Apr 6 10:17:53 2015 +0700

----------------------------------------------------------------------
 .../store/jdbc/CacheAbstractJdbcStore.java      | 73 ++++++++++++++------
 .../yardstick/config/benchmark-store.properties |  5 +-
 2 files changed, 51 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7fa7f425/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 f7bf272..df5345b 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
@@ -236,7 +236,7 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         if (dialect == null) {
             dialect = resolveDialect();
 
-            if (log.isDebugEnabled())
+            if (log.isDebugEnabled() && dialect.getClass() != BasicJdbcDialect.class)
                 log.debug("Resolved database dialect: " + U.getSimpleName(dialect.getClass()));
         }
     }
@@ -336,10 +336,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
             finally {
                 U.closeQuiet(conn);
             }
-        }
 
-        if (tx != null && log.isDebugEnabled())
-            log.debug("Transaction ended [xid=" + tx.xid() + ", commit=" + commit + ']');
+            if (log.isDebugEnabled())
+                log.debug("Transaction ended [xid=" + tx.xid() + ", commit=" + commit + ']');
+        }
     }
 
     /**
@@ -648,11 +648,11 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                 for (EntryMapping em : entryMappings) {
                     if (parallelLoadCacheMinThreshold > 0) {
-                        Connection conn = null;
-
                         log.debug("Start parallel loading entries of one type from db [cache name=" + cacheName +
                             ", key type=" + em.keyType() + " ]");
 
+                        Connection conn = null;
+
                         try {
                             conn = connection();
 
@@ -948,13 +948,9 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         try {
             conn = connection();
 
-            Object currKeyTypeId = null;
-
             String cacheName = session().cacheName();
 
-            if (log.isDebugEnabled())
-                log.debug("Start write entries to database [cache name=" + cacheName +
-                    ", count=" + entries.size() + "]");
+            Object currKeyTypeId = null;
 
             if (dialect.hasMerge()) {
                 PreparedStatement mergeStmt = null;
@@ -979,6 +975,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                         if (currKeyTypeId == null || !currKeyTypeId.equals(keyTypeId)) {
                             if (mergeStmt != null) {
+                                if (log.isDebugEnabled())
+                                    log.debug("Start write entries to database [cache name=" + cacheName +
+                                        ", key type=" + em.keyType() + ", count=" + prepared + "]");
+
                                 executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
 
                                 U.closeQuiet(mergeStmt);
@@ -988,6 +988,8 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
 
                             currKeyTypeId = keyTypeId;
 
+                            fromIdx += prepared;
+
                             prepared = 0;
                         }
 
@@ -998,20 +1000,35 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                         mergeStmt.addBatch();
 
                         if (++prepared % batchSz == 0) {
+                            if (log.isDebugEnabled())
+                                log.debug("Start write entries to database [cache name=" + cacheName +
+                                    ", key type=" + em.keyType() + ", count=" + prepared + "]");
+
                             executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
 
+                            fromIdx += prepared;
+
                             prepared = 0;
                         }
                     }
 
-                    if (mergeStmt != null && prepared % batchSz != 0)
+                    if (mergeStmt != null && prepared % batchSz != 0) {
+                        if (log.isDebugEnabled())
+                            log.debug("Start write entries to database [cache name=" + cacheName +
+                                ", key type=" + em.keyType() + ", count=" + prepared + "]");
+
                         executeBatch(em, mergeStmt, "writeAll", fromIdx, prepared, lazyEntries);
+
+                    }
                 }
                 finally {
                     U.closeQuiet(mergeStmt);
                 }
             }
             else {
+                log.debug("Start write entries to database by one using update and insert statement [cache name=" +
+                    cacheName + ", count=" + entries.size() + "]");
+
                 PreparedStatement insStmt = null;
 
                 PreparedStatement updStmt = null;
@@ -1145,24 +1162,21 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
         try {
             conn = connection();
 
-            Object currKeyTypeId = null;
-
-            EntryMapping em = null;
-
-            PreparedStatement delStmt = null;
-
             LazyValue<Object[]> lazyKeys = new LazyValue<Object[]>() {
                 @Override public Object[] create() {
                     return keys.toArray();
                 }
             };
 
-            int fromIdx = 0, prepared = 0;
-
             String cacheName = session().cacheName();
 
-            if (log.isDebugEnabled())
-                log.debug("Start remove values from database [cache name=" + cacheName + ", count=" + keys.size() + "]");
+            Object currKeyTypeId = null;
+
+            EntryMapping em = null;
+
+            PreparedStatement delStmt = null;
+
+            int fromIdx = 0, prepared = 0;
 
             for (Object key : keys) {
                 Object keyTypeId = keyTypeId(key);
@@ -1176,6 +1190,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 }
 
                 if (!currKeyTypeId.equals(keyTypeId)) {
+                    if (log.isDebugEnabled())
+                        log.debug("Start delete entries to database [cache name=" + cacheName +
+                            ", key type=" + em.keyType() + ", count=" + prepared + "]");
+
                     executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
 
                     fromIdx += prepared;
@@ -1190,6 +1208,10 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 delStmt.addBatch();
 
                 if (++prepared % batchSz == 0) {
+                    if (log.isDebugEnabled())
+                        log.debug("Start delete entries to database [cache name=" + cacheName +
+                            ", key type=" + em.keyType() + ", count=" + prepared + "]");
+
                     executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
 
                     fromIdx += prepared;
@@ -1198,8 +1220,13 @@ public abstract class CacheAbstractJdbcStore<K, V> implements CacheStore<K, V>,
                 }
             }
 
-            if (delStmt != null && prepared % batchSz != 0)
+            if (delStmt != null && prepared % batchSz != 0) {
+                if (log.isDebugEnabled())
+                    log.debug("Start delete entries to database [cache name=" + cacheName +
+                        ", key type=" + em.keyType() + ", count=" + prepared + "]");
+
                 executeBatch(em, delStmt, "deleteAll", fromIdx, prepared, lazyKeys);
+            }
         }
         catch (SQLException e) {
             throw new CacheWriterException("Failed to remove values from database", e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7fa7f425/modules/yardstick/config/benchmark-store.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-store.properties b/modules/yardstick/config/benchmark-store.properties
index 8a7c265..cb9e507 100644
--- a/modules/yardstick/config/benchmark-store.properties
+++ b/modules/yardstick/config/benchmark-store.properties
@@ -77,17 +77,14 @@ CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-get,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -ds tx-get,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -ds tx-store-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStoreGetTxBenchmark -sn IgniteNode -cs -wb -ds tx-writeBehind-get,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -ds atomic-put,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -ds atomic-store-put,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -ds tx-put,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -ds tx-store-put,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutTxBenchmark -sn IgniteNode -cs -wb -ds tx-writeBehind-put,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -ds atomic-put-get,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -ds atomic-store-put-get,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetBenchmark -sn IgniteNode -cs -wb -ds atomic-writeBehind-put-get,\
 -cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -ds tx-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -ds tx-store-put-get,\
--cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -wb -ds tx-writeBehind-put-get\
+-cfg ${SCRIPT_DIR}/../config/ignite-store-config.xml -nn ${nodesNum} -b 1 -w ${warm_up} -d ${run} -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcStorePutGetTxBenchmark -sn IgniteNode -cs -ds tx-store-put-get\
 "


[4/7] incubator-ignite git commit: Merge branches 'ignite-564' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-564

Posted by ak...@apache.org.
Merge branches 'ignite-564' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-564


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

Branch: refs/heads/ignite-639
Commit: f14e0f26e208f07af0941dd48c6adda5babf2bc1
Parents: 7fa7f42 f2b40c1
Author: AKuznetsov <ak...@gridgain.com>
Authored: Mon Apr 6 23:33:37 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Mon Apr 6 23:33:37 2015 +0700

----------------------------------------------------------------------
 assembly/release-fabric.xml                     |   5 -
 modules/clients/readme.md                       |   2 -
 .../apache/ignite/internal/GridComponent.java   |   2 +-
 .../ignite/internal/GridKernalContextImpl.java  |   3 +-
 .../ignite/internal/GridPluginComponent.java    |   4 +-
 .../org/apache/ignite/internal/IgniteEx.java    |   7 -
 .../apache/ignite/internal/IgniteKernal.java    |  27 +---
 .../ignite/internal/IgniteNodeAttributes.java   |   3 -
 .../internal/managers/GridManagerAdapter.java   |   6 +-
 .../processors/GridProcessorAdapter.java        |   2 +-
 .../processors/cache/CacheDistributionMode.java |  67 --------
 .../internal/processors/cache/CacheType.java    |  77 +++++++++
 .../cache/DynamicCacheChangeRequest.java        |  17 ++
 .../cache/DynamicCacheDescriptor.java           |  15 +-
 .../processors/cache/GridCacheAdapter.java      |   6 +-
 .../processors/cache/GridCacheContext.java      |  26 ++-
 .../cache/GridCacheDeploymentManager.java       |   2 +-
 .../processors/cache/GridCacheEventManager.java |   4 +-
 .../processors/cache/GridCacheProcessor.java    | 139 ++++++++++------
 .../cache/GridCacheSharedContext.java           |   4 +-
 .../dht/GridDhtTransactionalCacheAdapter.java   |   4 +-
 .../near/GridNearTransactionalCache.java        |   2 +-
 .../continuous/CacheContinuousQueryManager.java |   2 +-
 .../transactions/IgniteTransactionsImpl.java    |  19 ++-
 .../transactions/IgniteTxLocalAdapter.java      |   2 +-
 .../cache/transactions/IgniteTxManager.java     |   8 +-
 .../DiscoveryNodeValidationProcessor.java       |  27 ++++
 .../OsDiscoveryNodeValidationProcessor.java     |  72 +++++++++
 .../processors/query/GridQueryProcessor.java    |   8 +-
 .../processors/task/GridTaskProcessor.java      |  24 ++-
 .../ignite/internal/util/IgniteUtils.java       |  46 +++++-
 .../internal/visor/util/VisorTaskUtils.java     |  18 ++-
 .../ignite/spi/IgniteNodeValidationResult.java  |  66 ++++++++
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   2 +-
 .../org/apache/ignite/spi/IgniteSpiContext.java |   2 +-
 .../spi/IgniteSpiNodeValidationResult.java      |  66 --------
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 106 +------------
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  47 +++---
 .../cache/IgniteInternalCacheTypesTest.java     | 159 +++++++++++++++++++
 .../IgniteCollectionAbstractTest.java           |  23 ---
 .../IgniteCacheSystemTransactionsSelfTest.java  |   3 +-
 ...GridCacheDhtEvictionNearReadersSelfTest.java |   2 +-
 .../near/GridCacheNearEvictionSelfTest.java     |   2 +-
 ...ePartitionedBasicStoreMultiNodeSelfTest.java |   8 +-
 ...NearDisabledBasicStoreMultiNodeSelfTest.java |   8 +-
 .../processors/igfs/IgfsStartCacheTest.java     | 158 ++++++++++++++++++
 .../processors/igfs/IgsfStartCacheTest.java     | 115 --------------
 .../loadtests/hashmap/GridCacheTestContext.java |   1 +
 .../testframework/GridSpiTestContext.java       |   2 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |   2 +
 .../ignite/testsuites/IgniteIgfsTestSuite.java  |   2 +
 .../HadoopDefaultMapReducePlannerSelfTest.java  |   5 -
 .../query/h2/sql/GridSqlQuerySplitter.java      |  22 ++-
 .../h2/twostep/GridReduceQueryExecutor.java     |  13 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |   6 +-
 ...niteCacheAtomicNearEnabledQuerySelfTest.java |   7 +-
 .../near/IgniteCacheAtomicQuerySelfTest.java    |   7 +-
 .../query/h2/sql/GridQueryParsingTest.java      |   1 +
 .../query/h2/sql/IgniteVsH2QueryTest.java       |   7 +
 modules/schedule/pom.xml                        |  20 +++
 modules/yardstick/README.md                     |   3 +-
 .../yardstick/IgniteAbstractBenchmark.java      |   5 +-
 .../yardstick/IgniteBenchmarkArguments.java     |  22 ++-
 .../org/apache/ignite/yardstick/IgniteNode.java |  11 +-
 parent/pom.xml                                  |  49 +++---
 pom.xml                                         |  94 ++++++++++-
 66 files changed, 1075 insertions(+), 621 deletions(-)
----------------------------------------------------------------------



[7/7] incubator-ignite git commit: Merge branches 'ignite-639' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-639

Posted by ak...@apache.org.
Merge branches 'ignite-639' and 'ignite-sprint-3' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-639


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

Branch: refs/heads/ignite-639
Commit: f1eaf292921650e4ce44f61640fe7992ee14babb
Parents: 43fa714 3629cee
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Apr 7 10:31:50 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Apr 7 10:31:50 2015 +0700

----------------------------------------------------------------------
 .../store/jdbc/CacheAbstractJdbcStore.java      | 104 ++++++++++++++-----
 .../yardstick/config/benchmark-store.properties |   5 +-
 2 files changed, 80 insertions(+), 29 deletions(-)
----------------------------------------------------------------------