ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [2/2] incubator-ignite git commit: # IGNITE-55 Reworked VisorClearTask to new JCache API.
Date Tue, 10 Feb 2015 03:37:13 GMT
# IGNITE-55 Reworked VisorClearTask to new JCache API.


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

Branch: refs/heads/ignite-55
Commit: 950555713409ed4662ce1898cedf7875c3641ff6
Parents: ce0c94a
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Feb 10 10:36:54 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Feb 10 10:36:54 2015 +0700

----------------------------------------------------------------------
 .../apache/ignite/internal/visor/VisorJob.java  |  8 +--
 .../ignite/internal/visor/cache/VisorCache.java | 10 +--
 .../visor/cache/VisorCacheClearTask.java        | 40 ++++--------
 .../visor/cache/VisorCacheCompactTask.java      |  2 +-
 .../visor/cache/VisorCacheLoadTask.java         |  2 +-
 .../visor/cache/VisorCacheMetadataTask.java     |  2 +-
 .../cache/VisorCacheMetricsCollectorTask.java   |  2 +-
 .../visor/cache/VisorCachePreloadTask.java      |  2 +-
 .../visor/cache/VisorCacheResetMetricsTask.java |  2 +-
 .../visor/cache/VisorCacheSwapBackupsTask.java  |  2 +-
 .../compute/VisorComputeCancelSessionsTask.java |  4 +-
 .../compute/VisorComputeMonitoringHolder.java   | 16 ++---
 .../compute/VisorComputeResetMetricsTask.java   |  2 +-
 .../VisorComputeToggleMonitoringTask.java       | 10 +--
 .../visor/ggfs/VisorGgfsFormatTask.java         |  2 +-
 .../visor/ggfs/VisorGgfsProfilerClearTask.java  |  4 +-
 .../visor/ggfs/VisorGgfsProfilerTask.java       |  4 +-
 .../visor/ggfs/VisorGgfsResetMetricsTask.java   |  2 +-
 .../visor/ggfs/VisorGgfsSamplingStateTask.java  |  2 +-
 .../internal/visor/log/VisorLogSearchTask.java  | 10 +--
 .../internal/visor/misc/VisorAckTask.java       |  2 +-
 .../visor/misc/VisorLatestVersionTask.java      |  2 +-
 .../visor/node/VisorGridConfiguration.java      | 10 +--
 .../VisorNodeConfigurationCollectorJob.java     |  2 +-
 .../visor/node/VisorNodeDataCollectorJob.java   | 49 ++++++++------
 .../node/VisorNodeEventsCollectorTask.java      | 16 ++---
 .../internal/visor/node/VisorNodeGcTask.java    |  2 +-
 .../internal/visor/node/VisorNodePingTask.java  |  2 +-
 .../VisorPortableMetadataCollectorTask.java     |  2 +-
 .../visor/query/VisorQueryCleanupTask.java      |  2 +-
 .../visor/query/VisorQueryNextPageTask.java     |  4 +-
 .../internal/visor/query/VisorQueryTask.java    | 18 +++---
 .../streamer/VisorStreamerMetricsResetTask.java |  4 +-
 .../visor/streamer/VisorStreamerResetTask.java  |  4 +-
 .../internal/visor/util/VisorTaskUtils.java     | 18 +++---
 .../visor/commands/ack/VisorAckCommand.scala    |  4 +-
 .../commands/alert/VisorAlertCommand.scala      | 24 +++----
 .../commands/cache/VisorCacheClearCommand.scala | 17 ++---
 .../commands/cache/VisorCacheCommand.scala      |  8 +--
 .../cache/VisorCacheCompactCommand.scala        |  4 +-
 .../commands/cache/VisorCacheScanCommand.scala  |  8 +--
 .../commands/cache/VisorCacheSwapCommand.scala  |  4 +-
 .../config/VisorConfigurationCommand.scala      |  4 +-
 .../commands/disco/VisorDiscoveryCommand.scala  |  6 +-
 .../commands/events/VisorEventsCommand.scala    |  4 +-
 .../visor/commands/gc/VisorGcCommand.scala      |  6 +-
 .../visor/commands/kill/VisorKillCommand.scala  | 10 +--
 .../visor/commands/node/VisorNodeCommand.scala  |  2 +-
 .../visor/commands/ping/VisorPingCommand.scala  |  4 +-
 .../commands/start/VisorStartCommand.scala      |  4 +-
 .../commands/tasks/VisorTasksCommand.scala      | 22 +++----
 .../commands/top/VisorTopologyCommand.scala     |  8 +--
 .../visor/commands/vvm/VisorVvmCommand.scala    |  6 +-
 .../scala/org/apache/ignite/visor/visor.scala   | 68 ++++++++++----------
 .../commands/tasks/VisorTasksCommandSpec.scala  |  2 +-
 55 files changed, 235 insertions(+), 245 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java
