Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCA0B175AA for ; Tue, 7 Apr 2015 08:46:07 +0000 (UTC) Received: (qmail 75572 invoked by uid 500); 7 Apr 2015 08:45:45 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 75536 invoked by uid 500); 7 Apr 2015 08:45:45 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 75524 invoked by uid 99); 7 Apr 2015 08:45:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2015 08:45:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 07 Apr 2015 08:45:17 +0000 Received: (qmail 73806 invoked by uid 99); 7 Apr 2015 08:45:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2015 08:45:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D955DE2F3F; Tue, 7 Apr 2015 08:45:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 07 Apr 2015 08:45:48 -0000 Message-Id: <887bfedf94d547029ea0dd8a29befeae@git.apache.org> In-Reply-To: <710d381b61e74b20bc87e0ad8748cb68@git.apache.org> References: <710d381b61e74b20bc87e0ad8748cb68@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [36/50] [abbrv] incubator-ignite git commit: # ignite-564 Add debug output. X-Virus-Checked: Checked by ClamAV on 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-665 Commit: 3629cee2e79eba9581e8a3f79d6f05aba0538711 Parents: 975b47c Author: Andrey Novikov Authored: Tue Apr 7 10:27:20 2015 +0700 Committer: Andrey Novikov 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 implements CacheStore, throws CacheLoaderException { ExecutorService pool = null; - try { - String cacheName = session().cacheName(); + String cacheName = session().cacheName(); + try { pool = Executors.newFixedThreadPool(maxPoolSz); Collection> futs = new ArrayList<>(); @@ -648,7 +648,7 @@ public abstract class CacheAbstractJdbcStore implements CacheStore, 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 implements CacheStore, } 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 implements CacheStore, 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 implements CacheStore, 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 implements CacheStore, 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 implements CacheStore, 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 implements CacheStore, 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 implements CacheStore, } } 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 implements CacheStore, 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 implements CacheStore, 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 implements CacheStore, 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 implements CacheStore, 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 implements CacheStore, /** {@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 implements CacheStore, /** {@inheritDoc} */ @Override public Map 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;