ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [48/50] [abbrv] ignite git commit: GG-11805 Logging details about start/finish snapshot operation and provided information from client
Date Thu, 29 Dec 2016 09:37:52 GMT
GG-11805 Logging details about start/finish snapshot operation and provided information from
client


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

Branch: refs/heads/ignite-3477
Commit: a38fd00de0a2d2d54b3702f94797639f8aa26dbd
Parents: 893cd90
Author: EdShangGG <eshangareev@gridgain.com>
Authored: Wed Dec 28 22:34:37 2016 +0300
Committer: EdShangGG <eshangareev@gridgain.com>
Committed: Wed Dec 28 22:34:37 2016 +0300

----------------------------------------------------------------------
 .../StartFullSnapshotAckDiscoveryMessage.java   | 21 +++++++++++++++++++-
 .../StartFullSnapshotDiscoveryMessage.java      | 20 +++++++++++++++++--
 .../IgniteCacheDatabaseSharedManager.java       |  3 ++-
 .../GridDhtPartitionsExchangeFuture.java        |  2 +-
 4 files changed, 41 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a38fd00d/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotAckDiscoveryMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotAckDiscoveryMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotAckDiscoveryMessage.java
index 6393937..0d926b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotAckDiscoveryMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotAckDiscoveryMessage.java
@@ -32,6 +32,9 @@ public class StartFullSnapshotAckDiscoveryMessage implements DiscoveryCustomMess
     /** */
     private static final long serialVersionUID = 0L;
 
+    /** Message. */
+    private final String msg;
+
     /** Custom message ID. */
     private IgniteUuid id = IgniteUuid.randomUuid();
 
@@ -47,8 +50,10 @@ public class StartFullSnapshotAckDiscoveryMessage implements DiscoveryCustomMess
     /** */
     private UUID initiatorNodeId;
 
+    /** Full snapshot. */
     private boolean fullSnapshot;
 
+    /** Last full snapshot id for cache. */
     private Map<Integer, Long> lastFullSnapshotIdForCache;
 
     /**
@@ -59,13 +64,14 @@ public class StartFullSnapshotAckDiscoveryMessage implements DiscoveryCustomMess
     public StartFullSnapshotAckDiscoveryMessage(long globalSnapshotId, boolean fullSnapshot,
         Map<Integer, Long> lastFullSnapshotIdForCache,
         Collection<String> cacheNames, Exception err,
-        UUID initiatorNodeId) {
+        UUID initiatorNodeId, String msg) {
         this.globalSnapshotId = globalSnapshotId;
         this.fullSnapshot = fullSnapshot;
         this.lastFullSnapshotIdForCache = lastFullSnapshotIdForCache;
         this.err = err;
         this.cacheNames = cacheNames;
         this.initiatorNodeId = initiatorNodeId;
+        this.msg = msg;
     }
 
     /**
@@ -108,10 +114,23 @@ public class StartFullSnapshotAckDiscoveryMessage implements DiscoveryCustomMess
         return globalSnapshotId;
     }
 
+    /**
+     *
+     */
     public boolean fullSnapshot() {
         return fullSnapshot;
     }
 
+    /**
+     *
+     */
+    public String message() {
+        return msg;
+    }
+
+    /**
+     * @param cacheId Cache id.
+     */
     @Nullable public Long lastFullSnapshotId(int cacheId) {
         return lastFullSnapshotIdForCache.get(cacheId);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a38fd00d/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotDiscoveryMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotDiscoveryMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotDiscoveryMessage.java
index b58c247..8d18131 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotDiscoveryMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotDiscoveryMessage.java
@@ -33,6 +33,9 @@ public class StartFullSnapshotDiscoveryMessage implements DiscoveryCustomMessage
     /** */
     private static final long serialVersionUID = 0L;
 
+    /** Message. */
+    private final String msg;
+
     /** Custom message ID. */
     private IgniteUuid id = IgniteUuid.randomUuid();
 
@@ -56,12 +59,15 @@ public class StartFullSnapshotDiscoveryMessage implements DiscoveryCustomMessage
 
     /**
      * @param cacheNames Cache names.
+     * @param msg message to log
      */
-    public StartFullSnapshotDiscoveryMessage(long globalSnapshotId, Collection<String>
cacheNames, UUID initiatorId, boolean fullSnapshot) {
+    public StartFullSnapshotDiscoveryMessage(long globalSnapshotId, Collection<String>
cacheNames, UUID initiatorId,
+        boolean fullSnapshot, String msg) {
         this.globalSnapshotId = globalSnapshotId;
         this.cacheNames = cacheNames;
         this.initiatorId = initiatorId;
         this.fullSnapshot = fullSnapshot;
+        this.msg = msg;
     }
 
     /**
@@ -113,21 +119,31 @@ public class StartFullSnapshotDiscoveryMessage implements DiscoveryCustomMessage
         return cacheNames;
     }
 
+    /**
+     *
+     */
     public boolean fullSnapshot() {
         return fullSnapshot;
     }
 
+    /**
+     * @param cacheId Cache id.
+     */
     public Long lastFullSnapshotId(int cacheId) {
         return lastFullSnapshotIdForCache.get(cacheId);
     }
 
+    /**
+     * @param cacheId Cache id.
+     * @param id Id.
+     */
     public void lastFullSnapshotId(int cacheId, long id) {
         lastFullSnapshotIdForCache.put(cacheId, id);
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public DiscoveryCustomMessage ackMessage() {
-        return new StartFullSnapshotAckDiscoveryMessage(globalSnapshotId, fullSnapshot, lastFullSnapshotIdForCache,
cacheNames, err, initiatorId);
+        return new StartFullSnapshotAckDiscoveryMessage(globalSnapshotId, fullSnapshot, lastFullSnapshotIdForCache,
cacheNames, err, initiatorId, msg);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/a38fd00d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
index 237ca1a..8f3b88a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
@@ -195,11 +195,12 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     /**
      * @param snapshotMsg Snapshot message.
      * @param initiator Initiator node.
+     * @param msg message to log
      * @return Snapshot creation init future or {@code null} if snapshot is not available.
      * @throws IgniteCheckedException If failed.
      */
     @Nullable public IgniteInternalFuture startLocalSnapshotCreation(StartFullSnapshotAckDiscoveryMessage
snapshotMsg,
-        ClusterNode initiator)
+        ClusterNode initiator, String msg)
         throws IgniteCheckedException {
         return null;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a38fd00d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 3d9a378..eb98fa6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -833,7 +833,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
                     assert node != null;
 
-                    IgniteInternalFuture fut = cctx.database().startLocalSnapshotCreation(backupMsg,
node);
+                    IgniteInternalFuture fut = cctx.database().startLocalSnapshotCreation(backupMsg,
node, backupMsg.message());
 
                     if (fut != null)
                         fut.get();


Mime
View raw message