ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [05/50] [abbrv] ignite git commit: GG-11860 Implement snapshot status on platform level -refactoring deleteSnapshot operation
Date Wed, 03 May 2017 07:21:43 GMT
GG-11860 Implement snapshot status on platform level
-refactoring deleteSnapshot operation


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

Branch: refs/heads/ignite-gg-8.0.3.ea6-clients-test
Commit: e14cab15f647acc20f45f97ec98c2c27a8c56b2e
Parents: 9282116
Author: EdShangGG <eshangareev@gridgain.com>
Authored: Thu Feb 16 21:04:36 2017 +0300
Committer: EdShangGG <eshangareev@gridgain.com>
Committed: Thu Feb 16 21:04:36 2017 +0300

----------------------------------------------------------------------
 .../snapshot/SnapshotFinishedMessage.java       |  32 ++++-
 .../pagemem/snapshot/SnapshotOperation.java     |  31 +++++
 .../StartFullSnapshotAckDiscoveryMessage.java   | 132 -------------------
 .../StartFullSnapshotDiscoveryMessage.java      |   4 +-
 ...artSnapshotOperationAckDiscoveryMessage.java | 129 ++++++++++++++++++
 .../GridCachePartitionExchangeManager.java      |  10 +-
 .../processors/cache/GridCacheProcessor.java    |   6 +-
 .../IgniteCacheDatabaseSharedManager.java       |  13 +-
 .../GridDhtPartitionsExchangeFuture.java        |  12 +-
 .../resources/META-INF/classnames.properties    |   2 +-
 10 files changed, 203 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotFinishedMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotFinishedMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotFinishedMessage.java
