ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [33/38] incubator-ignite git commit: # IGNITE-296 Added missing data transfer objects for QueryConfiguration and CacheQueryConfiguration. Minor code formatting.
Date Thu, 19 Feb 2015 09:23:32 GMT
# IGNITE-296 Added missing data transfer objects for QueryConfiguration and CacheQueryConfiguration. Minor code formatting.


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

Branch: refs/heads/ignite-gg-9809
Commit: 56a83677ec4e64c5e33891f829e6dd3537482841
Parents: 28584e7
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Feb 19 13:31:44 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Feb 19 13:31:44 2015 +0700

----------------------------------------------------------------------
 .../ignite/internal/visor/cache/VisorCache.java |   2 +-
 .../visor/cache/VisorCacheCompactTask.java      |   2 +-
 .../visor/cache/VisorCacheConfiguration.java    |  40 ++--
 .../visor/cache/VisorCacheLoadTask.java         |   4 +-
 .../visor/cache/VisorCacheMetadataTask.java     |   2 +-
 .../internal/visor/cache/VisorCacheMetrics.java |   3 +-
 .../visor/cache/VisorCachePreloadTask.java      |   4 +-
 .../visor/cache/VisorCacheSwapBackupsTask.java  |   2 +-
 .../cache/VisorCacheTypeFieldMetadata.java      |   1 -
 .../visor/cache/VisorCacheTypeMetadata.java     |  12 +-
 .../compute/VisorComputeMonitoringHolder.java   |   6 +-
 .../VisorComputeToggleMonitoringTask.java       |   2 +-
 .../internal/visor/debug/VisorThreadInfo.java   |  14 +-
 .../event/VisorGridAuthenticationEvent.java     |   2 +-
 .../visor/event/VisorGridEventsLost.java        |   2 +-
 .../event/VisorGridSecuritySessionEvent.java    |   2 +-
 .../internal/visor/igfs/VisorIgfsEndpoint.java  |   5 +-
 .../visor/igfs/VisorIgfsProfilerEntry.java      |   6 +-
 .../visor/igfs/VisorIgfsProfilerTask.java       |  34 ++--
 .../VisorIgfsProfilerUniformityCounters.java    |  15 +-
 .../visor/igfs/VisorIgfsResetMetricsTask.java   |   2 +-
 .../visor/igfs/VisorIgfsSamplingStateTask.java  |   2 +-
 .../internal/visor/log/VisorLogSearchTask.java  |  18 +-
 .../visor/misc/VisorResolveHostNameTask.java    |   6 +-
 .../node/VisorCacheQueryConfiguration.java      | 141 ++++++++++++++
 .../node/VisorExecutorServiceConfiguration.java |   1 -
 .../visor/node/VisorGridConfiguration.java      |  18 ++
 .../visor/node/VisorNodeDataCollectorJob.java   |   2 +-
 .../node/VisorNodeEventsCollectorTask.java      |   4 +-
 .../internal/visor/node/VisorNodeGcTask.java    |   2 +-
 .../visor/node/VisorQueryConfiguration.java     | 183 +++++++++++++++++++
 .../visor/node/VisorSpisConfiguration.java      |   2 +-
 .../visor/query/VisorQueryNextPageTask.java     |   2 +-
 .../visor/query/VisorQueryResultEx.java         |   2 +-
 .../internal/visor/query/VisorQueryUtils.java   |  18 +-
 .../internal/visor/util/VisorTaskUtils.java     |  23 ++-
 36 files changed, 469 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 9a2eb5a..72a93e0 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