index 45fb059..f3dbebe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java
@@ -31,7 +31,7 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
  */
 public abstract class VisorJob<A, R> extends ComputeJobAdapter {
     @IgniteInstanceResource
-    protected transient IgniteEx g;
+    protected transient IgniteEx ignite;
 
     /** Job start time. */
     protected transient long start;
@@ -58,18 +58,18 @@ public abstract class VisorJob<A, R> extends ComputeJobAdapter {
 
         try {
             if (debug)
-                logStart(g.log(), getClass(), start);
+                logStart(ignite.log(), getClass(), start);
 
             return run(arg);
         }
         finally {
             if (debug)
-                logFinish(g.log(), getClass(), start);
+                logFinish(ignite.log(), getClass(), start);
         }
     }
 
     /**
-     * Execution logic of concrete task.
+     * Execution logic of concrete job.
      *
      * @param arg Task argument.
      * @return Result.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/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 5a93821..9de5638 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
@@ -92,19 +92,19 @@ public class VisorCache implements Serializable {
     private GridDhtPartitionMap partsMap;
 
     /**
-     * @param g Grid.
+     * @param ignite Grid.
      * @param c Actual cache.
      * @param sample Sample size.
      * @return Data transfer object for given cache.
      * @throws IgniteCheckedException
      */
-    public static VisorCache from(Ignite g, GridCache c, int sample) throws IgniteCheckedException {
-        assert g != null;
+    public static VisorCache from(Ignite ignite, GridCache c, int sample) throws IgniteCheckedException {
+        assert ignite != null;
         assert c != null;
 
         String cacheName = c.name();
 
-        GridCacheAdapter ca = ((IgniteKernal)g).internalCache(cacheName);
+        GridCacheAdapter ca = ((IgniteKernal)ignite).internalCache(cacheName);
 
         long swapSize;
         long swapKeys;
@@ -161,7 +161,7 @@ public class VisorCache implements Serializable {
             }
             else {
                 // Old way of collecting partitions info.
-                ClusterNode node = g.cluster().localNode();
+                ClusterNode node = ignite.cluster().localNode();
 
                 int[] pp = ca.affinity().primaryPartitions(node);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
index 0f5fc56..1d0079f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java
@@ -17,66 +17,54 @@
 
 package org.apache.ignite.internal.visor.cache;
 
-import org.apache.ignite.cache.*;
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.task.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.internal.visor.*;
 import org.apache.ignite.lang.*;
 
-import java.util.*;
-
 /**
  * Task that clears specified caches on specified node.
  */
 @GridInternal
-public class VisorCacheClearTask extends VisorOneNodeTask<Set<String>, Map<String, IgniteBiTuple<Integer, Integer>>> {
+public class VisorCacheClearTask extends VisorOneNodeTask<String, IgniteBiTuple<Integer, Integer>> {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** {@inheritDoc} */
-    @Override protected VisorCachesClearJob job(Set<String> arg) {
+    @Override protected VisorCachesClearJob job(String arg) {
         return new VisorCachesClearJob(arg, debug);
     }
 
     /**
      * Job that clear specified caches.
      */
-    private static class VisorCachesClearJob extends VisorJob<Set<String>, Map<String, IgniteBiTuple<Integer, Integer>>> {
+    private static class VisorCachesClearJob extends VisorJob<String, IgniteBiTuple<Integer, Integer>> {
         /** */
         private static final long serialVersionUID = 0L;
 
         /**
          * Create job.
          *
-         * @param arg Cache names to clear.
+         * @param cacheName Cache names to clear.
          * @param debug Debug flag.
          */
-        private VisorCachesClearJob(Set<String> arg, boolean debug) {
-            super(arg, debug);
+        private VisorCachesClearJob(String cacheName, boolean debug) {
+            super(cacheName, debug);
         }
 
         /** {@inheritDoc} */
-        @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> arg) {
-            Map<String, IgniteBiTuple<Integer, Integer>> res = new HashMap<>();
-
-            for(GridCache cache : g.cachesx()) {
-                String cacheName = cache.name();
-
-                if (arg.contains(cacheName)) {
-                    Set keys = cache.keySet();
+        @Override protected IgniteBiTuple<Integer, Integer> run(String cacheName) {
+            IgniteCache cache = ignite.jcache(cacheName);
 
-                    int before = keys.size(), after = before;
+            int before = cache.size();
 
-                    for (Object key : keys) {
-                        if (cache.clearLocally(key))
-                            after--;
-                    }
+            cache.clear();
 
-                    res.put(cacheName, new IgniteBiTuple<>(before, after));
-                }
-            }
+            int after = cache.size();
 
-            return res;
+            return new IgniteBiTuple<>(before, after);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java
index 4c561e5..b20efeb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java
@@ -59,7 +59,7 @@ public class VisorCacheCompactTask extends VisorOneNodeTask<Set<String>, Map<Str
             try {
                 final Map<String, IgniteBiTuple<Integer, Integer>> res = new HashMap<>();
 
-                for(GridCache cache : g.cachesx()) {
+                for(GridCache cache : ignite.cachesx()) {
                     String cacheName = cache.name();
 
                     if (names.contains(cacheName)) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java
index facaec9..3e395e2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java
@@ -64,7 +64,7 @@ public class VisorCacheLoadTask extends
 
                 Map<String, Integer> res = new HashMap<>();
 
-                for (GridCache c: g.cachesx()) {
+                for (GridCache c: ignite.cachesx()) {
                     String cacheName = c.name();
 
                     if (cacheNames.contains(cacheName)) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java
index 0e86c33..ea03387 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java
@@ -58,7 +58,7 @@ public class VisorCacheMetadataTask extends VisorOneNodeTask<String, GridCacheSq
         /** {@inheritDoc} */
         @Override protected GridCacheSqlMetadata run(String cacheName) {
             try {
-                GridCache<Object, Object> cache = g.cachex(cacheName);
+                GridCache<Object, Object> cache = ignite.cachex(cacheName);
 
                 if (cache != null) {
                     GridCacheQueriesEx<Object, Object> queries = (GridCacheQueriesEx<Object, Object>) cache.queries();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
index de82e51..9c18686 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java
@@ -88,7 +88,7 @@ public class VisorCacheMetricsCollectorTask extends VisorMultiNodeTask<IgniteBiT
         /** {@inheritDoc} */
         @Override protected Map<String, VisorCacheMetrics>
             run(IgniteBiTuple<Boolean, String> arg) {
-            Collection<? extends GridCache<?, ?>> caches = arg.get1() ? g.cachesx() : F.asList(g.cachex(arg.get2()));
+            Collection<? extends GridCache<?, ?>> caches = arg.get1() ? ignite.cachesx() : F.asList(ignite.cachex(arg.get2()));
 
             if (caches != null) {
                 Map<String, VisorCacheMetrics> res = U.newHashMap(caches.size());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java
index a2e6f34..e0a6e69 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java
@@ -59,7 +59,7 @@ public class VisorCachePreloadTask extends VisorOneNodeTask<Set<String>, Void> {
             try {
                 Collection<IgniteInternalFuture<?>> futs = new ArrayList<>();
 
-                for(GridCache c : g.cachesx()) {
+                for(GridCache c : ignite.cachesx()) {
                     if (cacheNames.contains(c.name()))
                         futs.add(c.forceRepartition());
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java
index c9d182d..11423a3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java
@@ -52,7 +52,7 @@ public class VisorCacheResetMetricsTask extends VisorOneNodeTask<String, Void> {
 
         /** {@inheritDoc} */
         @Override protected Void run(String cacheName) {
-            GridCache cache = g.cachex(cacheName);
+            GridCache cache = ignite.cachex(cacheName);
 
             if (cache != null)
                 cache.mxBean().clear();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java
index 68e5cd9..14f0b7d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java
@@ -61,7 +61,7 @@ public class VisorCacheSwapBackupsTask extends VisorOneNodeTask<Set<String>, Map
         @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> names) {
             Map<String, IgniteBiTuple<Integer, Integer>> total = new HashMap<>();
 
-            for (GridCache c: g.cachesx()) {
+            for (GridCache c: ignite.cachesx()) {
                 String cacheName = c.name();
 
                 if (names.contains(cacheName)) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java
index cca3933..02fd4f9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java
@@ -63,10 +63,10 @@ public class VisorComputeCancelSessionsTask extends VisorMultiNodeTask<Map<UUID,
 
         /** {@inheritDoc} */
         @Override protected Void run(Map<UUID, Set<IgniteUuid>> arg) {
-            Set<IgniteUuid> sesIds = arg.get(g.localNode().id());
+            Set<IgniteUuid> sesIds = arg.get(ignite.localNode().id());
 
             if (sesIds != null && !sesIds.isEmpty()) {
-                IgniteCompute compute = g.compute(g.forLocal());
+                IgniteCompute compute = ignite.compute(ignite.forLocal());
 
                 Map<IgniteUuid, ComputeTaskFuture<Object>> futs = compute.activeTaskFutures();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java
index 1a2dd79..7eafe4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeMonitoringHolder.java
@@ -44,37 +44,37 @@ public class VisorComputeMonitoringHolder {
     /**
      * Start collect events for Visor instance.
      *
-     * @param g grid.
+     * @param ignite grid.
      * @param visorKey unique Visor instance key.
      */
-    public void startCollect(IgniteEx g, String visorKey) {
+    public void startCollect(IgniteEx ignite, String visorKey) {
         synchronized(listenVisor) {
             if (cleanupStopped) {
-                scheduleCleanupJob(g);
+                scheduleCleanupJob(ignite);
 
                 cleanupStopped = false;
             }
 
             listenVisor.put(visorKey, true);
 
-            g.events().enableLocal(VISOR_TASK_EVTS);
+            ignite.events().enableLocal(VISOR_TASK_EVTS);
         }
     }
 
     /**
      * Check if collect events may be disable.
-     * @param g grid.
+     * @param ignite grid.
      * @return {@code true} if task events should remain enabled.
      */
-    private boolean tryDisableEvents(IgniteEx g) {
+    private boolean tryDisableEvents(IgniteEx ignite) {
         if (!listenVisor.values().contains(true)) {
             listenVisor.clear();
 
-            g.events().disableLocal(VISOR_TASK_EVTS);
+            ignite.events().disableLocal(VISOR_TASK_EVTS);
         }
 
         // Return actual state. It could stay the same if events explicitly enabled in configuration.
-        return g.allEventsUserRecordable(VISOR_TASK_EVTS);
+        return ignite.allEventsUserRecordable(VISOR_TASK_EVTS);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java
index 06a1709..c495964 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java
@@ -51,7 +51,7 @@ public class VisorComputeResetMetricsTask extends VisorOneNodeTask<Void, Void> {
 
         /** {@inheritDoc} */
         @Override protected Void run(Void arg) {
-            g.resetMetrics();
+            ignite.resetMetrics();
 
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java
index 083e2a2..39dfba5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java
@@ -72,10 +72,10 @@ public class VisorComputeToggleMonitoringTask extends
 
         /** {@inheritDoc} */
         @Override protected Boolean run(IgniteBiTuple<String, Boolean> arg) {
-            if (checkExplicitTaskMonitoring(g))
+            if (checkExplicitTaskMonitoring(ignite))
                 return true;
             else {
-                ClusterNodeLocalMap<String, VisorComputeMonitoringHolder> storage = g.nodeLocalMap();
+                ClusterNodeLocalMap<String, VisorComputeMonitoringHolder> storage = ignite.nodeLocalMap();
 
                 VisorComputeMonitoringHolder holder = storage.get(COMPUTE_MONITORING_HOLDER_KEY);
 
@@ -94,12 +94,12 @@ public class VisorComputeToggleMonitoringTask extends
 
                 // Set task monitoring state.
                 if (state)
-                    holder.startCollect(g, visorKey);
+                    holder.startCollect(ignite, visorKey);
                 else
-                    holder.stopCollect(g, visorKey);
+                    holder.stopCollect(ignite, visorKey);
 
                 // Return actual state. It could stay the same if events explicitly enabled in configuration.
-                return g.allEventsUserRecordable(VISOR_TASK_EVTS);
+                return ignite.allEventsUserRecordable(VISOR_TASK_EVTS);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java
index 12e71a5..0d57732 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java
@@ -53,7 +53,7 @@ public class VisorGgfsFormatTask extends VisorOneNodeTask<String, Void> {
         /** {@inheritDoc} */
         @Override protected Void run(String ggfsName) {
             try {
-                g.fileSystem(ggfsName).format();
+                ignite.fileSystem(ggfsName).format();
             }
             catch (IllegalArgumentException iae) {
                 throw new IgniteException("Failed to format IgniteFs: " + ggfsName, iae);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java
index cec7ab9..e51691e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java
@@ -59,7 +59,7 @@ public class VisorGgfsProfilerClearTask extends VisorOneNodeTask<String, IgniteB
             int notDeleted = 0;
 
             try {
-                IgniteFs ggfs = g.fileSystem(arg);
+                IgniteFs ggfs = ignite.fileSystem(arg);
 
                 Path logsDir = resolveGgfsProfilerLogsDir(ggfs);
 
@@ -84,7 +84,7 @@ public class VisorGgfsProfilerClearTask extends VisorOneNodeTask<String, IgniteB
                                 catch (IOException io) {
                                     notDeleted++;
 
-                                    g.log().warning("Profiler log file was not deleted: " + p, io);
+                                    ignite.log().warning("Profiler log file was not deleted: " + p, io);
                                 }
                             }
                         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java
index cc057a0..33f838d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java
@@ -162,7 +162,7 @@ public class VisorGgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
         /** {@inheritDoc} */
         @Override protected Collection<VisorGgfsProfilerEntry> run(String arg) {
             try {
-                Path logsDir = resolveGgfsProfilerLogsDir(g.fileSystem(arg));
+                Path logsDir = resolveGgfsProfilerLogsDir(ignite.fileSystem(arg));
 
                 if (logsDir != null)
                     return parse(logsDir, arg);
@@ -485,7 +485,7 @@ public class VisorGgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
                             // Files was deleted, skip it.
                         }
                         catch (Exception e) {
-                            g.log().warning("Failed to parse GGFS profiler log file: " + p, e);
+                            ignite.log().warning("Failed to parse GGFS profiler log file: " + p, e);
                         }
                     }
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java
index 5a13bd6..a111657 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java
@@ -56,7 +56,7 @@ public class VisorGgfsResetMetricsTask extends VisorOneNodeTask<Set<String>, Voi
         @Override protected Void run(Set<String> ggfsNames) {
             for (String ggfsName: ggfsNames)
                 try {
-                    g.fileSystem(ggfsName).resetMetrics();
+                    ignite.fileSystem(ggfsName).resetMetrics();
                 }
                 catch (IllegalArgumentException iae) {
                     throw new IgniteException("Failed to reset metrics for GGFS: " + ggfsName, iae);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
index 53c7d0d..fc85cd1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java
@@ -52,7 +52,7 @@ public class VisorGgfsSamplingStateTask extends VisorOneNodeTask<IgniteBiTuple<S
         /** {@inheritDoc} */
         @Override protected Void run(IgniteBiTuple<String, Boolean> arg) {
             try {
-                ((GridGgfsEx)g.fileSystem(arg.get1())).globalSampling(arg.get2());
+                ((GridGgfsEx)ignite.fileSystem(arg.get1())).globalSampling(arg.get2());
 
                 return null;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
index 4cb745e..edfab6f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
@@ -215,7 +215,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
             if (url == null)
                 throw U.convertException(new GridInternalException(new FileNotFoundException("Log folder not found: " + arg.folder)));
 
-            UUID uuid = g.localNode().id();
+            UUID uuid = ignite.localNode().id();
             String nid = uuid.toString().toLowerCase();
 
             String filePtrn = arg.filePtrn.replace("@nid8", nid.substring(0, 8)).replace("@nid", nid);
@@ -228,7 +228,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
 
                 Collection<VisorLogSearchResult> results = new ArrayList<>(arg.limit);
 
-                int resultCnt = 0;
+                int resCnt = 0;
 
                 for (VisorLogFile logFile : matchingFiles) {
                     try {
@@ -237,13 +237,13 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
                         if (textFile(f, false)) {
                             Charset charset = decode(f);
 
-                            if (resultCnt == arg.limit)
+                            if (resCnt == arg.limit)
                                 break;
 
                             List<GridTuple3<String[], Integer, Integer>> searched =
-                                searchInFile(f, charset, arg.searchStr, arg.limit - resultCnt);
+                                searchInFile(f, charset, arg.searchStr, arg.limit - resCnt);
 
-                            resultCnt += searched.size();
+                            resCnt += searched.size();
 
                             String path = f.getAbsolutePath().substring(pathIdx);
                             long sz = f.length(), lastModified = f.lastModified();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java
index b1033be..22360c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java
@@ -62,7 +62,7 @@ public class VisorAckTask extends VisorMultiNodeTask<String, Void, Void> {
 
         /** {@inheritDoc} */
         @Override protected Void run(String arg) {
-            System.out.println("<visor>: ack: " + (arg == null ? g.localNode().id() : arg));
+            System.out.println("<visor>: ack: " + (arg == null ? ignite.localNode().id() : arg));
 
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
index 88fa825..bd3ba71 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java
@@ -51,7 +51,7 @@ public class VisorLatestVersionTask extends VisorOneNodeTask<Void, String> {
 
         /** {@inheritDoc} */
         @Override protected String run(Void arg) {
-            return g.product().latestVersion();
+            return ignite.product().latestVersion();
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
index 09a1c12..c7bfd3e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
@@ -87,15 +87,15 @@ public class VisorGridConfiguration implements Serializable {
     private Properties sysProps;
 
     /**
-     * @param g Grid.
+     * @param ignite Grid.
      * @return Fill data transfer object with node configuration data.
      */
-    public VisorGridConfiguration from(IgniteEx g) {
-        assert g != null;
+    public VisorGridConfiguration from(IgniteEx ignite) {
+        assert ignite != null;
 
-        IgniteConfiguration c = g.configuration();
+        IgniteConfiguration c = ignite.configuration();
 
-        basic(VisorBasicConfiguration.from(g, c));
+        basic(VisorBasicConfiguration.from(ignite, c));
         metrics(VisorMetricsConfiguration.from(c));
         spis(VisorSpisConfiguration.from(c));
         p2p(VisorPeerToPeerConfiguration.from(c));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
index 6c53730..e257443 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
@@ -37,7 +37,7 @@ public class VisorNodeConfigurationCollectorJob extends VisorJob<Void, VisorGrid
 
     /** {@inheritDoc} */
     @Override protected VisorGridConfiguration run(Void arg) {
-        return new VisorGridConfiguration().from(g);
+        return new VisorGridConfiguration().from(ignite);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/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 d89f378..6d0dd09 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
@@ -59,14 +59,14 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
     private void events(VisorNodeDataCollectorJobResult res, VisorNodeDataCollectorTaskArg arg) {
         try {
             // Visor events explicitly enabled in configuration.
-            if (checkExplicitTaskMonitoring(g))
+            if (checkExplicitTaskMonitoring(ignite))
                 res.taskMonitoringEnabled(true);
             else {
                 // Get current task monitoring state.
                 res.taskMonitoringEnabled(arg.taskMonitoringEnabled());
 
                 if (arg.taskMonitoringEnabled()) {
-                    ClusterNodeLocalMap<String, VisorComputeMonitoringHolder> storage = g.nodeLocalMap();
+                    ClusterNodeLocalMap<String, VisorComputeMonitoringHolder> storage = ignite.nodeLocalMap();
 
                     VisorComputeMonitoringHolder holder = storage.get(COMPUTE_MONITORING_HOLDER_KEY);
 
@@ -79,14 +79,14 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
                     }
 
                     // Enable task monitoring for new node in grid.
-                    holder.startCollect(g, arg.eventsOrderKey());
+                    holder.startCollect(ignite, arg.eventsOrderKey());
 
                     // Update current state after change (it may not changed in some cases).
-                    res.taskMonitoringEnabled(g.allEventsUserRecordable(VISOR_TASK_EVTS));
+                    res.taskMonitoringEnabled(ignite.allEventsUserRecordable(VISOR_TASK_EVTS));
                 }
             }
 
-            res.events().addAll(collectEvents(g, arg.eventsOrderKey(), arg.eventsThrottleCounterKey(),
+            res.events().addAll(collectEvents(ignite, arg.eventsOrderKey(), arg.eventsThrottleCounterKey(),
                 arg.taskMonitoringEnabled()));
         }
         catch (Throwable eventsEx) {
@@ -97,20 +97,20 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
     /** Collect caches. */
     private void caches(VisorNodeDataCollectorJobResult res, VisorNodeDataCollectorTaskArg arg) {
         try {
-            IgniteConfiguration cfg = g.configuration();
+            IgniteConfiguration cfg = ignite.configuration();
 
-            for (GridCache cache : g.cachesx()) {
+            for (GridCache cache : ignite.cachesx()) {
                 String cacheName = cache.name();
 
                 if (arg.systemCaches() || !(isSystemCache(cacheName) || isGgfsCache(cfg, cacheName))) {
                     long start0 = U.currentTimeMillis();
 
                     try {
-                        res.caches().add(VisorCache.from(g, cache, arg.sample()));
+                        res.caches().add(VisorCache.from(ignite, cache, arg.sample()));
                     }
                     finally {
                         if (debug)
-                            log(g.log(), "Collected cache: " + cache.name(), getClass(), start0);
+                            log(ignite.log(), "Collected cache: " + cache.name(), getClass(), start0);
                     }
                 }
             }
@@ -123,7 +123,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
     /** Collect GGFS. */
     private void ggfs(VisorNodeDataCollectorJobResult res) {
         try {
-            IgniteFsProcessorAdapter ggfsProc = ((IgniteKernal)g).context().ggfs();
+            IgniteFsProcessorAdapter ggfsProc = ((IgniteKernal)ignite).context().ggfs();
 
             for (IgniteFs ggfs : ggfsProc.ggfss()) {
                 long start0 = U.currentTimeMillis();
@@ -134,7 +134,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
                     if (endPoints != null) {
                         for (IpcServerEndpoint ep : endPoints)
                             if (ep.isManagement())
-                                res.ggfsEndpoints().add(new VisorGgfsEndpoint(ggfs.name(), g.name(),
+                                res.ggfsEndpoints().add(new VisorGgfsEndpoint(ggfs.name(), ignite.name(),
                                     ep.getHost(), ep.getPort()));
                     }
 
@@ -142,7 +142,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
                 }
                 finally {
                     if (debug)
-                        log(g.log(), "Collected GGFS: " + ggfs.name(), getClass(), start0);
+                        log(ignite.log(), "Collected GGFS: " + ggfs.name(), getClass(), start0);
                 }
             }
         }
@@ -154,18 +154,18 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
     /** Collect streamers. */
     private void streamers(VisorNodeDataCollectorJobResult res) {
         try {
-            StreamerConfiguration[] cfgs = g.configuration().getStreamerConfiguration();
+            StreamerConfiguration[] cfgs = ignite.configuration().getStreamerConfiguration();
 
             if (cfgs != null) {
                 for (StreamerConfiguration cfg : cfgs) {
                     long start0 = U.currentTimeMillis();
 
                     try {
-                        res.streamers().add(VisorStreamer.from(g.streamer(cfg.getName())));
+                        res.streamers().add(VisorStreamer.from(ignite.streamer(cfg.getName())));
                     }
                     finally {
                         if (debug)
-                            log(g.log(), "Collected streamer: " + cfg.getName(), getClass(), start0);
+                            log(ignite.log(), "Collected streamer: " + cfg.getName(), getClass(), start0);
                     }
                 }
             }
@@ -180,33 +180,40 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
         return run(new VisorNodeDataCollectorJobResult(), arg);
     }
 
+    /**
+     * Execution logic of concrete job.
+     *
+     * @param res Result response.
+     * @param arg Job argument.
+     * @return Job result.
+     */
     protected VisorNodeDataCollectorJobResult run(VisorNodeDataCollectorJobResult res,
         VisorNodeDataCollectorTaskArg arg) {
-        res.gridName(g.name());
+        res.gridName(ignite.name());
 
-        res.topologyVersion(g.topologyVersion());
+        res.topologyVersion(ignite.topologyVersion());
 
         long start0 = U.currentTimeMillis();
 
         events(res, arg);
 
         if (debug)
-            start0 = log(g.log(), "Collected events", getClass(), start0);
+            start0 = log(ignite.log(), "Collected events", getClass(), start0);
 
         caches(res, arg);
 
         if (debug)
-            start0 = log(g.log(), "Collected caches", getClass(), start0);
+            start0 = log(ignite.log(), "Collected caches", getClass(), start0);
 
         ggfs(res);
 
         if (debug)
-            start0 = log(g.log(), "Collected ggfs", getClass(), start0);
+            start0 = log(ignite.log(), "Collected ggfs", getClass(), start0);
 
         streamers(res);
 
         if (debug)
-            log(g.log(), "Collected streamers", getClass(), start0);
+            log(ignite.log(), "Collected streamers", getClass(), start0);
 
         return res;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
index d5edb7e..e67ac97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
@@ -263,18 +263,18 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
         @Override protected Collection<? extends VisorGridEvent> run(final VisorNodeEventsCollectorTaskArg arg) {
             final long startEvtTime = arg.timeArgument() == null ? 0L : System.currentTimeMillis() - arg.timeArgument();
 
-            final ClusterNodeLocalMap<String, Long> nl = g.nodeLocalMap();
+            final ClusterNodeLocalMap<String, Long> nl = ignite.nodeLocalMap();
 
             final Long startEvtOrder = arg.keyOrder() != null && nl.containsKey(arg.keyOrder()) ?
                 nl.get(arg.keyOrder()) : -1L;
 
-            Collection<Event> evts = g.events().localQuery(new IgnitePredicate<Event>() {
-                @Override public boolean apply(Event event) {
-                    return event.localOrder() > startEvtOrder &&
-                        (arg.typeArgument() == null || F.contains(arg.typeArgument(), event.type())) &&
-                        event.timestamp() >= startEvtTime &&
-                        (arg.taskName() == null || filterByTaskName(event, arg.taskName())) &&
-                        (arg.taskSessionId() == null || filterByTaskSessionId(event, arg.taskSessionId()));
+            Collection<Event> evts = ignite.events().localQuery(new IgnitePredicate<Event>() {
+                @Override public boolean apply(Event evt) {
+                    return evt.localOrder() > startEvtOrder &&
+                        (arg.typeArgument() == null || F.contains(arg.typeArgument(), evt.type())) &&
+                        evt.timestamp() >= startEvtTime &&
+                        (arg.taskName() == null || filterByTaskName(evt, arg.taskName())) &&
+                        (arg.taskSessionId() == null || filterByTaskSessionId(evt, arg.taskSessionId()));
                 }
             });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java
index d96f191..920336e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java
@@ -71,7 +71,7 @@ public class VisorNodeGcTask extends VisorMultiNodeTask<Void, Map<UUID, IgniteBi
 
         /** {@inheritDoc} */
         @Override protected IgniteBiTuple<Long, Long> run(Void arg) {
-            ClusterNode locNode = g.localNode();
+            ClusterNode locNode = ignite.localNode();
 
             long before = freeHeap(locNode);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java
index cdde1f3..ca70b7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java
@@ -69,7 +69,7 @@ public class VisorNodePingTask extends VisorOneNodeTask<UUID, GridTuple3<Boolean
         @Override protected GridTuple3<Boolean, Long, Long> run(UUID nodeToPing) {
             long start = System.currentTimeMillis();
 
-            return new GridTuple3<>(g.pingNode(nodeToPing), start, System.currentTimeMillis());
+            return new GridTuple3<>(ignite.pingNode(nodeToPing), start, System.currentTimeMillis());
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java
index 8fc967a..8d81767 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java
@@ -56,7 +56,7 @@ public class VisorPortableMetadataCollectorTask extends VisorOneNodeTask<Long, I
 
         /** {@inheritDoc} */
         @Override protected IgniteBiTuple<Long, Collection<VisorPortableMetadata>> run(Long lastUpdate) {
-            final IgnitePortables p = g.portables();
+            final IgnitePortables p = ignite.portables();
 
             final Collection<VisorPortableMetadata> data = new ArrayList<>(p.metadata().size());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
index eac83e1..5cf9c1b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java
@@ -85,7 +85,7 @@ public class VisorQueryCleanupTask extends VisorMultiNodeTask<Map<UUID, Collecti
 
         /** {@inheritDoc} */
         @Override protected Void run(Collection<String> qryIds) {
-            ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder> locMap = g.nodeLocalMap();
+            ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder> locMap = ignite.nodeLocalMap();
 
             for (String qryId : qryIds)
                 locMap.remove(qryId);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
index 70c585f..c6e5bae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java
@@ -71,7 +71,7 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin
         private VisorQueryResult nextSqlPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
             long start = U.currentTimeMillis();
 
-            ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<List<?>>> storage = g.nodeLocalMap();
+            ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<List<?>>> storage = ignite.nodeLocalMap();
 
             VisorQueryTask.VisorFutureResultSetHolder<List<?>> t = storage.get(arg.get1());
 
@@ -94,7 +94,7 @@ public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<Strin
         private VisorQueryResult nextScanPage(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException {
             long start = U.currentTimeMillis();
 
-            ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>>> storage = g.nodeLocalMap();
+            ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>>> storage = ignite.nodeLocalMap();
 
             VisorQueryTask.VisorFutureResultSetHolder<Map.Entry<Object, Object>> t = storage.get(arg.get1());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
index b6b26e0..4480861 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java
@@ -195,7 +195,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
                 String qryId = (scan ? VisorQueryUtils.SCAN_QRY_NAME : VisorQueryUtils.SQL_QRY_NAME) + "-" +
                     UUID.randomUUID();
 
-                GridCache<Object, Object> c = g.cachex(arg.cacheName());
+                GridCache<Object, Object> c = ignite.cachex(arg.cacheName());
 
                 if (c == null)
                     return new IgniteBiTuple<>(new IgniteCheckedException("Cache not found: " +
@@ -206,7 +206,7 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
                 if (scan) {
                     CacheQueryFuture<Map.Entry<Object, Object>> fut = cp.queries().createScanQuery(null)
                         .pageSize(arg.pageSize())
-                        .projection(g.forNodeIds(arg.proj()))
+                        .projection(ignite.forNodeIds(arg.proj()))
                         .execute();
 
                     long start = U.currentTimeMillis();
@@ -220,19 +220,19 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
 
                     Map.Entry<Object, Object> next = rows.get2();
 
-                    g.<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId,
+                    ignite.<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId,
                         new VisorFutureResultSetHolder<>(fut, next, false));
 
                     scheduleResultSetHolderRemoval(qryId);
 
-                    return new IgniteBiTuple<>(null, new VisorQueryResultEx(g.localNode().id(), qryId,
+                    return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
                         VisorQueryUtils.SCAN_COL_NAMES, rows.get1(), next != null, duration));
                 }
                 else {
                     CacheQueryFuture<List<?>> fut = ((GridCacheQueriesEx<?, ?>)cp.queries())
                         .createSqlFieldsQuery(arg.queryTxt(), true)
                         .pageSize(arg.pageSize())
-                        .projection(g.forNodeIds(arg.proj()))
+                        .projection(ignite.forNodeIds(arg.proj()))
                         .execute();
 
                     List<Object> firstRow = (List<Object>)fut.next();
@@ -260,12 +260,12 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
 
                         long duration = fut.duration() + fetchDuration; // Query duration + fetch duration.
 
-                        g.<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId,
+                        ignite.<String, VisorFutureResultSetHolder>nodeLocalMap().put(qryId,
                             new VisorFutureResultSetHolder<>(fut, rows.get2(), false));
 
                         scheduleResultSetHolderRemoval(qryId);
 
-                        return new IgniteBiTuple<>(null, new VisorQueryResultEx(g.localNode().id(), qryId,
+                        return new IgniteBiTuple<>(null, new VisorQueryResultEx(ignite.localNode().id(), qryId,
                             names, rows.get1(), rows.get2() != null, duration));
                     }
                 }
@@ -280,10 +280,10 @@ public class VisorQueryTask extends VisorOneNodeTask<VisorQueryTask.VisorQueryAr
          * @param id Uniq query result id.
          */
         private void scheduleResultSetHolderRemoval(final String id) {
-            ((IgniteKernal)g).context().timeout()
+            ((IgniteKernal)ignite).context().timeout()
                 .addTimeoutObject(new GridTimeoutObjectAdapter(VisorQueryUtils.RMV_DELAY) {
                     @Override public void onTimeout() {
-                        ClusterNodeLocalMap<String, VisorFutureResultSetHolder> storage = g.nodeLocalMap();
+                        ClusterNodeLocalMap<String, VisorFutureResultSetHolder> storage = ignite.nodeLocalMap();
 
                         VisorFutureResultSetHolder<?> t = storage.get(id);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java
index 20a6000..c0ee2b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java
@@ -55,7 +55,7 @@ public class VisorStreamerMetricsResetTask extends VisorOneNodeTask<String, Void
         /** {@inheritDoc} */
         @Override protected Void run(String streamerName) {
             try {
-                IgniteStreamer streamer = g.streamer(streamerName);
+                IgniteStreamer streamer = ignite.streamer(streamerName);
 
                 streamer.resetMetrics();
 
@@ -63,7 +63,7 @@ public class VisorStreamerMetricsResetTask extends VisorOneNodeTask<String, Void
             }
             catch (IllegalArgumentException iae) {
                 throw new IgniteException("Failed to reset metrics for streamer: " + escapeName(streamerName) +
-                    " on node: " + g.localNode().id(), iae);
+                    " on node: " + ignite.localNode().id(), iae);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java
index 571ccf9..60ce94d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java
@@ -55,7 +55,7 @@ public class VisorStreamerResetTask extends VisorOneNodeTask<String, Void> {
         /** {@inheritDoc} */
         @Override protected Void run(String streamerName) {
             try {
-                IgniteStreamer streamer = g.streamer(streamerName);
+                IgniteStreamer streamer = ignite.streamer(streamerName);
 
                 streamer.reset();
 
@@ -63,7 +63,7 @@ public class VisorStreamerResetTask extends VisorOneNodeTask<String, Void> {
             }
             catch (IllegalArgumentException iae) {
                 throw new IgniteException("Failed to reset streamer: " + escapeName(streamerName)
-                    + " on node: " + g.localNode().id(), iae);
+                    + " on node: " + ignite.localNode().id(), iae);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index 9e87967..35b8c03 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -315,11 +315,11 @@ public class VisorTaskUtils {
     /**
      * Checks for explicit events configuration.
      *
-     * @param g Grid instance.
+     * @param ignite Grid instance.
      * @return {@code true} if all task events explicitly specified in configuration.
      */
-    public static boolean checkExplicitTaskMonitoring(Ignite g) {
-        int[] evts = g.configuration().getIncludeEventTypes();
+    public static boolean checkExplicitTaskMonitoring(Ignite ignite) {
+        int[] evts = ignite.configuration().getIncludeEventTypes();
 
         if (F.isEmpty(evts))
             return false;
@@ -342,17 +342,17 @@ public class VisorTaskUtils {
     /**
      * Grabs local events and detects if events was lost since last poll.
      *
-     * @param g Target grid.
+     * @param ignite Target grid.
      * @param evtOrderKey Unique key to take last order key from node local map.
      * @param evtThrottleCntrKey  Unique key to take throttle count from node local map.
      * @param all If {@code true} then collect all events otherwise collect only non task events.
      * @return Collections of node events
      */
-    public static Collection<VisorGridEvent> collectEvents(Ignite g, String evtOrderKey, String evtThrottleCntrKey,
+    public static Collection<VisorGridEvent> collectEvents(Ignite ignite, String evtOrderKey, String evtThrottleCntrKey,
         final boolean all) {
-        assert g != null;
+        assert ignite != null;
 
-        ClusterNodeLocalMap<String, Long> nl = g.cluster().nodeLocalMap();
+        ClusterNodeLocalMap<String, Long> nl = ignite.cluster().nodeLocalMap();
 
         final long lastOrder = getOrElse(nl, evtOrderKey, -1L);
         final long throttle = getOrElse(nl, evtThrottleCntrKey, 0L);
@@ -377,7 +377,7 @@ public class VisorTaskUtils {
             }
         };
 
-        Collection<Event> evts = g.events().localQuery(p);
+        Collection<Event> evts = ignite.events().localQuery(p);
 
         // Update latest order in node local, if not empty.
         if (!evts.isEmpty()) {
@@ -395,7 +395,7 @@ public class VisorTaskUtils {
         Collection<VisorGridEvent> res = new ArrayList<>(evts.size() + (lost ? 1 : 0));
 
         if (lost)
-            res.add(new VisorGridEventsLost(g.cluster().localNode().id()));
+            res.add(new VisorGridEventsLost(ignite.cluster().localNode().id()));
 
         for (Event e : evts) {
             int tid = e.type();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/ack/VisorAckCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/ack/VisorAckCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/ack/VisorAckCommand.scala
index be888b0..be62eba 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/ack/VisorAckCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/ack/VisorAckCommand.scala
@@ -105,9 +105,9 @@ class VisorAckCommand {
             adviseToConnect()
         else
             try {
-                val nodeIds = grid.nodes().map(_.id())
+                val nodeIds = ignite.nodes().map(_.id())
 
-                grid.compute(grid.forNodeIds(nodeIds))
+                ignite.compute(ignite.forNodeIds(nodeIds))
                     .withName("visor-ack")
                     .withNoFailover()
                     .execute(classOf[VisorAckTask], toTaskArgument(nodeIds, msg))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
index 769defd..b5c38c4 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/alert/VisorAlertCommand.scala
@@ -257,9 +257,9 @@ class VisorAlertCommand {
                 adviseToConnect()
             else {
                 // Warn but don't halt.
-                if (F.isEmpty(grid.configuration().getAdminEmails))
+                if (F.isEmpty(ignite.configuration().getAdminEmails))
                     warn("Admin emails are not configured (ignoring).")
-                else if (!grid.isSmtpEnabled)
+                else if (!ignite.isSmtpEnabled)
                     warn("SMTP is not configured (ignoring).")
 
                 val dfltNodeF = (_: ClusterNode) => true
@@ -276,11 +276,11 @@ class VisorAlertCommand {
 
                         n match {
                             // Grid-wide metrics (not node specific).
-                            case "cc" if v != null => gf = makeGridFilter(v, gf, grid.metrics().getTotalCpus)
-                            case "nc" if v != null => gf = makeGridFilter(v, gf, grid.nodes().size)
-                            case "hc" if v != null => gf = makeGridFilter(v, gf, U.neighborhood(grid.nodes()).size)
+                            case "cc" if v != null => gf = makeGridFilter(v, gf, ignite.metrics().getTotalCpus)
+                            case "nc" if v != null => gf = makeGridFilter(v, gf, ignite.nodes().size)
+                            case "hc" if v != null => gf = makeGridFilter(v, gf, U.neighborhood(ignite.nodes()).size)
                             case "cl" if v != null => gf = makeGridFilter(v, gf,
-                                () => (grid.metrics().getAverageCpuLoad * 100).toLong)
+                                () => (ignite.metrics().getAverageCpuLoad * 100).toLong)
 
                             // Per-node current metrics.
                             case "aj" if v != null => nf = makeNodeFilter(v, nf, _.metrics().getCurrentActiveJobs)
@@ -358,7 +358,7 @@ class VisorAlertCommand {
                 override def apply(evt: Event): Boolean = {
                     val discoEvt = evt.asInstanceOf[DiscoveryEvent]
 
-                    val node = grid.node(discoEvt.eventNode().id())
+                    val node = ignite.node(discoEvt.eventNode().id())
 
                     if (node != null)
                         alerts foreach (t => {
@@ -440,7 +440,7 @@ class VisorAlertCommand {
                 }
             }
 
-            grid.events().localListen(lsnr, EVT_NODE_METRICS_UPDATED)
+            ignite.events().localListen(lsnr, EVT_NODE_METRICS_UPDATED)
         }
     }
 
@@ -451,7 +451,7 @@ class VisorAlertCommand {
         if (guard.compareAndSet(true, false)) {
             assert(lsnr != null)
 
-            assert(grid.events().stopLocalListen(lsnr))
+            assert(ignite.events().stopLocalListen(lsnr))
 
             lsnr = null
         }
@@ -476,7 +476,7 @@ class VisorAlertCommand {
         assert(n != null)
 
         val subj = "Visor alert triggered: '" + a.spec + '\''
-        val headline = "Ignite ver. " + grid.product().version()
+        val headline = "Ignite ver. " + ignite.product().version()
 
         val stat = stats(a.id)
 
@@ -499,7 +499,7 @@ class VisorAlertCommand {
             "First send: " + (if (stat.firstSnd == 0) "n/a" else formatDateTime(stat.firstSnd)) + NL +
             "Last send: " + (if (stat.lastSnd == 0) "n/a" else formatDateTime(stat.lastSnd)) + NL +
             "----" + NL +
-            "Grid name: " + grid.name + NL
+            "Grid name: " + ignite.name + NL
 
         body +=
             "----" + NL +
@@ -512,7 +512,7 @@ class VisorAlertCommand {
             "| support@gridgain.com" + NL
 
         // Schedule sending.
-        grid.sendAdminEmailAsync(subj, body, false)
+        ignite.sendAdminEmailAsync(subj, body, false)
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommand.scala
index 5566336..49ccbc2 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommand.scala
@@ -22,8 +22,6 @@ import org.apache.ignite.internal.visor.util.VisorTaskUtils._
 
 import org.apache.ignite.cluster.ClusterNode
 
-import java.util.Collections
-
 import org.apache.ignite.visor.commands.VisorTextTable
 import org.apache.ignite.visor.visor
 import visor._
@@ -103,7 +101,7 @@ class VisorCacheClearCommand {
             case Some(name) => name
         }
 
-        val prj = if (node.isDefined) grid.forNode(node.get) else grid.forCacheNodes(cacheName)
+        val prj = if (node.isDefined) ignite.forNode(node.get) else ignite.forCacheNodes(cacheName)
 
         if (prj.nodes().isEmpty) {
             val msg =
@@ -117,18 +115,15 @@ class VisorCacheClearCommand {
 
         val t = VisorTextTable()
 
-        t #= ("Node ID8(@)", "Entries Cleared", "Cache Size Before", "Cache Size After")
-
-        val cacheSet = Collections.singleton(cacheName)
+        t #= ("Node ID8(@)", "Cache Size Before", "Cache Size After")
 
-        prj.nodes().foreach(node => {
-            val res = grid.compute(grid.forNode(node))
+        prj.nodes().headOption.foreach(node => {
+            val res = ignite.compute(ignite.forNode(node))
                 .withName("visor-cclear-task")
                 .withNoFailover()
-                .execute(classOf[VisorCacheClearTask], toTaskArgument(node.id(), cacheSet))
-                .get(cacheName)
+                .execute(classOf[VisorCacheClearTask], toTaskArgument(node.id(), cacheName))
 
-            t += (nodeId8(node.id()), res.get1() - res.get2(), res.get1(), res.get2())
+            t += (nodeId8(node.id()), res.get1(), res.get2())
         })
 
         println("Cleared cache with name: " + escapeName(cacheName))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index ca7c96a..c76a841 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -360,7 +360,7 @@ class VisorCacheCommand {
                         ciT #= ("Node ID8(@), IP", "CPUs", "Heap Used", "CPU Load", "Up Time", "Size", "Hi/Mi/Rd/Wr")
 
                         sortData(m.toMap, sortType.getOrElse("hi"), reversed).foreach { case (nid, cm) => {
-                            val nm = grid.node(nid).metrics()
+                            val nm = ignite.node(nid).metrics()
 
                             ciT += (
                                 nodeId8Addr(nid),
@@ -462,11 +462,11 @@ class VisorCacheCommand {
         assert(node != null)
 
         try {
-            val prj = node.fold(grid.forRemotes())(grid.forNode(_))
+            val prj = node.fold(ignite.forRemotes())(ignite.forNode(_))
 
             val nids = prj.nodes().map(_.id())
 
-            grid.compute(prj).execute(classOf[VisorCacheMetricsCollectorTask], toTaskArgument(nids,
+            ignite.compute(prj).execute(classOf[VisorCacheMetricsCollectorTask], toTaskArgument(nids,
                 new IgniteBiTuple(new JavaBoolean(name.isEmpty), name.orNull))).toList
         }
         catch {
@@ -482,7 +482,7 @@ class VisorCacheCommand {
      */
     private def config(node: ClusterNode): VisorGridConfiguration = {
         try
-            grid.compute(grid.forNode(node)).withNoFailover()
+            ignite.compute(ignite.forNode(node)).withNoFailover()
                 .execute(classOf[VisorNodeConfigurationCollectorTask], emptyTaskArgument(node.id()))
         catch {
             case e: IgniteException =>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommand.scala
index 0afef57..83996a7 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommand.scala
@@ -103,7 +103,7 @@ class VisorCacheCompactCommand {
             case Some(name) => name
         }
 
-        val prj = if (node.isDefined) grid.forNode(node.get) else grid.forCacheNodes(cacheName)
+        val prj = if (node.isDefined) ignite.forNode(node.get) else ignite.forCacheNodes(cacheName)
 
         if (prj.nodes().isEmpty) {
             val msg =
@@ -122,7 +122,7 @@ class VisorCacheCompactCommand {
         val cacheSet = Collections.singleton(cacheName)
 
         prj.nodes().foreach(node => {
-            val r = grid.compute(grid.forNode(node))
+            val r = ignite.compute(ignite.forNode(node))
                 .withName("visor-ccompact-task")
                 .withNoFailover()
                 .execute(classOf[VisorCacheCompactTask], toTaskArgument(node.id(), cacheSet))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
index c36e37c..e4382ab 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheScanCommand.scala
@@ -139,8 +139,8 @@ class VisorCacheScanCommand {
         }
 
         val cachePrj = node match {
-            case Some(n) => grid.forNode(n).forCacheNodes(cacheName)
-            case _ => grid.forCacheNodes(cacheName)
+            case Some(n) => ignite.forNode(n).forCacheNodes(cacheName)
+            case _ => ignite.forCacheNodes(cacheName)
         }
 
         if (cachePrj.nodes().isEmpty) {
@@ -158,7 +158,7 @@ class VisorCacheScanCommand {
 
         val fullRes =
             try
-                grid.compute(qryPrj)
+                ignite.compute(qryPrj)
                     .withName("visor-cscan-task")
                     .withNoFailover()
                     .execute(classOf[VisorQueryTask],
@@ -205,7 +205,7 @@ class VisorCacheScanCommand {
             ask("\nFetch more objects (y/n) [y]:", "y") match {
                 case "y" | "Y" =>
                     try {
-                        res = grid.compute(qryPrj)
+                        res = ignite.compute(qryPrj)
                             .withName("visor-cscan-fetch-task")
                             .withNoFailover()
                             .execute(classOf[VisorQueryNextPageTask],

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheSwapCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheSwapCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheSwapCommand.scala
index 79088d0..1e9d683 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheSwapCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheSwapCommand.scala
@@ -103,7 +103,7 @@ class VisorCacheSwapCommand {
             case Some(name) => name
         }
 
-        val prj = if (node.isDefined) grid.forNode(node.get) else grid.forCacheNodes(cacheName)
+        val prj = if (node.isDefined) ignite.forNode(node.get) else ignite.forCacheNodes(cacheName)
 
         if (prj.nodes().isEmpty) {
             val msg =
@@ -122,7 +122,7 @@ class VisorCacheSwapCommand {
         val cacheSet = Collections.singleton(cacheName)
 
         prj.nodes().foreach(node => {
-            val r = grid.compute(grid.forNode(node))
+            val r = ignite.compute(ignite.forNode(node))
                 .withName("visor-cswap-task")
                 .withNoFailover()
                 .execute(classOf[VisorCacheSwapBackupsTask], toTaskArgument(node.id(), cacheSet))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
index 17159fb..5e16e8f 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/config/VisorConfigurationCommand.scala
@@ -190,7 +190,7 @@ class VisorConfigurationCommand {
             }
             else if (id.isDefined)
                 try {
-                    node = grid.node(java.util.UUID.fromString(id.get))
+                    node = ignite.node(java.util.UUID.fromString(id.get))
 
                     if (node == null) {
                         scold("'id' does not match any node: " + id.get)
@@ -208,7 +208,7 @@ class VisorConfigurationCommand {
             assert(node != null)
 
             val cfg = try
-                grid.compute(grid.forNode(node))
+                ignite.compute(ignite.forNode(node))
                     .withNoFailover()
                     .execute(classOf[VisorNodeConfigurationCollectorTask], emptyTaskArgument(node.id()))
             catch {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
index 325673c..0b2175c 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/disco/VisorDiscoveryCommand.scala
@@ -138,7 +138,7 @@ class VisorDiscoveryCommand {
             val tm = if (fs.isDefined) timeFilter(fs) else Long.MaxValue
 
             if (tm > 0) {
-                val nodes = grid.nodes()
+                val nodes = ignite.nodes()
 
                 if (nodes.isEmpty) {
                     scold("Topology is empty.")
@@ -146,7 +146,7 @@ class VisorDiscoveryCommand {
                     return
                 }
 
-                val oldest = grid.nodes().maxBy(_.metrics().getUpTime)
+                val oldest = ignite.nodes().maxBy(_.metrics().getUpTime)
 
                 val cntOpt = argValue("c", argLst)
 
@@ -220,7 +220,7 @@ class VisorDiscoveryCommand {
         assert(node != null)
         assert(!node.isDaemon)
 
-        var evts = grid.compute(grid.forNode(node)).execute(classOf[VisorNodeEventsCollectorTask],
+        var evts = ignite.compute(ignite.forNode(node)).execute(classOf[VisorNodeEventsCollectorTask],
             toTaskArgument(node.id(), VisorNodeEventsCollectorTaskArg.createEventsArg(EVTS_DISCOVERY, tmFrame))).toSeq
 
         val nodeStartTime = node.metrics().getStartTime

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
index f8b66dc..1100d15 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
@@ -257,7 +257,7 @@ class VisorEventsCommand {
             }
             else {
                 val node = try
-                    grid.node(UUID.fromString(id.get))
+                    ignite.node(UUID.fromString(id.get))
                 catch {
                     case _: IllegalArgumentException =>
                         scold("Invalid node 'id': " + id.get)
@@ -295,7 +295,7 @@ class VisorEventsCommand {
             }
 
             val evts = try
-                grid.compute(grid.forNode(node)).execute(classOf[VisorNodeEventsCollectorTask],
+                ignite.compute(ignite.forNode(node)).execute(classOf[VisorNodeEventsCollectorTask],
                     toTaskArgument(nid, VisorNodeEventsCollectorTaskArg.createEventsArg(tpFilter, tmFilter)))
             catch {
                 case e: IgniteException =>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/95055571/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
index aafee99..ba5f460 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/gc/VisorGcCommand.scala
@@ -129,7 +129,7 @@ class VisorGcCommand {
             }
             else if (id.isDefined)
                 try {
-                    node = grid.node(UUID.fromString(id.get))
+                    node = ignite.node(UUID.fromString(id.get))
 
                     if (node == null)
                         scold("'id' does not match any node: " + id.get).^^
@@ -143,13 +143,13 @@ class VisorGcCommand {
 
                 t #= ("Node ID8(@)", "Free Heap Before", "Free Heap After", "Free Heap Delta")
 
-                val prj = grid.forRemotes()
+                val prj = ignite.forRemotes()
 
                 val nids = prj.nodes().map(_.id())
 
                 val NULL: Void = null
 
-                grid.compute(prj).withNoFailover().execute(classOf[VisorNodeGcTask],
+                ignite.compute(prj).withNoFailover().execute(classOf[VisorNodeGcTask],
                     toTaskArgument(nids, NULL)).foreach { case (nid, stat) =>
                     val roundHb = stat.get1() / (1024L * 1024L)
                     val roundHa = stat.get2() / (1024L * 1024L)


Mime
View raw message