ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: # IGNITE-45: Collecting dynamic caches from nodes.
Date Wed, 18 Mar 2015 03:04:44 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 ae3144ef1 -> 1708c5851


# IGNITE-45: Collecting dynamic caches from nodes.


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

Branch: refs/heads/ignite-45
Commit: 1708c5851714a0bb75d2588dea73461f114a8b7f
Parents: ae3144e
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Mar 18 10:04:43 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Mar 18 10:04:43 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/internal/visor/cache/VisorCache.java   | 4 ++++
 .../internal/visor/node/VisorNodeDataCollectorJob.java       | 8 +++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1708c585/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
index 2d629ec..fd5e48a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCache.java
@@ -104,6 +104,10 @@ public class VisorCache implements Serializable {
 
         GridCacheAdapter ca = ((IgniteKernal)ignite).internalCache(cacheName);
 
+        // Cache was not started.
+        if (ca == null)
+            return null;
+
         long swapSize;
         long swapKeys;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1708c585/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
index d966acc..7179905 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.visor.node;
 
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.igfs.*;
 import org.apache.ignite.internal.util.ipc.*;
@@ -121,14 +120,17 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
         try {
             IgniteConfiguration cfg = ignite.configuration();
 
-            GridCacheProcessor cacheProc = ((IgniteKernal)ignite).context().cache();
+            GridCacheProcessor cacheProc = ignite.context().cache();
 
             for (String cacheName : cacheProc.cacheNames()) {
                 if (arg.systemCaches() || !(isSystemCache(cacheName) || isIgfsCache(cfg,
cacheName))) {
                     long start0 = U.currentTimeMillis();
 
                     try {
-                        res.caches().add(VisorCache.from(ignite, cacheName, arg.sample()));
+                        VisorCache cache = VisorCache.from(ignite, cacheName, arg.sample());
+
+                        if (cache != null)
+                            res.caches().add(cache);
                     }
                     finally {
                         if (debug)


Mime
View raw message