You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by av...@apache.org on 2016/02/11 16:25:12 UTC

[1/3] ignite git commit: Fix R# analysis warnings

Repository: ignite
Updated Branches:
  refs/heads/ignite-2468 e11f0fb5e -> d8062a17e


Fix R# analysis warnings


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

Branch: refs/heads/ignite-2468
Commit: 877be93ee35afddcc126a147cfd3cd1dda4a46ce
Parents: 0491a5f
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Feb 11 16:31:28 2016 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Thu Feb 11 16:31:28 2016 +0300

----------------------------------------------------------------------
 .../Impl/Common/IgniteConfigurationXmlSerializer.cs           | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/877be93e/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
index af25bfa..c27012a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/IgniteConfigurationXmlSerializer.cs
@@ -23,7 +23,6 @@ namespace Apache.Ignite.Core.Impl.Common
     using System.ComponentModel;
     using System.Configuration;
     using System.Diagnostics;
-    using System.Diagnostics.CodeAnalysis;
     using System.Linq;
     using System.Reflection;
     using System.Xml;
@@ -99,14 +98,13 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <summary>
         /// Writes the property of a basic type (primitives, strings, types).
         /// </summary>
-        [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")]
         private static void WriteBasicProperty(object obj, XmlWriter writer, Type valueType, PropertyInfo property)
         {
             var converter = GetConverter(property, valueType);
 
             var stringValue = converter.ConvertToInvariantString(obj);
 
-            writer.WriteString(stringValue);
+            writer.WriteString(stringValue ?? "");
         }
 
         /// <summary>
@@ -125,7 +123,6 @@ namespace Apache.Ignite.Core.Impl.Common
         /// <summary>
         /// Writes the complex property (nested object).
         /// </summary>
-        [SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")]
         private static void WriteComplexProperty(object obj, XmlWriter writer, Type valueType)
         {
             var props = GetNonDefaultProperties(obj).ToList();
@@ -139,7 +136,7 @@ namespace Apache.Ignite.Core.Impl.Common
             {
                 var converter = GetConverter(prop, prop.PropertyType);
                 var stringValue = converter.ConvertToInvariantString(prop.GetValue(obj, null));
-                writer.WriteAttributeString(PropertyNameToXmlName(prop.Name), stringValue);
+                writer.WriteAttributeString(PropertyNameToXmlName(prop.Name), stringValue ?? "");
             }
 
             // Write elements


[2/3] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-2468

Posted by av...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-2468


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

Branch: refs/heads/ignite-2468
Commit: 95da1734cae949141a99666ae8f385df563d7e26
Parents: e11f0fb 877be93
Author: Anton Vinogradov <av...@apache.org>
Authored: Thu Feb 11 18:23:06 2016 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Thu Feb 11 18:23:06 2016 +0300

----------------------------------------------------------------------
 .../Impl/Common/IgniteConfigurationXmlSerializer.cs           | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[3/3] ignite git commit: IGNITE-2468

Posted by av...@apache.org.
IGNITE-2468


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

Branch: refs/heads/ignite-2468
Commit: d8062a17e03b46952d154b62aade46122b0321a9
Parents: 95da173
Author: Anton Vinogradov <av...@apache.org>
Authored: Thu Feb 11 18:23:17 2016 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Thu Feb 11 18:23:17 2016 +0300

----------------------------------------------------------------------
 .../internal/GridMessageListenHandler.java      | 18 ++++++++++++--
 .../continuous/GridContinuousProcessor.java     | 25 +++++++++++---------
 2 files changed, 30 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d8062a17/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
index 2e78cf5..bf81944 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
@@ -83,6 +83,22 @@ public class GridMessageListenHandler implements GridContinuousHandler {
         this.pred = pred;
     }
 
+    /**
+     *
+     * @param orig Handler to be copied.
+     */
+    public GridMessageListenHandler(GridMessageListenHandler orig) {
+        assert orig != null;
+
+        this.clsName = orig.clsName;
+        this.depInfo = orig.depInfo;
+        this.pred = orig.pred;
+        this.predBytes = orig.predBytes;
+        this.topic = orig.topic;
+        this.topicBytes = orig.topicBytes;
+        this.depEnabled = false;
+    }
+
     /** {@inheritDoc} */
     @Override public boolean isEvents() {
         return false;
@@ -179,8 +195,6 @@ public class GridMessageListenHandler implements GridContinuousHandler {
             topic = ctx.config().getMarshaller().unmarshal(topicBytes, ldr);
 
         pred = ctx.config().getMarshaller().unmarshal(predBytes, ldr);
-
-        depEnabled = false;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/d8062a17/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index 2b72239..ed6ff5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -40,6 +40,7 @@ import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.events.Event;
 import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.GridMessageListenHandler;
 import org.apache.ignite.internal.IgniteClientDisconnectedCheckedException;
 import org.apache.ignite.internal.IgniteDeploymentCheckedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -860,6 +861,10 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
             U.error(log, "Failed to register handler [nodeId=" + node.id() + ", routineId=" + routineId + ']', e);
         }
 
+        GridContinuousHandler hnd0 = hnd instanceof GridMessageListenHandler ?
+            new GridMessageListenHandler((GridMessageListenHandler)hnd) :
+            hnd;
+
         if (node.isClient()) {
             Map<UUID, LocalRoutineInfo> clientRoutineMap = clientInfos.get(node.id());
 
@@ -872,7 +877,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
             }
 
             clientRoutineMap.put(routineId, new LocalRoutineInfo(data.projectionPredicate(),
-                hnd,
+                hnd0,
                 data.bufferSize(),
                 data.interval(),
                 data.autoUnsubscribe()));
@@ -889,14 +894,14 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
                 if ((prjPred == null || prjPred.apply(ctx.discovery().node(ctx.localNodeId()))) &&
                     !locInfos.containsKey(routineId)) {
-                    registered = registerHandler(node.id(), routineId, hnd, data.bufferSize(), data.interval(),
+                    registered = registerHandler(node.id(), routineId, hnd0, data.bufferSize(), data.interval(),
                         data.autoUnsubscribe(), false);
                 }
 
                 if (!data.autoUnsubscribe())
                     // Register routine locally.
                     locInfos.putIfAbsent(routineId, new LocalRoutineInfo(
-                        prjPred, hnd, data.bufferSize(), data.interval(), data.autoUnsubscribe()));
+                        prjPred, hnd0, data.bufferSize(), data.interval(), data.autoUnsubscribe()));
             }
             catch (IgniteCheckedException e) {
                 err = e;
@@ -906,11 +911,11 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
         }
 
         // Load partition counters.
-        if (hnd.isQuery()) {
+        if (hnd0.isQuery()) {
             GridCacheProcessor proc = ctx.cache();
 
             if (proc != null) {
-                GridCacheAdapter cache = ctx.cache().internalCache(hnd.cacheName());
+                GridCacheAdapter cache = ctx.cache().internalCache(hnd0.cacheName());
 
                 if (cache != null && !cache.isLocal()) {
                     Map<Integer, Long> cntrs = cache.context().topology().updateCounters();
@@ -924,7 +929,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
             req.addError(ctx.localNodeId(), err);
 
         if (registered)
-            hnd.onListenerRegistered(routineId, ctx);
+            hnd0.onListenerRegistered(routineId, ctx);
     }
 
     /**
@@ -1115,9 +1120,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
         try {
             remote = rmtInfos.remove(routineId);
 
-            if (remote == null)
-                // Removes routine at node started it when stopRoutine called from another node.
-                loc = locInfos.remove(routineId);
+            loc = locInfos.remove(routineId);
 
             if (remote == null)
                 stopped.add(routineId);
@@ -1128,8 +1131,8 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
         if (remote != null)
             unregisterHandler(routineId, remote.hnd, false);
-
-        if (loc != null)
+        else
+            // Removes routine at node started it when stopRoutine called from another node.
             unregisterHandler(routineId, loc.hnd, false);
     }