@@ -40,7 +40,7 @@ public class VisorCache implements Serializable {
     /** */
     private static final long serialVersionUID = 0L;
 
-    /** Default cache size sampling.  */
+    /** Default cache size sampling. */
     private static final int DFLT_CACHE_SIZE_SAMPLING = 10;
 
     /** Cache name. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 b20efeb..207ba15 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 : ignite.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/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index 384eb4e..7bfaf79 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -24,6 +24,7 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.internal.visor.node.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
@@ -146,22 +147,15 @@ public class VisorCacheConfiguration implements Serializable {
     /** Class name of expiry policy factory. */
     private String expiryPlcFactory;
 
+    /** Query configuration. */
+    private VisorCacheQueryConfiguration qryCfg;
+
     /**
      * @param ignite Grid.
      * @param ccfg Cache configuration.
      * @return Data transfer object for cache configuration properties.
      */
     public static VisorCacheConfiguration from(Ignite ignite, CacheConfiguration ccfg) {
-        Collection<CacheTypeMetadata> cacheMetadata = ccfg.getTypeMetadata();
-
-        if (cacheMetadata == null)
-            cacheMetadata = Collections.emptyList();
-
-        Collection<VisorCacheTypeMetadata> typeMeta = new ArrayList<>(cacheMetadata!= null ? cacheMetadata.size() : 0);
-
-        for (CacheTypeMetadata m: cacheMetadata)
-            typeMeta.add(VisorCacheTypeMetadata.from(m));
-
         GridCacheContext cctx = ((IgniteKernal)ignite).internalCache(ccfg.getName()).context();
 
         boolean jdbcStore = cctx.store().configuredStore() instanceof CacheAbstractJdbcStore;
@@ -205,6 +199,8 @@ public class VisorCacheConfiguration implements Serializable {
         cfg.writerFactory(compactClass(ccfg.getCacheWriterFactory()));
         cfg.expiryPolicyFactory(compactClass(ccfg.getExpiryPolicyFactory()));
 
+        cfg.queryConfiguration(VisorCacheQueryConfiguration.from(ccfg.getQueryConfiguration()));
+
         return cfg;
     }
 
@@ -373,8 +369,8 @@ public class VisorCacheConfiguration implements Serializable {
     }
 
     /**
-     * @param qryIdxEnabled New flag indicating whether Ignite should attempt to index value and/or key instances
-     * stored in cache.
+     * @param qryIdxEnabled New flag indicating whether Ignite should attempt to index value and/or key instances stored
+     * in cache.
      */
     public void queryIndexEnabled(boolean qryIdxEnabled) {
         this.qryIdxEnabled = qryIdxEnabled;
@@ -619,7 +615,7 @@ public class VisorCacheConfiguration implements Serializable {
     }
 
     /**
-     * @return  {@code true} if cache has JDBC store.
+     * @return {@code true} if cache has JDBC store.
      */
     public boolean jdbcStore() {
         return jdbcStore;
@@ -661,14 +657,14 @@ public class VisorCacheConfiguration implements Serializable {
     }
 
     /**
-     * @return  {@code true} if cache statistics enabled.
+     * @return {@code true} if cache statistics enabled.
      */
     public boolean statisticsEnabled() {
         return statisticsEnabled;
     }
 
     /**
-     * @param statisticsEnabled  {@code true} if cache statistics enabled.
+     * @param statisticsEnabled {@code true} if cache statistics enabled.
      */
     public void statisticsEnabled(boolean statisticsEnabled) {
         this.statisticsEnabled = statisticsEnabled;
@@ -734,4 +730,18 @@ public class VisorCacheConfiguration implements Serializable {
     @Override public String toString() {
         return S.toString(VisorCacheConfiguration.class, this);
     }
+
+    /**
+     * @return Cache query configuration.
+     */
+    public VisorCacheQueryConfiguration queryConfiguration() {
+        return qryCfg;
+    }
+
+    /**
+     * @param qryCfg New cache query configuration.
+     */
+    public void queryConfiguration(VisorCacheQueryConfiguration qryCfg) {
+        this.qryCfg = qryCfg;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 e818bd3..329772c 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
@@ -68,7 +68,7 @@ public class VisorCacheLoadTask extends
 
             ExpiryPolicy plc = null;
 
-            for (String cacheName: cacheNames) {
+            for (String cacheName : cacheNames) {
                 IgniteCache cache = ignite.jcache(cacheName);
 
                 if (ttl > 0) {
@@ -77,7 +77,7 @@ public class VisorCacheLoadTask extends
 
                     cache = cache.withExpiryPolicy(plc);
                 }
-                
+
                 cache.loadCache(null, ldrArgs);
 
                 res.put(cacheName, cache.size());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 ea03387..cf19734 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
@@ -61,7 +61,7 @@ public class VisorCacheMetadataTask extends VisorOneNodeTask<String, GridCacheSq
                 GridCache<Object, Object> cache = ignite.cachex(cacheName);
 
                 if (cache != null) {
-                    GridCacheQueriesEx<Object, Object> queries = (GridCacheQueriesEx<Object, Object>) cache.queries();
+                    GridCacheQueriesEx<Object, Object> queries = (GridCacheQueriesEx<Object, Object>)cache.queries();
 
                     return F.first(queries.sqlMetadata());
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
index 1914b18..be44520 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetrics.java
@@ -394,7 +394,8 @@ public class VisorCacheMetrics implements Serializable {
         return txXidMapSize;
     }
 
-    /** Committed transaction queue size.
+    /**
+     * Committed transaction queue size.
      */
     public int txCommitQueueSize() {
         return txCommitQueueSize;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 e0a6e69..86b31b0 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,12 +59,12 @@ public class VisorCachePreloadTask extends VisorOneNodeTask<Set<String>, Void> {
             try {
                 Collection<IgniteInternalFuture<?>> futs = new ArrayList<>();
 
-                for(GridCache c : ignite.cachesx()) {
+                for (GridCache c : ignite.cachesx()) {
                     if (cacheNames.contains(c.name()))
                         futs.add(c.forceRepartition());
                 }
 
-                for (IgniteInternalFuture f: futs)
+                for (IgniteInternalFuture f : futs)
                     f.get();
 
                 return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 5205789..c2d8d55 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
@@ -71,7 +71,7 @@ public class VisorCacheSwapBackupsTask extends VisorOneNodeTask<Set<String>, Map
             Map<String, IgniteBiTuple<Integer, Integer>> total = new HashMap<>();
             ClusterNode locNode = g.localNode();
 
-            for (GridCache c: ignite.cachesx()) {
+            for (GridCache c : ignite.cachesx()) {
                 String cacheName = c.name();
                 CacheAffinity<Object> aff = g.affinity(c.name());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
index 0deb53b..7aabf63 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
@@ -41,7 +41,6 @@ public class VisorCacheTypeFieldMetadata implements Serializable {
     /** Corresponding java type. */
     private String javaType;
 
-
     /**
      * @param f Actual field metadata.
      * @return Data transfer object for given cache field metadata.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
index dec89be..96e5627 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
@@ -104,14 +104,14 @@ public class VisorCacheTypeMetadata implements Serializable {
 
         ArrayList<VisorCacheTypeFieldMetadata> fields = new ArrayList<>(m.getKeyFields().size());
 
-        for (CacheTypeFieldMetadata field: m.getKeyFields())
+        for (CacheTypeFieldMetadata field : m.getKeyFields())
             fields.add(VisorCacheTypeFieldMetadata.from(field));
 
         metadata.keyFields(fields);
 
         fields = new ArrayList<>(m.getValueFields().size());
 
-        for (CacheTypeFieldMetadata field: m.getValueFields())
+        for (CacheTypeFieldMetadata field : m.getValueFields())
             fields.add(VisorCacheTypeFieldMetadata.from(field));
 
         metadata.valFields(fields);
@@ -127,13 +127,14 @@ public class VisorCacheTypeMetadata implements Serializable {
 
     /**
      * Convert class object to string class name in the fields map.
+     *
      * @param base Map with class object.
      * @return Map with string class name.
      */
     private static Map<String, String> convertFieldsMap(Map<String, Class<?>> base) {
         Map<String, String> res = new LinkedHashMap<>(base.size());
 
-        for (Map.Entry<String, Class<?>> e: base.entrySet())
+        for (Map.Entry<String, Class<?>> e : base.entrySet())
             res.put(e.getKey(), U.compact(e.getValue().getName()));
 
         return res;
@@ -141,6 +142,7 @@ public class VisorCacheTypeMetadata implements Serializable {
 
     /**
      * Convert class object to string class name in the  groups map.
+     *
      * @param base Map with class object.
      * @return Map with string class name.
      */
@@ -148,11 +150,11 @@ public class VisorCacheTypeMetadata implements Serializable {
         Map<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> base) {
         Map<String, LinkedHashMap<String, IgniteBiTuple<String, Boolean>>> res = new LinkedHashMap<>(base.size());
 
-        for (Map.Entry<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> e: base.entrySet()) {
+        for (Map.Entry<String, LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>>> e : base.entrySet()) {
             LinkedHashMap<String, IgniteBiTuple<Class<?>, Boolean>> intBase = e.getValue();
             LinkedHashMap<String, IgniteBiTuple<String, Boolean>> intRes = new LinkedHashMap<>(intBase.size());
 
-            for (Map.Entry<String, IgniteBiTuple<Class<?>, Boolean>> intE: intBase.entrySet()) {
+            for (Map.Entry<String, IgniteBiTuple<Class<?>, Boolean>> intE : intBase.entrySet()) {
                 IgniteBiTuple<Class<?>, Boolean> val = intE.getValue();
 
                 intRes.put(intE.getKey(), new IgniteBiTuple<>(U.compact(val.get1().getName()), val.get2()));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 d4b0d58..2036d70 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
@@ -48,7 +48,7 @@ public class VisorComputeMonitoringHolder {
      * @param visorKey unique Visor instance key.
      */
     public void startCollect(IgniteEx ignite, String visorKey) {
-        synchronized(listenVisor) {
+        synchronized (listenVisor) {
             if (cleanupStopped) {
                 scheduleCleanupJob(ignite);
 
@@ -85,7 +85,7 @@ public class VisorComputeMonitoringHolder {
      * @param visorKey Unique Visor instance key.
      */
     public void stopCollect(IgniteEx g, String visorKey) {
-        synchronized(listenVisor) {
+        synchronized (listenVisor) {
             listenVisor.remove(visorKey);
 
             tryDisableEvents(g);
@@ -100,7 +100,7 @@ public class VisorComputeMonitoringHolder {
     private void scheduleCleanupJob(final IgniteEx g) {
         ((IgniteKernal)g).context().timeout().addTimeoutObject(new GridTimeoutObjectAdapter(CLEANUP_TIMEOUT) {
             @Override public void onTimeout() {
-                synchronized(listenVisor) {
+                synchronized (listenVisor) {
                     if (tryDisableEvents(g)) {
                         for (String visorKey : listenVisor.keySet())
                             listenVisor.put(visorKey, false);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 39dfba5..12f42d3 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
@@ -43,7 +43,7 @@ public class VisorComputeToggleMonitoringTask extends
     @Nullable @Override protected Boolean reduce0(List<ComputeJobResult> results) {
         Collection<Boolean> toggles = new HashSet<>();
 
-        for (ComputeJobResult res: results)
+        for (ComputeJobResult res : results)
             toggles.add(res.<Boolean>getData());
 
         // If all nodes return same result.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java
index adab9d8..0bcca79 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadInfo.java
@@ -119,17 +119,17 @@ public class VisorThreadInfo implements Serializable {
         assert ti != null;
 
         VisorThreadLockInfo[] linfos = ti.getLockedSynchronizers() != null ?
-                new VisorThreadLockInfo[ti.getLockedSynchronizers().length] : null;
+            new VisorThreadLockInfo[ti.getLockedSynchronizers().length] : null;
 
         if (ti.getLockedSynchronizers() != null)
-            for (int i = 0; i < ti.getLockedSynchronizers().length; i ++)
+            for (int i = 0; i < ti.getLockedSynchronizers().length; i++)
                 linfos[i] = VisorThreadLockInfo.from(ti.getLockedSynchronizers()[i]);
 
         VisorThreadMonitorInfo[] minfos = ti.getLockedMonitors() != null ?
-                new VisorThreadMonitorInfo[ti.getLockedMonitors().length] : null;
+            new VisorThreadMonitorInfo[ti.getLockedMonitors().length] : null;
 
         if (ti.getLockedMonitors() != null)
-            for (int i = 0; i < ti.getLockedMonitors().length; i ++)
+            for (int i = 0; i < ti.getLockedMonitors().length; i++)
                 minfos[i] = VisorThreadMonitorInfo.from(ti.getLockedMonitors()[i]);
 
         return new VisorThreadInfo(ti.getThreadName(),
@@ -283,7 +283,7 @@ public class VisorThreadInfo implements Serializable {
 
         int maxFrames = Math.min(stackTrace.length, MAX_FRAMES);
 
-        for (int i = 0; i < maxFrames; i ++) {
+        for (int i = 0; i < maxFrames; i++) {
             StackTraceElement ste = stackTrace[i];
 
             sb.append("\tat ").append(ste.toString()).append('\n');
@@ -306,7 +306,7 @@ public class VisorThreadInfo implements Serializable {
                 }
             }
 
-            for (VisorThreadMonitorInfo mi: lockedMonitors) {
+            for (VisorThreadMonitorInfo mi : lockedMonitors) {
                 if (mi.stackDepth() == i)
                     sb.append("\t-  locked ").append(mi).append('\n');
             }
@@ -318,7 +318,7 @@ public class VisorThreadInfo implements Serializable {
         if (locks.length > 0) {
             sb.append("\n\tNumber of locked synchronizers = ").append(locks.length).append('\n');
 
-            for (VisorThreadLockInfo li: locks)
+            for (VisorThreadLockInfo li : locks)
                 sb.append("\t- ").append(li).append('\n');
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java
index 80ace77..1e10916 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridAuthenticationEvent.java
@@ -30,7 +30,7 @@ public class VisorGridAuthenticationEvent extends VisorGridEvent {
     /** */
     private static final long serialVersionUID = 0L;
 
-    /**  Subject type. */
+    /** Subject type. */
     private final GridSecuritySubjectType subjType;
 
     /** Subject ID. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
index c5b3b4b..2e64d3f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
@@ -39,7 +39,7 @@ public class VisorGridEventsLost extends VisorGridEvent {
     public VisorGridEventsLost(UUID nid) {
         super(EVT_VISOR_EVENTS_LOST, IgniteUuid.randomUuid(), "EVT_VISOR_EVENTS_LOST", nid, U.currentTimeMillis(),
             "Some Visor events were lost and Visor may show inconsistent results. " +
-            "Configure your grid to disable not important events.",
+                "Configure your grid to disable not important events.",
             "");
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java
index 16766e8..a0bcaab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridSecuritySessionEvent.java
@@ -30,7 +30,7 @@ public class VisorGridSecuritySessionEvent extends VisorGridEvent {
     /** */
     private static final long serialVersionUID = 0L;
 
-    /**  Subject type. */
+    /** Subject type. */
     private final GridSecuritySubjectType subjType;
 
     /** Subject ID. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
index 13401eb..e0ea5b3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
@@ -25,9 +25,9 @@ import java.io.*;
 /**
  * IGFS endpoint descriptor.
  */
-public class VisorIgfsEndpoint implements Serializable{
+public class VisorIgfsEndpoint implements Serializable {
     /** */
-    private static final long  serialVersionUID = 0L;
+    private static final long serialVersionUID = 0L;
 
     /** IGFS name. */
     private final String igfsName;
@@ -43,6 +43,7 @@ public class VisorIgfsEndpoint implements Serializable{
 
     /**
      * Create IGFS endpoint descriptor with given parameters.
+     *
      * @param igfsName IGFS name.
      * @param gridName Grid name.
      * @param hostName Host address / name.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
index c99fd19..bf1a75d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
@@ -35,8 +35,8 @@ public class VisorIgfsProfilerEntry implements Serializable {
         new Comparator<VisorIgfsProfilerEntry>() {
             @Override public int compare(VisorIgfsProfilerEntry a, VisorIgfsProfilerEntry b) {
                 return Long.compare(a.ts, b.ts);
-        }
-    };
+            }
+        };
 
     /** Path to file. */
     private final String path;
@@ -71,7 +71,7 @@ public class VisorIgfsProfilerEntry implements Serializable {
     /** Calculated uniformity. */
     private double uniformity = -1;
 
-    /** Counters for uniformity calculation.  */
+    /** Counters for uniformity calculation. */
     private final VisorIgfsProfilerUniformityCounters counters;
 
     /** Read speed in bytes per second or {@code -1} if speed not available. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
index 5696768..f750ab3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
@@ -74,7 +74,7 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
         /** System time (either read or write). Available only for CLOSE_IN/CLOSE_OUT events. */
         private final long sysTime;
 
-        /** Total amount of read or written bytes. Available only for CLOSE_IN/CLOSE_OUT events.*/
+        /** Total amount of read or written bytes. Available only for CLOSE_IN/CLOSE_OUT events. */
         private final long totalBytes;
 
         /**
@@ -117,7 +117,7 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
                     : a.ts > b.ts ? 1
                     : 0;
             }
-    };
+        };
 
     /**
      * Job that do actual profiler work.
@@ -207,7 +207,7 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
          * @param ix Index of array item to parse.
          * @param dflt Default value if string is empty or index is out of array bounds.
          * @return Parsed integer.
-         * @exception NumberFormatException  if the string does not contain a parsable integer.
+         * @throws NumberFormatException if the string does not contain a parsable integer.
          */
         private int parseInt(String[] ss, int ix, int dflt) {
             if (ss.length <= ix)
@@ -226,7 +226,7 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
          * @param ix Index of array item to parse.
          * @param dflt Default value if string is empty or index is out of array bounds.
          * @return Parsed integer.
-         * @exception NumberFormatException if the string does not contain a parsable long.
+         * @throws NumberFormatException if the string does not contain a parsable long.
          */
         private long parseLong(String[] ss, int ix, long dflt) {
             if (ss.length <= ix)
@@ -411,26 +411,26 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
                     if (line.equalsIgnoreCase(HDR))
                         line = br.readLine();
 
-                        while (line != null) {
-                            try {
-                                VisorIgfsProfilerParsedLine ln = parseLine(line);
-
-                                if (ln != null)
-                                    parsedLines.add(ln);
-                            }
-                            catch (NumberFormatException ignored) {
-                                // Skip invalid lines.
-                            }
+                    while (line != null) {
+                        try {
+                            VisorIgfsProfilerParsedLine ln = parseLine(line);
 
-                            line = br.readLine();
+                            if (ln != null)
+                                parsedLines.add(ln);
+                        }
+                        catch (NumberFormatException ignored) {
+                            // Skip invalid lines.
                         }
+
+                        line = br.readLine();
+                    }
                 }
             }
 
             // Group parsed lines by streamId.
             Map<Long, List<VisorIgfsProfilerParsedLine>> byStreamId = new HashMap<>();
 
-            for (VisorIgfsProfilerParsedLine line: parsedLines) {
+            for (VisorIgfsProfilerParsedLine line : parsedLines) {
                 List<VisorIgfsProfilerParsedLine> grp = byStreamId.get(line.streamId);
 
                 if (grp == null) {
@@ -455,7 +455,7 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
             // Group by files.
             Map<String, List<VisorIgfsProfilerEntry>> byPath = new HashMap<>();
 
-            for (VisorIgfsProfilerEntry entry: entries) {
+            for (VisorIgfsProfilerEntry entry : entries) {
                 List<VisorIgfsProfilerEntry> grp = byPath.get(entry.path());
 
                 if (grp == null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
index 3c4df63..7bbafd5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
@@ -26,11 +26,9 @@ import static org.apache.ignite.internal.visor.igfs.VisorIgfsProfiler.*;
 
 /**
  * Class to support uniformity calculation.
- *
- * <a href="http://en.wikipedia.org/wiki/Coefficient_of_variation">
- * Uniformity calculated as coefficient of variation.
- * </a>
- *
+ *<p>
+ *<a href="http://en.wikipedia.org/wiki/Coefficient_of_variation">Uniformity calculated as coefficient of variation.</a>
+ *</p>
  * Count read frequency for each file and compare with ideal uniform distribution.
  */
 public class VisorIgfsProfilerUniformityCounters implements Serializable {
@@ -125,7 +123,7 @@ public class VisorIgfsProfilerUniformityCounters implements Serializable {
     private void capacity(int minCap) {
         counters.ensureCapacity(minCap);
 
-        while(counters.size() < minCap)
+        while (counters.size() < minCap)
             counters.add(0);
     }
 
@@ -166,8 +164,7 @@ public class VisorIgfsProfilerUniformityCounters implements Serializable {
     }
 
     /**
-     * Calculate uniformity as standard deviation.
-     * See: http://en.wikipedia.org/wiki/Standard_deviation.
+     * Calculate uniformity as standard deviation. See: http://en.wikipedia.org/wiki/Standard_deviation.
      *
      * @return Uniformity value as number in {@code 0..1} range.
      */
@@ -175,7 +172,7 @@ public class VisorIgfsProfilerUniformityCounters implements Serializable {
         if (counters.isEmpty())
             return -1;
         else {
-            int cap = (int) (fileSize / blockSize + (fileSize % blockSize > 0 ? 1 : 0));
+            int cap = (int)(fileSize / blockSize + (fileSize % blockSize > 0 ? 1 : 0));
 
             capacity(cap);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsResetMetricsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsResetMetricsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsResetMetricsTask.java
index bf0e6b4..cd807c2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsResetMetricsTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsResetMetricsTask.java
@@ -54,7 +54,7 @@ public class VisorIgfsResetMetricsTask extends VisorOneNodeTask<Set<String>, Voi
 
         /** {@inheritDoc} */
         @Override protected Void run(Set<String> igfsNames) {
-            for (String igfsName: igfsNames)
+            for (String igfsName : igfsNames)
                 try {
                     ignite.fileSystem(igfsName).resetMetrics();
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
index cfe50b3..d6673ab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
@@ -59,7 +59,7 @@ public class VisorIgfsSamplingStateTask extends VisorOneNodeTask<IgniteBiTuple<S
             catch (IllegalArgumentException iae) {
                 throw new IgniteException("Failed to set sampling state for IGFS: " + arg.get1(), iae);
             }
-            catch(IgniteCheckedException e) {
+            catch (IgniteCheckedException e) {
                 throw U.convertException(e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 edfab6f..470a739 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
@@ -58,7 +58,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
 
     /** {@inheritDoc} */
     @Nullable @Override protected IgniteBiTuple<Iterable<IgniteBiTuple<Exception, UUID>>,
-            Iterable<VisorLogSearchResult>> reduce0(List<ComputeJobResult> results) {
+        Iterable<VisorLogSearchResult>> reduce0(List<ComputeJobResult> results) {
         Collection<VisorLogSearchResult> searchRes = new ArrayList<>();
         Collection<IgniteBiTuple<Exception, UUID>> exRes = new ArrayList<>();
 
@@ -66,7 +66,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
         for (ComputeJobResult result : results) {
             if (result.getException() != null)
                 exRes.add(new IgniteBiTuple<Exception, UUID>(result.getException(), result.getNode().id()));
-            else if(result.getData() != null) {
+            else if (result.getData() != null) {
                 Collection<VisorLogSearchResult> data = result.getData();
 
                 searchRes.addAll(data);
@@ -117,9 +117,9 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
     }
 
     /**
-     *  Job to perform search on node.
+     * Job to perform search on node.
      */
-    private static class VisorLogSearchJob extends VisorJob<VisorLogSearchArg,  Collection<VisorLogSearchResult>> {
+    private static class VisorLogSearchJob extends VisorJob<VisorLogSearchArg, Collection<VisorLogSearchResult>> {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -192,7 +192,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
 
                             searched.add(new GridTuple3<>(buf, line, 0));
 
-                            foundCnt ++;
+                            foundCnt++;
                         }
                     }
 
@@ -209,7 +209,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
         }
 
         /** {@inheritDoc} */
-        @Override protected  Collection<VisorLogSearchResult> run(VisorLogSearchArg arg) {
+        @Override protected Collection<VisorLogSearchResult> run(VisorLogSearchArg arg) {
             URL url = U.resolveIgniteUrl(arg.folder);
 
             if (url == null)
@@ -254,11 +254,13 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
                             }
                         }
                     }
-                    catch (IOException ignored) {}
+                    catch (IOException ignored) {
+                    }
                 }
 
                 return results.isEmpty() ? null : results;
-            } catch (Exception e) {
+            }
+            catch (Exception e) {
                 throw new IgniteException(e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
index 41b1b47..ea7eb91 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java
@@ -65,13 +65,13 @@ public class VisorResolveHostNameTask extends VisorOneNodeTask<Void, Map<String,
                 IgniteBiTuple<Collection<String>, Collection<String>> addrs =
                     IgniteUtils.resolveLocalAddresses(InetAddress.getByName("0.0.0.0"));
 
-                assert(addrs.get1() != null);
-                assert(addrs.get2() != null);
+                assert (addrs.get1() != null);
+                assert (addrs.get2() != null);
 
                 Iterator<String> ipIt = addrs.get1().iterator();
                 Iterator<String> hostIt = addrs.get2().iterator();
 
-                while(ipIt.hasNext() && hostIt.hasNext()) {
+                while (ipIt.hasNext() && hostIt.hasNext()) {
                     String ip = ipIt.next();
 
                     String hostName = hostIt.next();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheQueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheQueryConfiguration.java
new file mode 100644
index 0000000..882fa34
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheQueryConfiguration.java
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.node;
+
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+import java.io.*;
+
+/**
+ * Data transfer object for cache query configuration data.
+ */
+public class VisorCacheQueryConfiguration implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Query type resolver class name. */
+    private String typeRslvr;
+
+    /** {@code true} if primitive keys should be indexed. */
+    private boolean idxPrimitiveKey;
+
+    /** {@code true} if primitive values should be indexed. */
+    private boolean idxPrimitiveVal;
+
+    /** {@code true} if SQL engine should try to convert values to their respective SQL types. */
+    private boolean idxFixedTyping;
+
+    /** {@code true} if SQL engine should generate SQL statements with escaped names. */
+    private boolean escapeAll;
+
+    /**
+     * @param qccfg Cache query configuration.
+     * @return Fill data transfer object with cache query configuration data.
+     */
+    public static VisorCacheQueryConfiguration from(CacheQueryConfiguration qccfg) {
+        VisorCacheQueryConfiguration cfg = null;
+
+        if (qccfg != null) {
+            cfg = new VisorCacheQueryConfiguration();
+
+            QueryTypeResolver rslvr = qccfg.getTypeResolver();
+
+            if (rslvr != null)
+                cfg.typeResolver(U.compact(rslvr.getClass().getName()));
+
+            cfg.indexPrimitiveKey(qccfg.isIndexPrimitiveKey());
+            cfg.indexPrimitiveValue(qccfg.isIndexPrimitiveValue());
+            cfg.indexFixedTyping(qccfg.isIndexFixedTyping());
+            cfg.escapeAll(qccfg.isEscapeAll());
+        }
+
+        return cfg;
+    }
+
+    /**
+     * @return Query type resolver class name.
+     */
+    public String typeResolver() {
+        return typeRslvr;
+    }
+
+    /**
+     * @param typeRslvr Query type resolver class name.
+     */
+    public void typeResolver(String typeRslvr) {
+        this.typeRslvr = typeRslvr;
+    }
+
+    /**
+     * @return {@code true} if primitive keys should be indexed.
+     */
+    public boolean indexPrimitiveKey() {
+        return idxPrimitiveKey;
+    }
+
+    /**
+     * @param idxPrimitiveKey {@code true} if primitive keys should be indexed.
+     */
+    public void indexPrimitiveKey(boolean idxPrimitiveKey) {
+        this.idxPrimitiveKey = idxPrimitiveKey;
+    }
+
+    /**
+     * @return {@code true} if primitive values should be indexed.
+     */
+    public boolean indexPrimitiveValue() {
+        return idxPrimitiveVal;
+    }
+
+    /**
+     * @param idxPrimitiveVal {@code true} if primitive values should be indexed.
+     */
+    public void indexPrimitiveValue(boolean idxPrimitiveVal) {
+        this.idxPrimitiveVal = idxPrimitiveVal;
+    }
+
+    /**
+     * @return {@code true} if SQL engine should try to convert values to their respective SQL types.
+     */
+    public boolean indexFixedTyping() {
+        return idxFixedTyping;
+    }
+
+    /**
+     * @param idxFixedTyping {@code true} if SQL engine should try to convert values to their respective SQL types.
+     */
+    public void indexFixedTyping(boolean idxFixedTyping) {
+        this.idxFixedTyping = idxFixedTyping;
+    }
+
+    /**
+     * @return {@code true} if SQL engine generate SQL statements with escaped names.
+     */
+    public boolean escapeAll() {
+        return escapeAll;
+    }
+
+    /**
+     * @param escapeAll {@code true} if SQL engine should generate SQL statements with escaped names.
+     */
+    public void escapeAll(boolean escapeAll) {
+        this.escapeAll = escapeAll;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
index 4141999..05f407e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
@@ -152,7 +152,6 @@ public class VisorExecutorServiceConfiguration implements Serializable {
         this.restPoolSz = restPoolSz;
     }
 
-
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorExecutorServiceConfiguration.class, this);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 3e037e9..446db32 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
@@ -90,6 +90,9 @@ public class VisorGridConfiguration implements Serializable {
     /** Transactions configuration. */
     private VisorTransactionConfiguration txCfg;
 
+    /** Query configuration */
+    private VisorQueryConfiguration qryCfg;
+
     /**
      * @param ignite Grid.
      * @return Fill data transfer object with node configuration data.
@@ -117,6 +120,7 @@ public class VisorGridConfiguration implements Serializable {
         systemProperties(getProperties());
         atomic(VisorAtomicConfiguration.from(c.getAtomicConfiguration()));
         transaction(VisorTransactionConfiguration.from(c.getTransactionConfiguration()));
+        queryConfiguration(VisorQueryConfiguration.from(c.getQueryConfiguration()));
 
         return this;
     }
@@ -377,4 +381,18 @@ public class VisorGridConfiguration implements Serializable {
     @Override public String toString() {
         return S.toString(VisorGridConfiguration.class, this);
     }
+
+    /**
+     * @return Query configuration.
+     */
+    public VisorQueryConfiguration queryConfiguration() {
+        return qryCfg;
+    }
+
+    /**
+     * @param qryCfg New query configuration.
+     */
+    public void queryConfiguration(VisorQueryConfiguration qryCfg) {
+        this.qryCfg = qryCfg;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 5cb9039..c32a23b 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
@@ -60,7 +60,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
      *
      * @param res Job result.
      * @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 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.
      */
     protected void events0(VisorNodeDataCollectorJobResult res, String evtOrderKey, String evtThrottleCntrKey,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 55fc212..6e70d78 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
@@ -54,7 +54,7 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
 
         for (ComputeJobResult r : results) {
             if (r.getException() == null)
-                allEvts.addAll((Collection<VisorGridEvent>) r.getData());
+                allEvts.addAll((Collection<VisorGridEvent>)r.getData());
         }
 
         return allEvts.isEmpty() ? Collections.<VisorGridEvent>emptyList() : allEvts;
@@ -172,7 +172,7 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
      * Job for task returns events data.
      */
     private static class VisorEventsCollectJob extends VisorJob<VisorNodeEventsCollectorTaskArg,
-            Collection<? extends VisorGridEvent>> {
+        Collection<? extends VisorGridEvent>> {
         /** */
         private static final long serialVersionUID = 0L;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 920336e..b545809 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
@@ -45,7 +45,7 @@ public class VisorNodeGcTask extends VisorMultiNodeTask<Void, Map<UUID, IgniteBi
     @Nullable @Override protected Map<UUID, IgniteBiTuple<Long, Long>> reduce0(List<ComputeJobResult> results) {
         Map<UUID, IgniteBiTuple<Long, Long>> total = new HashMap<>();
 
-        for (ComputeJobResult res: results) {
+        for (ComputeJobResult res : results) {
             IgniteBiTuple<Long, Long> jobRes = res.getData();
 
             total.put(res.getNode().id(), jobRes);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorQueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorQueryConfiguration.java
new file mode 100644
index 0000000..a2599ab
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorQueryConfiguration.java
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.node;
+
+import org.apache.ignite.cache.query.annotations.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+import java.io.*;
+
+/**
+ * Data transfer object for query configuration data.
+ */
+public class VisorQueryConfiguration implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Classes names with methods annotated by {@link QuerySqlFunction}. */
+    private String[] idxCustomFuncClss;
+
+    /** Optional search paths consisting of space names to search SQL schema objects. */
+    private String[] searchPath;
+
+    /** Script path to be ran against H2 database after opening. */
+    private String initScriptPath;
+
+    /** Maximum amount of memory available to off-heap storage. */
+    private long maxOffHeapMemory = -1;
+
+    /** Query execution time threshold. */
+    private long longQryExecTimeout;
+
+    /** If {@code true}, SPI will print SQL execution plan for long queries. */
+    private boolean longQryExplain;
+
+    /** The flag indicating that serializer for H2 database will be set to Ignite's marshaller. */
+    private boolean useOptimizedSerializer;
+
+    /**
+     * @param qcfg Query configuration.
+     * @return Fill data transfer object with query configuration data.
+     */
+    public static VisorQueryConfiguration from(QueryConfiguration qcfg) {
+        VisorQueryConfiguration c = null;
+
+        if (qcfg != null) {
+            c = new VisorQueryConfiguration();
+
+            Class<?>[] clss = qcfg.getIndexCustomFunctionClasses();
+
+            int sz = clss != null ? clss.length : 0;
+
+            String[] strClss = new String[sz];
+
+            for (int i = 0; i < sz; i++)
+                strClss[i] = U.compact(clss[i].getName());
+
+            c.indexCustomFunctionClasses(strClss);
+            c.searchPath(qcfg.getSearchPath());
+            c.initialScriptPath(qcfg.getInitialScriptPath());
+            c.maxOffHeapMemory(qcfg.getMaxOffHeapMemory());
+            c.longQueryExecutionTimeout(qcfg.getLongQueryExecutionTimeout());
+            c.longQueryExplain(qcfg.isLongQueryExplain());
+            c.useOptimizedSerializer(qcfg.isUseOptimizedSerializer());
+        }
+
+        return c;
+    }
+
+    /**
+     * @return Classes with methods annotated by {@link QuerySqlFunction}.
+     */
+    public String[] indexCustomFunctionClasses() {
+        return idxCustomFuncClss;
+    }
+
+    /**
+     * @param idxCustomFuncClss Classes with methods annotated by {@link QuerySqlFunction}.
+     */
+    public void indexCustomFunctionClasses(String[] idxCustomFuncClss) {
+        this.idxCustomFuncClss = idxCustomFuncClss;
+    }
+
+    /**
+     * @return Optional search path consisting of space names to search SQL schema objects.
+     */
+    public String[] searchPath() {
+        return searchPath;
+    }
+
+    /**
+     * @param searchPath Optional search path consisting of space names to search SQL schema objects.
+     */
+    public void searchPath(String[] searchPath) {
+        this.searchPath = searchPath;
+    }
+
+    /**
+     * @return Script path to be ran against H2 database after opening.
+     */
+    public String initialScriptPath() {
+        return initScriptPath;
+    }
+
+    /**
+     * @param initScriptPath Script path to be ran against H2 database after opening.
+     */
+    public void initialScriptPath(String initScriptPath) {
+        this.initScriptPath = initScriptPath;
+    }
+
+    /**
+     * @return Maximum amount of memory available to off-heap storage.
+     */
+    public long maxOffHeapMemory() {
+        return maxOffHeapMemory;
+    }
+
+    /**
+     * @param maxOffHeapMemory Maximum amount of memory available to off-heap storage.
+     */
+    public void maxOffHeapMemory(long maxOffHeapMemory) {
+        this.maxOffHeapMemory = maxOffHeapMemory;
+    }
+
+    /**
+     * @return Query execution time threshold.
+     */
+    public long longQueryExecutionTimeout() {
+        return longQryExecTimeout;
+    }
+
+    /**
+     * @param longQryExecTimeout Query execution time threshold.
+     */
+    public void longQueryExecutionTimeout(long longQryExecTimeout) {
+        this.longQryExecTimeout = longQryExecTimeout;
+    }
+
+    /**
+     * @return If {@code true}, SPI will print SQL execution plan for long queries.
+     */
+    public boolean longQryExplain() {
+        return longQryExplain;
+    }
+
+    /**
+     * @param longQryExplain If {@code true}, SPI will print SQL execution plan for long queries.
+     */
+    public void longQueryExplain(boolean longQryExplain) {
+        this.longQryExplain = longQryExplain;
+    }
+
+    /**
+     * @return The flag indicating that serializer for H2 database will be set to Ignite's marshaller.
+     */
+    public boolean useOptimizedSerializer() {
+        return useOptimizedSerializer;
+    }
+
+    /**
+     * @param useOptimizedSerializer The flag indicating that serializer for H2 database will be set to Ignite's
+     * marshaller.
+     */
+    public void useOptimizedSerializer(boolean useOptimizedSerializer) {
+        this.useOptimizedSerializer = useOptimizedSerializer;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSpisConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSpisConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSpisConfiguration.java
index 9e95647..6833393 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSpisConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorSpisConfiguration.java
@@ -131,7 +131,7 @@ public class VisorSpisConfiguration implements Serializable {
         for (int i = 0; i < spis.length; i++)
             res[i] = collectSpiInfo(spis[i]);
 
-        return (IgniteBiTuple<String, Map<String, Object>>[]) res;
+        return (IgniteBiTuple<String, Map<String, Object>>[])res;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 c6e5bae..4788848 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
@@ -28,7 +28,7 @@ import org.apache.ignite.lang.*;
 import java.util.*;
 
 /**
- *  Task for collecting next page previously executed SQL or SCAN query.
+ * Task for collecting next page previously executed SQL or SCAN query.
  */
 @GridInternal
 public class VisorQueryNextPageTask extends VisorOneNodeTask<IgniteBiTuple<String, Integer>, VisorQueryResult> {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
index f415d61..ace9929 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryResultEx.java
@@ -34,7 +34,7 @@ public class VisorQueryResultEx extends VisorQueryResult {
     /** Query ID to store in node local. */
     private final String qryId;
 
-    /** Query columns descriptors.  */
+    /** Query columns descriptors. */
     private final VisorQueryField[] colNames;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
index 46f3669..ff847d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java
@@ -61,7 +61,6 @@ public class VisorQueryUtils {
     }
 
     /**
-     *
      * @param o Object.
      * @return String representation of value.
      */
@@ -69,11 +68,11 @@ public class VisorQueryUtils {
         if (o == null)
             return "null";
         if (o instanceof byte[])
-            return "size=" + ((byte[]) o).length;
+            return "size=" + ((byte[])o).length;
         if (o instanceof Byte[])
-            return "size=" + ((Byte[]) o).length;
+            return "size=" + ((Byte[])o).length;
         if (o instanceof Object[])
-            return "size=" + ((Object[]) o).length + ", values=[" + mkString((Object[]) o, 120) + "]";
+            return "size=" + ((Object[])o).length + ", values=[" + mkString((Object[])o, 120) + "]";
         return o.toString();
     }
 
@@ -89,7 +88,7 @@ public class VisorQueryUtils {
 
         Boolean first = true;
 
-        for (Object v: arr) {
+        for (Object v : arr) {
             if (first)
                 first = false;
             else
@@ -133,9 +132,9 @@ public class VisorQueryUtils {
             Object k = next.getKey();
             Object v = next.getValue();
 
-            rows.add(new Object[] { typeOf(k), valueOf(k), typeOf(v), valueOf(v) });
+            rows.add(new Object[] {typeOf(k), valueOf(k), typeOf(v), valueOf(v)});
 
-            cnt ++;
+            cnt++;
 
             next = fut.next();
         }
@@ -150,7 +149,7 @@ public class VisorQueryUtils {
      * @return {@code true} if it is one of known types.
      */
     private static Boolean isKnownType(Object obj) {
-        return obj instanceof String||
+        return obj instanceof String ||
             obj instanceof Boolean ||
             obj instanceof Byte ||
             obj instanceof Integer ||
@@ -194,7 +193,8 @@ public class VisorQueryUtils {
             }
 
             rows.add(row);
-            cnt ++;
+
+            cnt++;
 
             next = fut.next();
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56a83677/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 4be371c..348ed33 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
@@ -44,8 +44,8 @@ import java.util.*;
 import java.util.concurrent.atomic.*;
 
 import static java.lang.System.*;
-import static org.apache.ignite.events.EventType.*;
 import static org.apache.ignite.configuration.IgfsConfiguration.*;
+import static org.apache.ignite.events.EventType.*;
 
 /**
  * Contains utility methods for Visor tasks and jobs.
@@ -94,7 +94,7 @@ public class VisorTaskUtils {
     /** Maximum folder depth. I.e. if depth is 4 we look in starting folder and 3 levels of sub-folders. */
     public static final int MAX_FOLDER_DEPTH = 4;
 
-    /** Comparator for log files by last modified date.  */
+    /** Comparator for log files by last modified date. */
     private static final Comparator<VisorLogFile> LAST_MODIFIED = new Comparator<VisorLogFile>() {
         @Override public int compare(VisorLogFile f1, VisorLogFile f2) {
             return Long.compare(f2.lastModified(), f1.lastModified());
@@ -132,7 +132,7 @@ public class VisorTaskUtils {
      * @param arrays Arrays.
      * @return Summary array.
      */
-    public static int[] concat(int[] ... arrays) {
+    public static int[] concat(int[]... arrays) {
         assert arrays != null;
         assert arrays.length > 1;
 
@@ -248,7 +248,7 @@ public class VisorTaskUtils {
 
         StringBuilder sb = new StringBuilder();
 
-        for (Object s: arr)
+        for (Object s : arr)
             sb.append(s).append(sep);
 
         if (sb.length() > 0)
@@ -298,7 +298,7 @@ public class VisorTaskUtils {
 
         V res = map.get(key);
 
-        return res != null? res : ifNull;
+        return res != null ? res : ifNull;
     }
 
     /**
@@ -336,7 +336,7 @@ public class VisorTaskUtils {
      *
      * @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 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
      */
@@ -351,7 +351,7 @@ public class VisorTaskUtils {
      *
      * @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 evtThrottleCntrKey Unique key to take throttle count from node local map.
      * @param evtTypes Event types to collect.
      * @param evtMapper Closure to map grid events to Visor data transfer objects.
      * @return Collections of node events
@@ -464,7 +464,7 @@ public class VisorTaskUtils {
     }
 
     /** Text files mime types. */
-    private static final String[] TEXT_MIME_TYPE = new String[]{ "text/plain", "application/xml", "text/html", "x-sh" };
+    private static final String[] TEXT_MIME_TYPE = new String[] {"text/plain", "application/xml", "text/html", "x-sh"};
 
     /**
      * Check is text file.
@@ -524,7 +524,9 @@ public class VisorTaskUtils {
                     decoder.decode(buf);
 
                     return charset;
-                } catch (CharacterCodingException ignored) { }
+                }
+                catch (CharacterCodingException ignored) {
+                }
             }
         }
 
@@ -603,7 +605,6 @@ public class VisorTaskUtils {
         return logsDirUrl != null ? new File(logsDirUrl.getPath()).toPath() : null;
     }
 
-
     /**
      * Extract max size from eviction policy if available.
      *
@@ -663,7 +664,6 @@ public class VisorTaskUtils {
     }
 
     /**
-     *
      * @param log Logger.
      * @param time Time.
      * @param msg Message.
@@ -731,7 +731,6 @@ public class VisorTaskUtils {
         return end;
     }
 
-
     /**
      * Checks if address can be reached using one argument InetAddress.isReachable() version or ping command if failed.
      *


Mime
View raw message