ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/2] ignite git commit: ignite-1.5 Fixed NPE in IgniteKernal.dumpDebugInfo.
Date Mon, 14 Dec 2015 07:41:25 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1.5 3db144820 -> ec2a64714


ignite-1.5 Fixed NPE in IgniteKernal.dumpDebugInfo.


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

Branch: refs/heads/ignite-1.5
Commit: acb57c5eb95d11ebde5557618226d80f25ac610c
Parents: 717dab2
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Dec 14 10:40:57 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Dec 14 10:40:57 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    | 26 ++++++++++++--------
 1 file changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/acb57c5e/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 4fb5d4a..0f781d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -3244,20 +3244,26 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
 
     /** {@inheritDoc} */
     public void dumpDebugInfo() {
-        boolean client = ctx.clientNode();
+        GridKernalContextImpl ctx = this.ctx;
 
-        ClusterNode locNode = ctx.discovery().localNode();
+        if (ctx != null) {
+            boolean client = ctx.clientNode();
 
-        UUID routerId = locNode instanceof TcpDiscoveryNode ? ((TcpDiscoveryNode)locNode).clientRouterNodeId()
: null;
+            ClusterNode locNode = ctx.discovery().localNode();
 
-        U.warn(log, "Dumping debug info for node [id=" + locNode.id() +
-            ", name=" + ctx.gridName() +
-            ", order=" + locNode.order() +
-            ", topVer=" + ctx.discovery().topologyVersion() +
-            ", client=" + client +
-            (client && routerId != null ? ", routerId=" + routerId : "") + ']');
+            UUID routerId = locNode instanceof TcpDiscoveryNode ? ((TcpDiscoveryNode)locNode).clientRouterNodeId()
: null;
 
-        ctx.cache().context().exchange().dumpDebugInfo();
+            U.warn(log, "Dumping debug info for node [id=" + locNode.id() +
+                ", name=" + ctx.gridName() +
+                ", order=" + locNode.order() +
+                ", topVer=" + ctx.discovery().topologyVersion() +
+                ", client=" + client +
+                (client && routerId != null ? ", routerId=" + routerId : "") + ']');
+
+            ctx.cache().context().exchange().dumpDebugInfo();
+        }
+        else
+            U.warn(log, "Dumping debug info for node, context is not initialized [name="
+ gridName + ']');
     }
 
     /** {@inheritDoc} */


Mime
View raw message