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/01/28 08:37:16 UTC

[16/50] ignite git commit: Fixed Visor tasks.

Fixed Visor tasks.


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

Branch: refs/heads/ignite-2324
Commit: bccd459842f09572db1c0bf799508c732fa0bc30
Parents: c77fc84
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Thu Jan 21 12:31:01 2016 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Jan 21 12:31:01 2016 +0700

----------------------------------------------------------------------
 .../ignite/internal/visor/cache/VisorCache.java | 45 ++++++++++----------
 .../internal/visor/cache/VisorCacheV2.java      | 23 +++++++---
 .../resources/META-INF/classnames.properties    | 15 ++++---
 3 files changed, 48 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bccd4598/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 5c1382b..0e830e2 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
@@ -257,35 +257,36 @@ public class VisorCache implements Serializable {
      * Fill values that should be stored in history;
      *
      * @param c Source cache.
+     * @return Cache.
      */
-    protected void initHistory(VisorCache c) {
-        c.name = name;
-        c.mode = mode;
-        c.memorySize = memorySize;
-        c.indexesSize = indexesSize;
-        c.size = size;
-        c.nearSize = nearSize;
-        c.dhtSize = dhtSize;
-        c.primarySize = primarySize;
-        c.offHeapAllocatedSize = offHeapAllocatedSize;
-        c.offHeapEntriesCnt = offHeapEntriesCnt;
-        c.swapSize = swapSize;
-        c.swapKeys = swapKeys;
-        c.partitions = partitions;
-        c.primaryPartitions = Collections.emptyList();
-        c.backupPartitions = Collections.emptyList();
-        c.metrics = metrics;
+    protected VisorCache initHistory(VisorCache c) {
+        if (c != null) {
+            c.name = name;
+            c.mode = mode;
+            c.memorySize = memorySize;
+            c.indexesSize = indexesSize;
+            c.size = size;
+            c.nearSize = nearSize;
+            c.dhtSize = dhtSize;
+            c.primarySize = primarySize;
+            c.offHeapAllocatedSize = offHeapAllocatedSize;
+            c.offHeapEntriesCnt = offHeapEntriesCnt;
+            c.swapSize = swapSize;
+            c.swapKeys = swapKeys;
+            c.partitions = partitions;
+            c.primaryPartitions = Collections.emptyList();
+            c.backupPartitions = Collections.emptyList();
+            c.metrics = metrics;
+        }
+
+        return c;
     }
 
     /**
      * @return New instance suitable to store in history.
      */
     public VisorCache history() {
-        VisorCache c = new VisorCache();
-
-        initHistory(c);
-
-        return c;
+        return initHistory(new VisorCache());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/bccd4598/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV2.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV2.java
index a4b0409..6b6aba2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV2.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheV2.java
@@ -36,23 +36,32 @@ public class VisorCacheV2 extends VisorCache {
 
     /** {@inheritDoc} */
     @Override public VisorCache from(IgniteEx ignite, String cacheName, int sample) throws IgniteCheckedException {
-        super.from(ignite, cacheName, sample);
+        VisorCache c = super.from(ignite, cacheName, sample);
 
-        GridCacheAdapter ca = ignite.context().cache().internalCache(cacheName);
+        if (c != null && c instanceof VisorCacheV2) {
+            GridCacheAdapter ca = ignite.context().cache().internalCache(cacheName);
 
-        // Cache was not started.
-        if (ca != null && ca.context().started())
-            near = ca.context().isNear();
+            // Cache was not started.
+            if (ca != null && ca.context().started())
+                ((VisorCacheV2)c).near = ca.context().isNear();
+        }
 
-        return this;
+        return c;
     }
 
     /** {@inheritDoc} */
-    @Override public void initHistory(VisorCache c) {
+    @Override protected VisorCache initHistory(VisorCache c) {
         super.initHistory(c);
 
         if (c instanceof VisorCacheV2)
             ((VisorCacheV2) c).near = near;
+
+        return c;
+    }
+
+    /** {@inheritDoc} */
+    @Override public VisorCache history() {
+        return initHistory(new VisorCacheV2());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/bccd4598/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 d9a5514..8c3ad88 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -226,7 +226,6 @@ org.apache.ignite.internal.IgniteSchedulerImpl
 org.apache.ignite.internal.IgniteServicesImpl
 org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance$1
 org.apache.ignite.internal.NodeStoppingException
-org.apache.ignite.internal.binary.BinaryContext
 org.apache.ignite.internal.binary.BinaryEnumObjectImpl
 org.apache.ignite.internal.binary.BinaryMetadata
 org.apache.ignite.internal.binary.BinaryObjectEx
@@ -452,12 +451,12 @@ org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$6
 org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$7
 org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeFutureSet
 org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$MessageHandler
-org.apache.ignite.internal.processors.cache.GridCacheProcessor$2
+org.apache.ignite.internal.processors.cache.GridCacheProcessor$1
+org.apache.ignite.internal.processors.cache.GridCacheProcessor$3
 org.apache.ignite.internal.processors.cache.GridCacheProcessor$4
 org.apache.ignite.internal.processors.cache.GridCacheProcessor$5
 org.apache.ignite.internal.processors.cache.GridCacheProcessor$6
-org.apache.ignite.internal.processors.cache.GridCacheProcessor$7
-org.apache.ignite.internal.processors.cache.GridCacheProcessor$9
+org.apache.ignite.internal.processors.cache.GridCacheProcessor$8
 org.apache.ignite.internal.processors.cache.GridCacheProcessor$LocalAffinityFunction
 org.apache.ignite.internal.processors.cache.GridCacheProxyImpl
 org.apache.ignite.internal.processors.cache.GridCacheReturn
@@ -496,7 +495,6 @@ org.apache.ignite.internal.processors.cache.GridCacheUtils$2
 org.apache.ignite.internal.processors.cache.GridCacheUtils$20
 org.apache.ignite.internal.processors.cache.GridCacheUtils$21
 org.apache.ignite.internal.processors.cache.GridCacheUtils$23
-org.apache.ignite.internal.processors.cache.GridCacheUtils$24
 org.apache.ignite.internal.processors.cache.GridCacheUtils$3
 org.apache.ignite.internal.processors.cache.GridCacheUtils$4
 org.apache.ignite.internal.processors.cache.GridCacheUtils$5
@@ -722,6 +720,7 @@ org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetResponse
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$2
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$3
+org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$4
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockFuture$MiniFuture$1
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockRequest
 org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse
@@ -1113,7 +1112,7 @@ org.apache.ignite.internal.processors.platform.compute.PlatformBroadcastingMulti
 org.apache.ignite.internal.processors.platform.compute.PlatformBroadcastingSingleClosureTask
 org.apache.ignite.internal.processors.platform.compute.PlatformClosureJob
 org.apache.ignite.internal.processors.platform.compute.PlatformCompute$1
-org.apache.ignite.internal.processors.platform.compute.PlatformCompute$2
+org.apache.ignite.internal.processors.platform.compute.PlatformCompute$ComputeConvertingFuture$1
 org.apache.ignite.internal.processors.platform.compute.PlatformFullJob
 org.apache.ignite.internal.processors.platform.compute.PlatformFullTask
 org.apache.ignite.internal.processors.platform.compute.PlatformJob
@@ -1165,6 +1164,7 @@ org.apache.ignite.internal.processors.rest.GridRestProcessor$3
 org.apache.ignite.internal.processors.rest.GridRestResponse
 org.apache.ignite.internal.processors.rest.client.message.GridClientAbstractMessage
 org.apache.ignite.internal.processors.rest.client.message.GridClientAuthenticationRequest
+org.apache.ignite.internal.processors.rest.client.message.GridClientCacheBean
 org.apache.ignite.internal.processors.rest.client.message.GridClientCacheRequest
 org.apache.ignite.internal.processors.rest.client.message.GridClientCacheRequest$GridCacheOperation
 org.apache.ignite.internal.processors.rest.client.message.GridClientHandshakeRequest
@@ -1548,6 +1548,7 @@ org.apache.ignite.internal.visor.cache.VisorCacheNearConfiguration
 org.apache.ignite.internal.visor.cache.VisorCacheNodesTask
 org.apache.ignite.internal.visor.cache.VisorCacheNodesTask$VisorCacheNodesJob
 org.apache.ignite.internal.visor.cache.VisorCacheQueryConfiguration
+org.apache.ignite.internal.visor.cache.VisorCacheQueryConfigurationV2
 org.apache.ignite.internal.visor.cache.VisorCacheQueryMetrics
 org.apache.ignite.internal.visor.cache.VisorCacheRebalanceConfiguration
 org.apache.ignite.internal.visor.cache.VisorCacheRebalanceTask
@@ -1560,10 +1561,12 @@ org.apache.ignite.internal.visor.cache.VisorCacheStartTask$VisorCacheStartJob
 org.apache.ignite.internal.visor.cache.VisorCacheStopTask
 org.apache.ignite.internal.visor.cache.VisorCacheStopTask$VisorCacheStopJob
 org.apache.ignite.internal.visor.cache.VisorCacheStoreConfiguration
+org.apache.ignite.internal.visor.cache.VisorCacheStoreConfigurationV2
 org.apache.ignite.internal.visor.cache.VisorCacheSwapBackupsTask
 org.apache.ignite.internal.visor.cache.VisorCacheSwapBackupsTask$VisorCachesSwapBackupsJob
 org.apache.ignite.internal.visor.cache.VisorCacheTypeFieldMetadata
 org.apache.ignite.internal.visor.cache.VisorCacheTypeMetadata
+org.apache.ignite.internal.visor.cache.VisorCacheV2
 org.apache.ignite.internal.visor.compute.VisorComputeCancelSessionsTask
 org.apache.ignite.internal.visor.compute.VisorComputeCancelSessionsTask$VisorComputeCancelSessionsJob
 org.apache.ignite.internal.visor.compute.VisorComputeResetMetricsTask