index a62d339..8ccef42 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotFinishedMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotFinishedMessage.java
@@ -33,20 +33,22 @@ public class SnapshotFinishedMessage implements Message {
     /** */
     private long snapshotId;
 
+    /** Operation type. */
+    private int operationType;
+
     /** */
     private boolean success;
 
-    /**
-     *
-     */
+    /** */
     public SnapshotFinishedMessage() {
     }
 
     /**
      * @param snapshotId Snapshot ID.
      */
-    public SnapshotFinishedMessage(long snapshotId, boolean success) {
+    public SnapshotFinishedMessage(long snapshotId, SnapshotOperationType type, boolean success)
{
         this.snapshotId = snapshotId;
+        this.operationType = type.ordinal();
         this.success = success;
     }
 
@@ -57,6 +59,12 @@ public class SnapshotFinishedMessage implements Message {
         return snapshotId;
     }
 
+    /** */
+    public SnapshotOperationType operationType() {
+        return SnapshotOperationType.values()[operationType];
+    }
+
+    /** */
     public boolean success() {
         return success;
     }
@@ -80,6 +88,12 @@ public class SnapshotFinishedMessage implements Message {
                 writer.incrementState();
 
             case 1:
+                if (!writer.writeInt("operationType", operationType))
+                    return false;
+
+                writer.incrementState();
+
+            case 2:
                 if (!writer.writeBoolean("success", success))
                     return false;
 
@@ -107,6 +121,14 @@ public class SnapshotFinishedMessage implements Message {
                 reader.incrementState();
 
             case 1:
+                operationType = reader.readInt("operationType");
+
+                if (!reader.isLastRead())
+                    return false;
+
+                reader.incrementState();
+
+            case 2:
                 success = reader.readBoolean("success");
 
                 if (!reader.isLastRead())
@@ -126,7 +148,7 @@ public class SnapshotFinishedMessage implements Message {
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 2;
+        return 3;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
index 8163049..221d0ce 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
@@ -97,4 +97,35 @@ public class SnapshotOperation implements Serializable {
     public Object extraParameter() {
         return extraParam;
     }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+        if (o == null || getClass() != o.getClass())
+            return false;
+
+        SnapshotOperation operation = (SnapshotOperation)o;
+
+        if (snapshotId != operation.snapshotId)
+            return false;
+        if (type != operation.type)
+            return false;
+        if (cacheNames != null ? !cacheNames.equals(operation.cacheNames) : operation.cacheNames
!= null)
+            return false;
+        if (msg != null ? !msg.equals(operation.msg) : operation.msg != null)
+            return false;
+        return extraParam != null ? extraParam.equals(operation.extraParam) : operation.extraParam
== null;
+
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int result = type != null ? type.hashCode() : 0;
+        result = 31 * result + (int)(snapshotId ^ (snapshotId >>> 32));
+        result = 31 * result + (cacheNames != null ? cacheNames.hashCode() : 0);
+        result = 31 * result + (msg != null ? msg.hashCode() : 0);
+        result = 31 * result + (extraParam != null ? extraParam.hashCode() : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/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
deleted file mode 100644
index 32a3dae..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartFullSnapshotAckDiscoveryMessage.java
+++ /dev/null
@@ -1,132 +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.internal.pagemem.snapshot;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.UUID;
-import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
-import org.apache.ignite.internal.util.typedef.internal.CU;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteUuid;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Message indicating that a snapshot has been started.
- */
-public class StartFullSnapshotAckDiscoveryMessage implements DiscoveryCustomMessage {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-
-    private SnapshotOperation snapshotOperation;
-
-    /** Custom message ID. */
-    private IgniteUuid id = IgniteUuid.randomUuid();
-
-    /** */
-    private Exception err;
-
-    /** */
-    private UUID initiatorNodeId;
-
-    /** Last full snapshot id for cache. */
-    private Map<Integer, Long> lastFullSnapshotIdForCache;
-
-    /** Last snapshot id for cache. */
-    private Map<Integer, Long> lastSnapshotIdForCache;
-
-    /**
-     * @param snapshotOperation Snapshot Operation.
-     * @param err Error.
-     */
-    public StartFullSnapshotAckDiscoveryMessage(
-        SnapshotOperation snapshotOperation,
-        Map<Integer, Long> lastFullSnapshotIdForCache,
-        Map<Integer, Long> lastSnapshotIdForCache,
-        Exception err,
-        UUID initiatorNodeId
-    ) {
-        this.snapshotOperation = snapshotOperation;
-        this.lastFullSnapshotIdForCache = lastFullSnapshotIdForCache;
-        this.lastSnapshotIdForCache = lastSnapshotIdForCache;
-        this.err = err;
-        this.initiatorNodeId = initiatorNodeId;
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteUuid id() {
-        return id;
-    }
-
-    /**
-     * @return Initiator node id.
-     */
-    public UUID initiatorNodeId() {
-        return initiatorNodeId;
-    }
-
-    /**
-     * @return Error if start this process is not successfully.
-     */
-    public Exception error() {
-        return err;
-    }
-
-    /**
-     * @return {@code True} if message has error otherwise {@code false}.
-     */
-    public boolean hasError() {
-        return err != null;
-    }
-
-    public SnapshotOperation snapshotOperation() {
-        return snapshotOperation;
-    }
-
-    /**
-     * @param cacheId Cache id.
-     */
-    @Nullable public Long lastFullSnapshotId(int cacheId) {
-        return lastFullSnapshotIdForCache.get(cacheId);
-    }
-
-    /**
-     * @param cacheId Cache id.
-     */
-    @Nullable public Long lastSnapshotId(int cacheId) {
-        return lastSnapshotIdForCache.get(cacheId);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public DiscoveryCustomMessage ackMessage() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isMutable() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(StartFullSnapshotAckDiscoveryMessage.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/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 2a977f4..3a67e49 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
@@ -18,13 +18,11 @@
 
 package org.apache.ignite.internal.pagemem.snapshot;
 
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 
@@ -139,7 +137,7 @@ public class StartFullSnapshotDiscoveryMessage implements DiscoveryCustomMessage
 
     /** {@inheritDoc} */
     @Nullable @Override public DiscoveryCustomMessage ackMessage() {
-        return new StartFullSnapshotAckDiscoveryMessage(
+        return new StartSnapshotOperationAckDiscoveryMessage(
             snapshotOperation,
             lastFullSnapshotIdForCache,
             lastSnapshotIdForCache,

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartSnapshotOperationAckDiscoveryMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartSnapshotOperationAckDiscoveryMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartSnapshotOperationAckDiscoveryMessage.java
new file mode 100644
index 0000000..e84b2e8
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/StartSnapshotOperationAckDiscoveryMessage.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ignite.internal.pagemem.snapshot;
+
+import java.util.Map;
+import java.util.UUID;
+import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.lang.IgniteUuid;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Message indicating that a snapshot has been started.
+ */
+public class StartSnapshotOperationAckDiscoveryMessage implements DiscoveryCustomMessage
{
+    /** */
+    private static final long serialVersionUID = 0L;
+
+
+    private SnapshotOperation snapshotOperation;
+
+    /** Custom message ID. */
+    private IgniteUuid id = IgniteUuid.randomUuid();
+
+    /** */
+    private Exception err;
+
+    /** */
+    private UUID initiatorNodeId;
+
+    /** Last full snapshot id for cache. */
+    private Map<Integer, Long> lastFullSnapshotIdForCache;
+
+    /** Last snapshot id for cache. */
+    private Map<Integer, Long> lastSnapshotIdForCache;
+
+    /**
+     * @param snapshotOperation Snapshot Operation.
+     * @param err Error.
+     */
+    public StartSnapshotOperationAckDiscoveryMessage(
+        SnapshotOperation snapshotOperation,
+        Map<Integer, Long> lastFullSnapshotIdForCache,
+        Map<Integer, Long> lastSnapshotIdForCache,
+        Exception err,
+        UUID initiatorNodeId
+    ) {
+        this.snapshotOperation = snapshotOperation;
+        this.lastFullSnapshotIdForCache = lastFullSnapshotIdForCache;
+        this.lastSnapshotIdForCache = lastSnapshotIdForCache;
+        this.err = err;
+        this.initiatorNodeId = initiatorNodeId;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteUuid id() {
+        return id;
+    }
+
+    /**
+     * @return Initiator node id.
+     */
+    public UUID initiatorNodeId() {
+        return initiatorNodeId;
+    }
+
+    /**
+     * @return Error if start this process is not successfully.
+     */
+    public Exception error() {
+        return err;
+    }
+
+    /**
+     * @return {@code True} if message has error otherwise {@code false}.
+     */
+    public boolean hasError() {
+        return err != null;
+    }
+
+    public SnapshotOperation snapshotOperation() {
+        return snapshotOperation;
+    }
+
+    /**
+     * @param cacheId Cache id.
+     */
+    @Nullable public Long lastFullSnapshotId(int cacheId) {
+        return lastFullSnapshotIdForCache.get(cacheId);
+    }
+
+    /**
+     * @param cacheId Cache id.
+     */
+    @Nullable public Long lastSnapshotId(int cacheId) {
+        return lastSnapshotIdForCache.get(cacheId);
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public DiscoveryCustomMessage ackMessage() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean isMutable() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(StartSnapshotOperationAckDiscoveryMessage.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 46a20ab..232dc83 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -30,11 +30,9 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.NavigableMap;
-import java.util.Queue;
 import java.util.TreeMap;
 import java.util.UUID;
 import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ConcurrentSkipListMap;
 import java.util.concurrent.LinkedBlockingDeque;
@@ -58,7 +56,7 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException;
 import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.events.DiscoveryCustomEvent;
 import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
-import org.apache.ignite.internal.pagemem.snapshot.StartFullSnapshotAckDiscoveryMessage;
+import org.apache.ignite.internal.pagemem.snapshot.StartSnapshotOperationAckDiscoveryMessage;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridClientPartitionTopology;
@@ -70,7 +68,6 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap2;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsAbstractMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsFullMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage;
@@ -100,7 +97,6 @@ import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.thread.IgniteThread;
 import org.jetbrains.annotations.Nullable;
 import org.jsr166.ConcurrentHashMap8;
-import org.jsr166.ConcurrentLinkedDeque8;
 
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_PRELOAD_RESEND_TIMEOUT;
@@ -280,8 +276,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                         else
                             exchangeFuture(msg.exchangeId(), null, null, null).onAffinityChangeMessage(customEvt.eventNode(),
msg);
                     }
-                    else if (customEvt.customMessage() instanceof StartFullSnapshotAckDiscoveryMessage
-                        && !((StartFullSnapshotAckDiscoveryMessage)customEvt.customMessage()).hasError())
{
+                    else if (customEvt.customMessage() instanceof StartSnapshotOperationAckDiscoveryMessage
+                        && !((StartSnapshotOperationAckDiscoveryMessage)customEvt.customMessage()).hasError())
{
                         exchId = exchangeId(n.id(), affinityTopologyVersion(e), e.type());
 
                         exchFut = exchangeFuture(exchId, e, null, null);

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 74b6782..2bb1e42 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -72,7 +72,7 @@ import org.apache.ignite.internal.binary.BinaryContext;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.binary.GridBinaryMarshaller;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
-import org.apache.ignite.internal.pagemem.snapshot.StartFullSnapshotAckDiscoveryMessage;
+import org.apache.ignite.internal.pagemem.snapshot.StartSnapshotOperationAckDiscoveryMessage;
 import org.apache.ignite.internal.pagemem.store.IgnitePageStoreManager;
 import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
@@ -2893,8 +2893,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (msg instanceof CacheAffinityChangeMessage)
             return sharedCtx.affinity().onCustomEvent(((CacheAffinityChangeMessage)msg));
 
-        if (msg instanceof StartFullSnapshotAckDiscoveryMessage &&
-            ((StartFullSnapshotAckDiscoveryMessage)msg).error() == null)
+        if (msg instanceof StartSnapshotOperationAckDiscoveryMessage &&
+            ((StartSnapshotOperationAckDiscoveryMessage)msg).error() == null)
             return true;
 
         if (msg instanceof DynamicCacheChangeBatch)

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/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 7a082cb..a5fdeef 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
@@ -19,9 +19,7 @@ package org.apache.ignite.internal.processors.cache.database;
 
 import java.io.File;
 import java.util.Collection;
-import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.MemoryConfiguration;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -29,7 +27,7 @@ import org.apache.ignite.internal.mem.DirectMemoryProvider;
 import org.apache.ignite.internal.mem.file.MappedFileMemoryProvider;
 import org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider;
 import org.apache.ignite.internal.pagemem.PageMemory;
-import org.apache.ignite.internal.pagemem.snapshot.StartFullSnapshotAckDiscoveryMessage;
+import org.apache.ignite.internal.pagemem.snapshot.StartSnapshotOperationAckDiscoveryMessage;
 import org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter;
@@ -179,13 +177,6 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     }
 
     /**
-     *
-     */
-    @Nullable public IgniteInternalFuture wakeupForSnapshot(long snapshotId) {
-        return null;
-    }
-
-    /**
      * @param discoEvt Before exchange for the given discovery event.
      */
     public void beforeExchange(GridDhtPartitionsExchangeFuture discoEvt) throws IgniteCheckedException
{
@@ -211,7 +202,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
      * @return Snapshot creation init future or {@code null} if snapshot is not available.
      * @throws IgniteCheckedException If failed.
      */
-    @Nullable public IgniteInternalFuture startLocalSnapshotCreation(StartFullSnapshotAckDiscoveryMessage
snapshotMsg)
+    @Nullable public IgniteInternalFuture startLocalSnapshotOperation(StartSnapshotOperationAckDiscoveryMessage
snapshotMsg)
         throws IgniteCheckedException {
         return null;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/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 2f9fc46..987ba54 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
@@ -48,7 +48,7 @@ import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.events.DiscoveryCustomEvent;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
 import org.apache.ignite.internal.managers.discovery.GridDiscoveryTopologySnapshot;
-import org.apache.ignite.internal.pagemem.snapshot.StartFullSnapshotAckDiscoveryMessage;
+import org.apache.ignite.internal.pagemem.snapshot.StartSnapshotOperationAckDiscoveryMessage;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
 import org.apache.ignite.internal.processors.cache.CacheAffinityChangeMessage;
@@ -510,7 +510,7 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
                     exchange = onCacheChangeRequest(crdNode);
                 }
-                else if (msg instanceof StartFullSnapshotAckDiscoveryMessage)
+                else if (msg instanceof StartSnapshotOperationAckDiscoveryMessage)
                     exchange = CU.clientNode(discoEvt.eventNode()) ?
                         onClientNodeEvent(crdNode) :
                         onServerNodeEvent(crdNode);
@@ -808,13 +808,13 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
         // If a backup request, synchronously wait for backup start.
         if (discoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT) {
-            DiscoveryCustomMessage customMessage = ((DiscoveryCustomEvent)discoEvt).customMessage();
+            DiscoveryCustomMessage customMsg = ((DiscoveryCustomEvent)discoEvt).customMessage();
 
-            if (customMessage instanceof StartFullSnapshotAckDiscoveryMessage) {
-                StartFullSnapshotAckDiscoveryMessage backupMsg = (StartFullSnapshotAckDiscoveryMessage)customMessage;
+            if (customMsg instanceof StartSnapshotOperationAckDiscoveryMessage) {
+                StartSnapshotOperationAckDiscoveryMessage snapshotOperationMsg = (StartSnapshotOperationAckDiscoveryMessage)customMsg;
 
                 if (!cctx.localNode().isClient() && !cctx.localNode().isDaemon())
{
-                    IgniteInternalFuture fut = cctx.database().startLocalSnapshotCreation(backupMsg);
+                    IgniteInternalFuture fut = cctx.database().startLocalSnapshotOperation(snapshotOperationMsg);
 
                     if (fut != null)
                         fut.get();

http://git-wip-us.apache.org/repos/asf/ignite/blob/e14cab15/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index 98d0da9..a0838b1 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -328,7 +328,7 @@ org.apache.ignite.internal.mem.OutOfMemoryException
 org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl$Segment
 org.apache.ignite.internal.pagemem.snapshot.SnapshotFinishedMessage
 org.apache.ignite.internal.pagemem.snapshot.SnapshotProgressMessage
-org.apache.ignite.internal.pagemem.snapshot.StartFullSnapshotAckDiscoveryMessage
+org.apache.ignite.internal.pagemem.snapshot.StartSnapshotOperationAckDiscoveryMessage
 org.apache.ignite.internal.pagemem.snapshot.StartFullSnapshotDiscoveryMessage
 org.apache.ignite.internal.pagemem.wal.StorageException
 org.apache.ignite.internal.pagemem.wal.WALIterator


Mime
View raw message