You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/09/06 14:40:06 UTC
[44/50] [abbrv] ignite git commit: Cherry-picked latest Visor fixes
for UI and compatibility.
Cherry-picked latest Visor fixes for UI and compatibility.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2b1c82cc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2b1c82cc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2b1c82cc
Branch: refs/heads/ignite-1.5.31-1
Commit: 2b1c82cceee3f522f7d3ce50e8d74d0c9df066a0
Parents: 7cf26d9
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Jul 29 17:54:35 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Fri Jul 29 17:54:35 2016 +0700
----------------------------------------------------------------------
.../internal/visor/cache/VisorCacheV4.java | 2 +-
.../visor/node/VisorNodeDataCollectorJob.java | 29 ++++++++++++++++----
2 files changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b1c82cc/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV4.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV4.java
index 81dbacb..a5f66be 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV4.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV4.java
@@ -86,7 +86,7 @@ public class VisorCacheV4 extends VisorCacheV2 {
/** {@inheritDoc} */
@Override public VisorCache history() {
- return initHistory(new VisorCacheV3());
+ return initHistory(new VisorCacheV4());
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/2b1c82cc/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 9a9b1cd..611dcde 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
@@ -21,8 +21,9 @@ import java.util.Collection;
import java.util.concurrent.ConcurrentMap;
import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.FileSystemConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
+import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
import org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter;
import org.apache.ignite.internal.util.ipc.IpcServerEndpoint;
import org.apache.ignite.internal.util.typedef.internal.S;
@@ -56,7 +57,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
private static final IgniteProductVersion VER_1_4_1 = IgniteProductVersion.fromString("1.4.1");
/** */
- private static final IgniteProductVersion VER_1_5_9 = IgniteProductVersion.fromString("1.5.9");
+ private static final IgniteProductVersion VER_1_5_10 = IgniteProductVersion.fromString("1.5.10");
/** */
private static final IgniteProductVersion VER_1_5_26 = IgniteProductVersion.fromString("1.5.26");
@@ -146,7 +147,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
if (compatibleWith(VER_1_4_1))
return new VisorCache();
- if (compatibleWith(VER_1_5_9))
+ if (compatibleWith(VER_1_5_10))
return new VisorCacheV2();
if (compatibleWith(VER_1_5_26))
@@ -156,6 +157,18 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
}
/**
+ * @param cacheName Cache name to check.
+ * @return {@code true} if cache on local node is not a data cache or near cache disabled.
+ */
+ private boolean proxyCache(String cacheName) {
+ GridDiscoveryManager discovery = ignite.context().discovery();
+
+ ClusterNode locNode = ignite.localNode();
+
+ return !(discovery.cacheAffinityNode(locNode, cacheName) || discovery.cacheNearNode(locNode, cacheName));
+ }
+
+ /**
* Collect caches.
*
* @param res Job result.
@@ -165,9 +178,10 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
try {
IgniteConfiguration cfg = ignite.configuration();
- GridCacheProcessor cacheProc = ignite.context().cache();
+ for (String cacheName : ignite.context().cache().cacheNames()) {
+ if (proxyCache(cacheName))
+ continue;
- for (String cacheName : cacheProc.cacheNames()) {
if (arg.systemCaches() || !(isSystemCache(cacheName) || isIgfsCache(cfg, cacheName))) {
long start0 = U.currentTimeMillis();
@@ -205,6 +219,11 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
for (IgniteFileSystem igfs : igfsProc.igfss()) {
long start0 = U.currentTimeMillis();
+ FileSystemConfiguration igfsCfg = igfs.configuration();
+
+ if (proxyCache(igfsCfg.getDataCacheName()) || proxyCache(igfsCfg.getMetaCacheName()))
+ continue;
+
try {
Collection<IpcServerEndpoint> endPoints = igfsProc.endpoints(igfs.name());